-
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
Player hangs indefinitely on a multi-period mpd when skipping ahead and then behind. #655
Comments
The problem with your custom manifest is you generated the manifest incorrectly. The first two periods should be 60 seconds and the third is 120 seconds. You have it where the second period is 120 seconds, which is causing problems. You can see the problem by just playing the manifest from the beginning. Once it gets to 120 seconds it stops because it is still looking for more content in that period, but can't find it. It is also possible the original issue was the same as #649. I cannot reproduce any issue with the original manifest. |
Thanks! Good catch there and my apologies for the bad content. It was edited by hand. Now that we corrected the MPD, the issue on the sample persists no more. Our original issue does seem similar to #649. We'll test our private content with Chrome 56 and see if that resolves it. Otherwise we'll have to figure out another way to reproduce the problem. Thanks very much for your help. |
Here I've managed to reproduce this See the programmed player here: And here is the MPD it's pointing to which plays well (beginning to end) on all Shaka versions tested (including Shaka demo player): Important Note: We've tried this on multiple versions of Chrome including Canary, Version 58.0.2989.0 and we're getting the same results. We've also seen this consistently on Firefox. Here's what the player does: Begins player at 480.033 (seconds), after an initial delay of 1 seconds it repeats 5 times a rewind of 10 seconds with a 0.5 seconds delay in between. Ultimately the player gets to 7:10 (480-5x10) and will not play. The player up above is running on shaka-player.compiled.debug.js (compiled 1/7/2017 from the master branch). So you can monitor console for errors and warnings. Specs of computers that consistently reproduced: Specs of computer that consistently didn't reproduce: Please let me know if there's anything else you need. |
The problem here is that Chrome doesn't seem to jump gaps after a seek. It will usually jump gaps up to 0.5 seconds, even at the beginning of playback. But if you seek to an unbuffered region that is right behind a buffered range, Chrome won't play. You just happen to seek into the <0.1 second range that is needed to cause this. You can see this by seeking to 440 and pausing, letting it buffer, then seeking to 430.05 (just before the buffered segment). I'll have a fix up soon. |
Chrome doesn't seem to support gap jumping immediately after a seek. So when we detect how much is buffered after a seek, we should use the exact ranges. Otherwise we will be left with a small gap that Chrome doesn't want to jump. Issue #655 Change-Id: I2d853e0c2b95285013463f38cece56ea9ea56133
That bug has been fixed on master. Please try again with the latest code. |
Thanks! Will test and confirm. |
TheModMaker, |
Sure, my email is in CONTRIBUTORS (I'm Jacob). |
Hi, I got a similar issue to this (or #649) but at playback start. A bit randomly (more often for DRM content) shaka downloads some fragments and then gets stuck. What seems to happen is that in In
In
Works fine if I reverting fb8174d where This is with CEF 3.2785.1486 which I think is Chromium 53. Could it be related to https://bugs.chromium.org/p/chromium/issues/detail?id=675556 that is mentioned in #649? Any help would be really appreciated! |
@joeyparrish any ideas? |
@joeyparrish Ok will try. Hopefully I can reproduce it with the CEF test app. It's a bit tricky to update CEF for the application i'm working on (API change etc). Do you remember the reason for changing to |
@wader, no worries. Judging from the investigation by @TheModMaker, it does not appear that |
First, Player should not call AbrManager.setVariants as part of load(). Before, it would set them for the first Period; however, this doesn't work with a start time in another Period. StreamingEngine will call chooseStreams_ for the starting Period before startup finishes. Second, we should handle Period transitions before we handle buffering goal. Before, we would wait until the playhead moves closer to the Period transition even if we have buffered the entire Period. This can cause problems when seeking, especially with text content that buffers quickly. If we seek and we have buffered text but not video, the pipeline will stall since text is waiting for the playhead to move while video is waiting for the Period transition. Lastly, it is possible for multiple Period transitions to occur closely together. If we seek into a Period that is not setup yet, and then seek back to a Period that is setup, then the second transition will complete and the first will override it once it finishes setting up the Period. We should stop any old transitions if another starts. Issue #655 Change-Id: Iab8961c606a65487704c9f0efaa255db0e3dc942
@salmoro I just pushed another fix that should fix the repro you sent me. Please try again. |
Chrome doesn't seem to support gap jumping immediately after a seek. So when we detect how much is buffered after a seek, we should use the exact ranges. Otherwise we will be left with a small gap that Chrome doesn't want to jump. Issue #655 Change-Id: I2d853e0c2b95285013463f38cece56ea9ea56133
First, Player should not call AbrManager.setVariants as part of load(). Before, it would set them for the first Period; however, this doesn't work with a start time in another Period. StreamingEngine will call chooseStreams_ for the starting Period before startup finishes. Second, we should handle Period transitions before we handle buffering goal. Before, we would wait until the playhead moves closer to the Period transition even if we have buffered the entire Period. This can cause problems when seeking, especially with text content that buffers quickly. If we seek and we have buffered text but not video, the pipeline will stall since text is waiting for the playhead to move while video is waiting for the Period transition. Lastly, it is possible for multiple Period transitions to occur closely together. If we seek into a Period that is not setup yet, and then seek back to a Period that is setup, then the second transition will complete and the first will override it once it finishes setting up the Period. We should stop any old transitions if another starts. Issue #655 Change-Id: Iab8961c606a65487704c9f0efaa255db0e3dc942
@TheModMaker |
Is this still included in the milestone of v2.1.0? |
Before, we would treat each buffer separately when deciding to clear when seeking. However, this can cause problems because the media states can end up needing different Periods. For example: we are in Period 2 and seek backwards into Period 1 where we have buffered text but not video. The text media state will need Period 2 since it is buffered; but the video media state will need Period 1. For both states, the "current" Period is 2, so the video state will try to handle a Period transition. This will cause an indefinite hang since text state will never need Period 1. Issue #655 Change-Id: I9d03c0378481b412a79eef205cd647ec9895a8d7
Sorry for the delay, just pushed a change that should fix your latest issue. These fixes will appear in v2.1, some have been cherry-picked into v2.0.x. |
Thanks. We're currently testing. With the latest code, so far we cannot seem to reproduce. Will confirm. |
Before, we would treat each buffer separately when deciding to clear when seeking. However, this can cause problems because the media states can end up needing different Periods. For example: we are in Period 2 and seek backwards into Period 1 where we have buffered text but not video. The text media state will need Period 2 since it is buffered; but the video media state will need Period 1. For both states, the "current" Period is 2, so the video state will try to handle a Period transition. This will cause an indefinite hang since text state will never need Period 1. Issue #655 Change-Id: I9d03c0378481b412a79eef205cd647ec9895a8d7
Bug seems to have been fixed. TYVM! |
Glad that it is fixed. Thanks for sticking with this and providing easy reproductions. |
Thanks for the fantastic support. |
What version of Shaka Player are you using?
2.0.2
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
Custom
If custom app, can you reproduce the issue using our demo app?
Believe so but the uniqueness of what triggers the issue needs automatic programmed navigation to reproduced consistently
What browser and OS are you using?
Chrome with windows 7&10 + chromium on Archlinux
What did you do?
Started playing at precisely the beginning of a period other than the first and then jumped back to a previous period.
What content did you load?
Custom MPD edited from the original "https://storage.googleapis.com/shaka-demo-assets/tos-pto-webvtt/dash.mpd" mpd, referencing its periods numerous times adding up to 70 periods and a duration of 89 minutes.
If standard demo asset, which one?
N/A
If custom asset, what manifest and license server URIs?
http://elchonon.com/shakarewind/1.mpd
How did you interact with the content, if at all?
After experiencing this with normal rewind we've created a programmed navigation rule to consistently reproduce.
What did you expect to happen?
Play as normal.
What actually happened?
Player hangs indefinitely
See elaborate description bellow
On a multi-period mpd, when skipping ahead and then behind (to a previous period which hasn't been loaded yet) Shaka hangs indefinitely.
Here is an example of player set to reproduce this issue.
http://elchonon.com/shakarewind/
The above player points to an MPD edited from the original "https://storage.googleapis.com/shaka-demo-assets/tos-pto-webvtt/dash.mpd" mpd, referencing its periods numerous times adding up to 70 periods and a duration of 89 minutes.
We were not able to consistently reproduce with the original mpd so we made this very long mpd with many periods which seems to be a factor in being able to consistently reproduce.
The player is Shaka compiled in debug mode, compiled 1/7/2017 from the master branch.
The player is set to begin at 421 seconds and jump back to 411 seconds and then it hangs.
We've encountered this consistently with private content of 1hr+ durations and 20+ periods and we are reproducing it here with this content.
The text was updated successfully, but these errors were encountered: