-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
hls.js can not play correctly a live stream with multiple dimensions #2062
Comments
Hi @Steven086 I checked out your stream and confirmed that playback does stall at the time of the resolution switch. I was curious if this was allowable by the specification and it turns out it is:
So I went ahead and tested out native playback in Safari, and it plays back the problem time range without issue. Here's the behaviour I noted in Safari:
Regardless of the nuance between the reported dimensions on Safari, it allows playback to continue without issue On a sidenote, I ran your stream through Apple's |
Hi @Steven086 and @michaelcunningham19,
This is good to know. I just closed a duplicate #1842 with The playlist should mark resolution changes with a DISCONTINUITY to handle resolution change / init segment creation. This is not a priority for us to fix, but if generating a new init segment can be done simply without side-effects based on TS demuxer data, I would accept a PR as long as the behavior matches Safari's. |
Hoping to close this out this issue with #5794. The test stream in the description is long gone so I tested by combining segments from 720p and 540p TS playlists into one. Chrome 115 handles the sps change without any intervention, Safari does not. Resetting the init segment when a resolution change is detected outputs a new init segment from the remuxer which is appended before the following media segments. |
What version of Hls.js are you using?
latest version
What browser and OS are you using?
Chrome, Linux/WIndows
Test stream:
http://cacheawslive.5iketang.com/live/1516-237379/playback/E4ACCAFC.m3u8?vh=aHR0cDovL2RxenouNWlrZXRhbmcuY29tL21lZGlhL3BsYXllci8yMjA5OTkvMjM3Mzc5L2F1dGgva2V5P210b2tlbj1leUoxYzJWeVNXUWlPakFzSWw5MElqb3hOVFExT0RjME5ETXlMQ0owYjJ0bGJpSTZiblZzYkN3aWMybG5iaUk2SWpnME16azJNV0l5WXpJeE16QTVaV00wTURWa05EUmxPVGhrTURjd1lXWmlJbjA
Checklist
Steps to reproduce
// SPS
case 7:
push = true;
spsfound = true;
if (debug && avcSample) {
avcSample.debug += 'SPS ';
}
var expGolombDecoder2 = new exp_golomb_1.default(unit.data);
var config2 = expGolombDecoder2.readSPS();
console.log("dimension: ", track.width, track.height);
if ( track.sps && config2.width != track.width ){
_this.remuxer.resetInitSegment();
track.sps = null;
}
the player can work well.
The text was updated successfully, but these errors were encountered: