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

Gap in multi-period MPD causes hang #384

Closed
l-law opened this issue May 18, 2016 · 7 comments
Closed

Gap in multi-period MPD causes hang #384

l-law opened this issue May 18, 2016 · 7 comments
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@l-law
Copy link

l-law commented May 18, 2016

Shaka Player v2.0.0-beta2-debug (http://shaka-player-demo.appspot.com/demo/) on Chrome 49, Windows 7, failed to play a static MPD with multiple periods, it will hang after playing a period.
It is possible to seek outside the current period, eg. seek to period 2 while playing period 1, then shaka-player will start from the seek point and play until end of period 2, but will not play period 3.

hang_screen

Test assets can be found at https://drive.google.com/file/d/0BymF_2aNp_hBWmtmaUprNmZ2M2c/view?usp=sharing
manifest.mpd immediately inside the zip file is the MPD that caused playback hang.

Not sure if it is related to #381

@l-law
Copy link
Author

l-law commented May 19, 2016

Sorry there is one attribute put in the wrong place in the uploaded mpd, in Event tag, "timescale" should not be put there but should be put in EventStream.

Correct mpd should look like this:

        <EventStream timescale="10000000" schemeIdUri="urn:scte:scte35:2014:xml+bin">
            <Event presentationTime="60000000" duration="100000000" id="1">
                <scte35:Signal>
                    <scte35:Binary>
                        /DAvAAAAAAAA///wFAVAAAABf+/+A5OHAP4F9eEAADwAAAAKAAhDVUVJAAAAAECJXy8=
                    </scte35:Binary>
                </scte35:Signal>
            </Event>
        </EventStream>

But this doesn't affect the outcome, it will get stuck at period end.

@joeyparrish
Copy link
Member

Thanks, we'll take a look. Odds are good that there is a gap at the start of the second period, which is something we do not currently support.

@joeyparrish joeyparrish added the type: question A question from the community label Jul 1, 2016
@joeyparrish joeyparrish changed the title Static multi period MPD hangs when transit to next period Gap in multi-period MPD causes hang Jul 1, 2016
@joeyparrish
Copy link
Member

Sorry we lost track of this one. It appears that you have a gap in your content. According to Chrome's buffered time ranges, Period 0 ends at 89.061333, but Period 1 begins at 89.24. The references from the manifest seem to indicate that the final segments of Period 0 should go all the way to 89.24, but they do not.

Gaps in content is something we do not support at this time. Any gap larger than what the browser will jump automatically will currently cause a hang such as this one. As far as we know, a gap of 150ms or less should be skipped by all major browsers, so that's our effective tolerance.

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 2, 2016
@l-law
Copy link
Author

l-law commented Jul 4, 2016

Thanks for the information.

I tried to edit the manifest such that Period 1 to start at 89.061333, then shaka can play through the transition from Period 0 to Period 1. Therefore this "gap" should be the main reason that caused playback hang.

However, this "gap" only exists in audio streams, for video stream in Period 0 it should end exactly at the time Period 1 starts. If there is only one single period, then all content could be played even if there is "gap" between audio and end of period(ie. only video is played in the end). I would expect shaka-player should also play all content in the case with multiple periods.

Here I have a few questions:

  1. Sometimes adaptation sets have different end time, in order to use shaka-player to smoothly play across periods, period start time should be set to the earliest end time of any adaptation set of previous period?
  2. If there is overlap between periods, will the content be skipped or played?
  3. Will shaka-player support gaps in content in the future?

@joeyparrish joeyparrish removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 4, 2016
@joeyparrish
Copy link
Member

  1. Yes, for gapless playback, the next Period would start at the earliest end time of all AdaptationSets. However, if there are large (> 150ms) differences in the length of AdaptationSets, you may have an issue with your encoder. It may make more sense to fix the encoder than to hide the problem by changing the start time of the next Period.
  2. If there is overlap between Periods, the browser should skip it because MSE's appendWindowEnd should cut off everything past the end of the Period.
  3. We do not currently support gaps in content and we do not currently have it on our roadmap.

@joeyparrish
Copy link
Member

@l-law, is there anything else we can do for you on this topic?

@joeyparrish
Copy link
Member

Closing due to inactivity.

@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: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants