Skip to content
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

Shaka Player stuck (inaccurate manifest) #330

Closed
akopper opened this issue Apr 12, 2016 · 4 comments
Closed

Shaka Player stuck (inaccurate manifest) #330

akopper opened this issue Apr 12, 2016 · 4 comments
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request

Comments

@akopper
Copy link

akopper commented Apr 12, 2016

Shaka Player seems to have problems with a video of mine. I noticed that sometimes
when seeking in the stream, the playback does not start. The manifest is available at [2].

How to reproduce:

  1. Open the Shaka-Test site at [1]
  2. Start playback.
  3. Seek at random positions in the file and wait for playback to continue.
  4. Notice that sometimes playback will not start.

My setup:

Best Regards,
Alexander

[1] https://storage.googleapis.com/eu-storage-bitcodin/bitStorage/7875_9ef90fef446ac887e6b9a16185086713/191640_7cc1d8535960fed4acf0a1f9edd51dc4/shaka.html
[2] https://eu-storage-bitcodin.storage.googleapis.com/bitStorage/7875_9ef90fef446ac887e6b9a16185086713/191640_7cc1d8535960fed4acf0a1f9edd51dc4/191640.mpd

@joeyparrish joeyparrish added type: bug Something isn't working correctly type: question A question from the community and removed type: bug Something isn't working correctly labels Apr 12, 2016
@joeyparrish
Copy link
Member

I was able to reproduce with your test page. It seems that the playhead is outside the buffered range:

video.currentTime => 583.420756
video.buffered.start(0) => 584.005079
video.buffered.end(0) => 587.999999

I found that spot by luck while manually seeking, but if I seek to exactly that spot, it happens every time:

video.currentTime = 583;

In the manifest, the timescale is 24000 and the segment duration is 95760. 95760 / 24000 = 3.99 seconds. To seek to 583, we would calculate 583 / 3.99 = 146.115. Since startNumber is 0, we would fetch segment 146. To analyze this segment in Linux:

wget https://eu-storage-bitcodin.storage.googleapis.com/bitStorage/7875_9ef90fef446ac887e6b9a16185086713/191640_7cc1d8535960fed4acf0a1f9edd51dc4/video_0_4800000/dash/init.mp4
wget https://eu-storage-bitcodin.storage.googleapis.com/bitStorage/7875_9ef90fef446ac887e6b9a16185086713/191640_7cc1d8535960fed4acf0a1f9edd51dc4/video_0_4800000/dash/segment_146.m4s
cat init.mp4 segment_146.m4s > segment_146.mp4
mp4info --verbose --show-samples segment_146.mp4 | grep cts | head

This shows:

[000001] size=277998 duration=  1000 (    41 ms) offset=      2010
    dts=  14016000 (    584000 ms) cts=  14018000 (    584083 ms) [0] [S] <I>

So the first frame of that segment indeed starts at 584 seconds, which is what the browser reports as well. Therefore the manifest is not an accurate description of the underlying stream.

I would recommend you report this to whoever wrote the DASH packager you used to create this stream. I will leave this issue open while we discuss internally what, if anything, we could do to support this kind of broken content without adding complexity to the system.

@akopper
Copy link
Author

akopper commented Apr 13, 2016

Thank you a lot for your detailed analysis. I will forward this information to the instance responsible for the mpd creation. This helped me a lot.

@joeyparrish
Copy link
Member

No problem. Glad I could help!

@joeyparrish joeyparrish changed the title Shaka Player seeking problem Shaka Player stuck (inaccurate manifest) Apr 13, 2016
@joeyparrish joeyparrish added type: enhancement New feature or request and removed type: question A question from the community labels Apr 15, 2016
@joeyparrish
Copy link
Member

The DASH spec permits manifests to be "approximate", and it appears that the definition of approximate is that the accumulated inaccuracy must be less than 50% of the ideal segment duration.

So we will try to be a little more flexible and tolerate being off by at most one segment.

sanbornhilland pushed a commit to sanbornhilland/shaka-player that referenced this issue Jun 29, 2016
As per issue shaka-project#330, manifests are only required to be approx.
correct with respect to their description of the media segments.
In order to avoid stalling when seeking through content like this,
fetch the chunk prior to the one that supposedly contains the
current time.

This is an attempt to apply a similar fix to Ia7bb74d0120.
sanbornhilland pushed a commit to sanbornhilland/shaka-player that referenced this issue Jun 30, 2016
As per issue shaka-project#330, manifests are only required to be approx.
correct with respect to their description of the media segments.
In order to avoid stalling when seeking through content like this,
fetch the chunk prior to the one that supposedly contains the
current time.

This is an attempt to apply a similar fix to Ia7bb74d0120.
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants