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

Playback fails with @presentationTimeOffset in Chrome of video with compressed b-frames #593

Closed
payonel opened this issue Nov 16, 2016 · 1 comment
Labels
status: archived Archived and locked; will not be updated status: duplicate A duplicate of another issue; should be closed after linking to the original issue type: bug Something isn't working correctly type: external An issue with an external dependency; not our issue; sometimes kept open for tracking zzz-outdated: Chrome PTS/DTS bug Related to the Chrome PTS/DTS bugs that were present from 2016 - 2019; do not use for new issues

Comments

@payonel
Copy link

payonel commented Nov 16, 2016

  • What version of Shaka Player are you using?
    2.0.1-debug
    http://shaka-player-demo.appspot.com/demo/
    on chrome (works in ff)

    • Can you reproduce the issue with our latest release version?
      tested on the hosted demo

    • Can you reproduce the issue with the latest code from master?
      master not tested

  • Are you using the demo app or your own custom app?
    demo app

  • What did you do?
    Compressed big_buck_bunny.mp4 with h.264 and generated dash manifest for the fragments, then provided an endpoint and tried to playback in the demo shaka player

    • What content did you load?
      Custom asset of compressed big buck bunny, and custom dash manifest software. Attached
  • What did you expect to happen?
    Should play back, as it does in firefox

  • What actually happened?
    Shaka Error MEDIA.VIDEO_ERROR (3,)

my notes:
Very specifically, we fail to playback dash on vod content with compressed B-frames in chrome. The b-frame compression pushes our first fragments decode time to be less than its presentation time. This adjustment is necessary for players that we currently must support. However, we found in testing that If we incorrectly report the decode times as being equal to the fragment's presentation time, then shaka in chrome will play the dash endpoint. Unfortunately, this work around is not an option for us.

Shaka in firefox successfully plays the content. Also, if we provide a live dash stream with decode time offset as explained, shaka in chrome also plays back. A notable difference in the manifest for vod content is the @presentationTimeOffset field. If we omit this field, surprisingly shaka in chrome will playback, which then breaks playback for basically every other player we tested.

dash spec used: https://www.dvb.org/resources/public/standards/a168_dvb-dash.pdf
The spec says these things of interest

  1. [A]t the start of a Period, if the earliest presentation time of any access unit of a Representation is not equal to the presentation time offset signalled in the @presentationTimeOffset attribute then the playout procedures need to be adjusted accordingly.

In all our cases, we are able to keep these two fields equal. No special adjustment should be necessary.

  1. Current play position is the composition time of the currently presented samples minus @presentationTimeOffset

In all cases, our pts - presentationTimeOffset of the first sample is zero, giving us a "play now" behaviour

  1. ...the sole purpose of composition offsets is to re-sequence pictures from decode order to display order

Having a decode time of 0 and a presentation time of 1001 should not affect the "Current play position" negatively. The decode time should be used to order the samples.

  1. When non-sequential or partial Media Segments are passed to a decoder, the baseMediaDecodeTime stored in the Track Fragment Decode Time Box ('tfdt') combined with the Period@presentationTimeOffest[sic] in the MPD can be sufficient to locate the movie fragment on the presentation timeline and provide synchronization between Adaptation Sets encoded with separate timelines, origins, and timescales in the same Period.

We find that our decode time + presentationTimeOffset is always equal to the presentation time of the first sample (due to no gaps nor overlap). Thus, this equation holds true in our case.

bunny-chrome-test.zip

@joeyparrish joeyparrish added type: bug Something isn't working correctly status: duplicate A duplicate of another issue; should be closed after linking to the original issue type: external An issue with an external dependency; not our issue; sometimes kept open for tracking labels Nov 16, 2016
@joeyparrish
Copy link
Member

This appears to be a duplicate of #377. Chrome has several open bugs right now regarding mixups between DTS and PTS:

https://bugs.chromium.org/p/chromium/issues/detail?id=402502
https://bugs.chromium.org/p/chromium/issues/detail?id=398141
https://bugs.chromium.org/p/chromium/issues/detail?id=398130
https://bugs.chromium.org/p/chromium/issues/detail?id=373039

I'm closing this as a duplicate of #377, which we will keep open until Chrome has fixed these bugs. As far as I know, there's nothing Shaka Player can do to work around these bugs in the browser. If you have any information to contribute to those Chrome bug reports, please do. I apologize for the inconvenience.

@joeyparrish joeyparrish added the zzz-outdated: Chrome PTS/DTS bug Related to the Chrome PTS/DTS bugs that were present from 2016 - 2019; do not use for new issues label Aug 15, 2017
@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 status: duplicate A duplicate of another issue; should be closed after linking to the original issue type: bug Something isn't working correctly type: external An issue with an external dependency; not our issue; sometimes kept open for tracking zzz-outdated: Chrome PTS/DTS bug Related to the Chrome PTS/DTS bugs that were present from 2016 - 2019; do not use for new issues
Projects
None yet
Development

No branches or pull requests

3 participants