-
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
Multiple time ranges getting buffered. #121
Comments
I can't figure out what is going wrong with this. @joeyparrish if you have time can you guys try to reproduce this to see why multiple time ranges are getting buffered. |
Update: This problem doesn't happen in 1.3.2, only 1.4.0 |
I can't seem to repro on ToT. I've tried starting playback and letting it play through, seeking to 2:00 manually, and also using setPlaybackStartTime(120) without any luck. How many ranges are buffered when that assert hits? |
There are 2. And then this assertion gets triggered 4 or 5 times and then playback and buffering just stops and nothing happens but nothing is being logged so I can't see what has failed. |
Which content are you using? |
It is the content that you shared with @joeyparrish for #112. |
If you turn verbose logging on (;v query parameter), what do you see before the assert hits? |
Fetching segment s…a.m…a.SegmentReference {startTime: 228.88, endTime: 232.44, startByte: 0, endByte: null, url: g…g.Uri} |
Also, the player says it has 15 seconds buffered ahead but pressing play does nothing. |
Hmm, what browser version? |
Chrome 43.0.2357.132 (64-bit) |
Chrome for Linux? Also, can you repro if you disable bandwidth estimation? |
Chrome on Mac. How can I disable bandwidth estimation? |
You can call |
If I turn off adaptation in your sample app then the problem goes away. |
Ah, I'm thinking that a particular segment from one Representation is not aligned ideally with another segment from another Representation (although MSE should be robust against this), or one of the Representations has an actual encoding issue (that Chrome can't handle). I may not be able to repro because I'm not streaming the same bitrate stream as you. I'll try each bitrate stream to see if I can repro. If I am still unable to, then the problem is probably dependent on the order of segment insertions and timing of switches (all dependent on network conditions), in which case I'll need to get some additional debug logs from you. |
I still can't repro from my end. Can you add the following log to if (this.sourceBuffer_.buffered.length > 1) {
for (var i = 0; i < this.inserted_.length; ++i) {
var r = this.inserted_[i];
console.log(
'r[' + i + ']:',
'start=', r.startTime,
'end=', r.endTime,
'stream=', r.url.toString().split('/').slice(-1)[0]);
}
} This will output URL suffixes, if you don't want to share those here, please feel free to share the logs with me privately (contact info in CONTRIBUTORS). |
There should never be multiple buffered ranges, but if there are then at least try to keep playing. Issue #121 Change-Id: I562bdb194dcc1f66701ad1b5bb3246b4e2fbe431
We determined that this issue can be caused by Representations' segments not being aligned with their corresponding segment indexes (which may be caused by drift, see section 7.2.1 of ISO/IEC 23009-1). For example, given a SegmentTimeline that specifies the following segments for an SD stream and an HD stream, Some small discrepancies can be tolerated by MSE, and Shaka will also handle an arbitrary constant offset between a segment index and the timestamps in the actual media content so long as all Representations have the same offset. If you are encountering this issue then you should ensure that the segment index (i.e., SegmentTimeline or SegmentList or SIDX, etc.) for each Representation is accurate; for example, specifying a separate SegmentTimeline for each Representation instead of for the entire AdaptationSet may resolve the issue. This issue may be caused by content creation tools (e.g., DASH packagers or encoders). This issue did not manifest itself in v1.3.x as the stream switch implementation unintentionally handled content with unaligned segments... The 1.3 implementation switches by first splicing in a chunk of new segments into the buffer before the old segments in the buffer end. It then changes what gets inserted in the update loop. The splice step overwrites any potential gap in the buffer; for example, if the old segments are supposed to end at 10 seconds but actually end at 8, it doesn't matter, since the new segments get spliced in before 8 seconds. The 1.4 implementation switches simply by changing what gets inserted in the update loop, it doesn't splice in anything beforehand. In this way it never overwrites what's in the buffer, unless the next new segment starts before the last old segment ends. The 1.4 design saves bandwidth, but more importantly allows for quick switching between bitrates; for example, the 1.4 implementation can be playing 720p, insert one 480p segment, and then switch back to 720p without overwriting anything in the buffer or re-downloading any segments. With f08fbba the player will now attempt to recover from unaligned segments by re-buffering. Closing this issue as it is being caused by the content itself. However, if we find that this is a common problem with content creation tools then we can start looking at some other mechanisms to better handle this type of content. |
There should never be multiple buffered ranges, but if there are then at least try to keep playing. Issue #121 Change-Id: I562bdb194dcc1f66701ad1b5bb3246b4e2fbe431
Hi Team, How do I check segmenttime line of my content, My MPD contains following lines- 113440_928_dashinit.mp4 and this is same for all bitrates. |
@tsinghal18 What version of Shaka Player are you using? What specific symptoms are you seeing? |
I'm running into a problem with the same content that was used to reproduce #112. Around the middle of the video (2:53) playback stops and the assertion on line 515 of stream.js fails: 'Multiple time ranges should not be buffered!'. It is possible that there is a problem with this manifest that is causing it but I thought I would open this here in case you guys recognize what the problem is.
Update: This does not happen consistently at 2:53 but it happens consistently in the time range. After seeking 2 minutes into the video I had the same problem at 3:11.
The text was updated successfully, but these errors were encountered: