-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream interrupted playback with Live DASH Halo pakager using Shaka 2.3.0 version #1311
Comments
Here are some numbers from my analysis: At time 1519673732 (seconds since 1970 UTC, the unix epoch), I fetched your manifest. At that moment, availabilityStartTime was <Period id="5074585002895" start="PT1519672808.560S">
<AdaptationSet mimeType="video/mp4" ...>
<SegmentTemplate
timescale="90000"
initialization="$RepresentationID$-Header-1519672026560.m4s"
media="$RepresentationID$-0-T-$Time$.m4s"
presentationTimeOffset="5074655382895">
<SegmentTimeline>
<S t="5074655382895" d="180000" r="449"/>
</SegmentTimeline> The live edge is now, which is 1519673732 seconds since The first segment has timestamp 5074655382895 (in timescale units), and the last segment has start time 5074655382895 + 180000 * 449 = 5074736202895. We then subtract the Converting 80820000 from timescale of 90000 to seconds yields 898 seconds. We then add the period start time of 1519672808.560 seconds and get 1519673706.560 seconds. How far is that from "now"? We subtract the time the request was made (1519673732) and get -25.44, so this is 25.44 seconds in the past. So the timestamps are not that far off. Probably, you just need a To test this theory, I seeked backward by about 45 seconds and playback started. It's not clear why playback didn't start without this action, though, and the JS console still spits out many warnings:
I'll dig deeper and let you know what I find. |
A side-note: in this case, HTTP_ERROR 1002 is caused by your manifest being an http URL and the demo app being an https URL. This is a "mixed-content" error, in which https origins can't load plain http resources. |
Although the timestamps all make sense in a single snapshot of your manifest, comparing over time reveals problems. First snapshot: <Period id="5075233002895" start="PT1519679226.561S">
...
<SegmentTemplate
timescale="90000"
initialization="$RepresentationID$-Header-1519679226561.m4s"
media="$RepresentationID$-0-T-$Time$.m4s"
presentationTimeOffset="5075233002895">
<SegmentTimeline>
<S t="5075233002895" d="180000" r="449"/>
</SegmentTimeline>
</SegmentTemplate> Second snapshot, a couple seconds later: <Period id="5075233002895" start="PT1519679232.561S">
...
<SegmentTemplate
timescale="90000"
initialization="$RepresentationID$-Header-1519679226561.m4s"
media="$RepresentationID$-0-T-$Time$.m4s"
presentationTimeOffset="5075233542895">
<SegmentTimeline>
<S t="5075233542895" d="180000" r="449"/>
</SegmentTimeline>
</SegmentTemplate> The timestamps are changing (period start and first segment time), but in both snapshots, these appear to be the same segment. You should use the I recommend you change:
|
Hi Joey, First, thank you for your detailed analysis. This will allow us to move forward. OK, the "mixed-content" error is clear! Just to be sure to understand correctly, your conclusion is that for a absolute moment, the identified segment is not the same between successive manifests, as our timestamps are changing? Correct me please if I'm wrong. Then, I thought "startNumber" and "suggestedPresentationDelay" were DASH optional parameters, and that "Period@start" could not be fixed. So are they really required if we adjust the use of "presentationTimeOffset" with respect to our adjustment of "Period@start"? Correct me please if I'm wrong. Thank you in advance (and sorry if my questions do not make much sense :-) ). |
|
Does this answer all your questions? |
Hi Joey, thank you for this new answer. It' helpfull yes :-). |
Okay, sounds good. Just let us know when you've heard back. |
@hdodev how did it go with the packager team? :) Is there anything else we can do for you on this issue? |
Hi @ismena, The packager team agree with your analysis, and we made the modifications proposed. We modified:
But to be honest, it's not ok for the moment : When we make the player.load action, the playback doesn't start imediately :-(. We have to click on the Play button of the Player, and to move the cursor on the seek bar to make it start! However when started, it doesn't interrupt anymore :-). Maybe you have an idea? As it's not the same symptom as previously, if you prefer us to close this issue we can. And if we don't solve it in our side, I could open another one to get your help. What do you prefer? |
Hi @shakateam, Despite our attempts, we are still unable to playback the stream. We tried with 2.2.2 version too, and it works. Curiously, from 2.2.3 version we have the same comportment. Can you please help us a last time? Thanks in advance. |
We are working on a couple of issues that might be related. We have just discovered some corner cases in which playback doesn't start properly. You might be running into one of these same issues. I would recommend trying again with our nightly build after we close #1298 and/or #1331. Do you have an updated URL we can use to reproduce your issue with the updated streams? We could double-check for you if our fixes-in-progress for #1298 and #1331 will be effective for this issue, rather than you having to wait for the fixes for those to be released. |
Hi. It seems to work! I'm currently out of office, but I'll try to test with longer sessions, and make you a feedback when I'm back. |
OK, thanks for your help. |
@shaka-bot reopen New tests done with 2.3.5 version.
In the log, we can see there is is an infinite loop: For security reasons, the previous streams are now closed. |
@hdodev, I can't access your stream due to CORS errors. Can you please add appropriate CORS headers in your web server? |
The CORS errors are caused by a redirect. If I just use the redirected URL directly, it works fine. The problem I see is that there is a gap between Periods, specifically there are not enough segments in one Representation. We support gaps between Periods, but only when the Period has an explicit duration. We may want to detect this and handle the gap automatically. When I fetched the manifest, the first Period had an ID of |
Hi @jacob, and thank you. |
Hmm, I've been playing for almost 2 hours with no problem. Plus, I think we should actually handle the case of gaps between Periods already. I'll look into it more. But you should avoid gaps between Periods if at all possible. Every Representation should have segments for the entire Period and each Period shouldn't have gaps between them. |
Now I no longer see a manifest with two Periods in it. When the Period transition happens, the new manifest only contains the second Period. This isn't wrong, but it breaks our gap-jumping logic since it only works if we see the two Periods in the same manifest. We may be able to add support for this case, but it may not be simple. Tentatively scheduled for v2.5. But there are still gaps between the Periods. It would be ideal if you could fix them, but we can work to fix our gap-jumping logic. |
Hi @TheModMaker. I'm surprised by the fact that there were 2 periods in the same manifest with our current Packager configuration, and as it's a clear DASH stream. I suspect there was a problem during your first test, such as for example a temporary flow loss by packager. Anyway, thanks again for your help, and for the enhancement proposal. |
Any update? |
Hi, |
Have you read the FAQ and checked for duplicate open issues?:
Yes, it looks like item #838, and to problems related to "presentationTimeOffset" in general. But the error log I have in console is different, and version used is higher.
What version of Shaka Player are you using?: 2.3.0
Can you reproduce the issue with our latest release version?: YES
Can you reproduce the issue with the latest code from
master
?: YESAre you using the demo app or your own custom app?: CUSTOM
If custom app, can you reproduce the issue using our demo app?: NO, HTTP_ERROR 1002, but I'm sure the manifest is accessible!
What browser and OS are you using?: CHROME on UBUNTU
What are the manifest and license server URIs?:
Clear DASH = http://195.36.159.232/cleardashSO_tml/france4/manifest.mpd
What did you do?
I try to playback a Live Stream from my packager. We've just corrected our manifest thanks to your analysis last year : The problem was the fact that presentationTimeOffset appeared to be modified when the manifest was updated.
What did you expect to happen?
Live playback works continuously. If you can please help us to understand the remaining problem. Thanks in advance for your help.
What actually happened?
The playback starts, and then pauses, and then starts again, and so on.
It can appear once, twice, or more, there is no rule. Here is the log with the debug version:
Refusing to rewrite original references on update!
segment_index.js:319 Assertion failed: SegmentReferences are incorrectshaka.media.SegmentIndex.assertCorrectReferences_ @ segment_index.js:319shaka.media.SegmentIndex.merge @ segment_index.js:203shaka.dash.SegmentTemplate.createStream @ segment_template.js:82shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1092shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:991shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:733shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:634shaka.dash.DashParser.processManifest_ @ dash_parser.js:521xlinkOperation.promise.then @ dash_parser.js:432
The text was updated successfully, but these errors were encountered: