shaka-player
shaka-player copied to clipboard
HLS live streams just stops no errors
Have you read the FAQ and checked for duplicate open issues? yes
If the problem is related to FairPlay, have you read the tutorial?
not related to fairplay What version of Shaka Player are you using?
demo page
Can you reproduce the issue with our latest release version?
yes
Can you reproduce the issue with the latest code from main
?
yes
Are you using the demo app or your own custom app? demo
If custom app, can you reproduce the issue using our demo app?
yes What browser and OS are you using?
chrome latest For embedded devices (smart TVs, etc.), what model and firmware version are you using? n/a
What are the manifest and license server URIs?
https://install.perfectgame.tv/speed/broadcast/15/desktop-playlist.m3u8
What configuration are you using? What is the output of player.getConfiguration()
?
demo page default
What did you do? play stream downloads 1-2 segments then stops downloading anymore, manifest continue to download and be updated. ts stream with no encrtyption.
What did you expect to happen?
playback to continue
seems to work fine on hlsjs videojs bitmovin etc and safari native. same behavior on chromecast sdk with just shaka. works with the MPL player.
@avelad i checked 4.5.0 and i dont see any issues with the stream freezing. is it possible transmuxers changed? but i do see some of these after a discontinuty. seems like that might be seperate issue. is that worth another issue? https://v4-5-0-dot-shaka-player-demo.appspot.com/demo/#audiolang=en-US;textlang=en-US;uilang=en-US;asset=https://install.perfectgame.tv/speed/broadcast/15/desktop-playlist.m3u8;panel=CUSTOM%20CONTENT;build=uncompiled
If the transmuxer were to blame, I think we would still see network requests for segments. It stops requesting segments, so I think that is a bug in HlsParser, SegmentIndex, or StreamingEngine.
I just confirmed this issue with the latest release, v4.7.11.
No configuration required. Quick link to repro:
https://shaka-player-demo.appspot.com/demo/#asset=https://install.perfectgame.tv/speed/broadcast/15/desktop-playlist.m3u8
Update: while I was writing those last messages, network requests started happening again. It's still not playing, but my previous guesses about the root cause may be invalid.
In v4.7.0, v4.6.0, v4.5.0, and v4.4.0 it is broken, but with different symptoms:
- "Possible encoding problem warnings"
- Repeated segments in buffer
- Jumping to catch up to seek range
It appears to be working in v4.3.0. I'll bisect through that range to see what changed. Likely the introduction of our transmuxer. :-)
ive seen the possible encoding problems errors with media tailor streams as well for ad insertions on hls. that link and this stream doesnt have any ad insertion just a disconintuty and cue markers to put in ads if they went through an ad server. so you might get 2 bugs here for the price of one :-)
According to my bisection, your stream works fine before 50c9df49a70e17b8b2973ae7a7d47d7856cd09f8, PR #4870, which was meant to fix issue #4589. Between that and v4.7.0, we see the encoding problem logs I mentioned above. There is some other point at which we seem to transition to the "just stops" symptom.
if you need more content with dynamic ad breaks, discontinuities, and mediatailor streams encoded/packaged by ateme, let me know. i still see those possible possible encoding problems, repeated segements/audio/frames/freezing, Jumping forward to catch up with the seek range with 4.7.11.
i sometimes see also segment_index.js:522 Assertion failed: SegmentReferences are incorrect and log.js:140 Possible encoding problem detected! Unexpected buffered range for reference shaka.media.SegmentReference and a lot of gap jumping but i dont see gaps in some of these streams/media. most of the time these dont cause too much impact to the stream sync wise or error or playback wise outside of filling up the console.
All these things are signs of something that is very wrong. They don't always lead to a failed playback, but they point to broken assumptions and/or bad content. (It's hard to tell which is which from the symptoms alone.)
I confirmed your bisection that the "just stops" symptoms start at 776b69dcb99e1f5dbd22181e40c22898f0b8e47a, PR #6059, which is meant to fix issue #5939.
Since reverting that just leads to different problems ("possible encoding problem", repeated segments, etc.), I don't think that is a viable solution.
i dont think its bad content, ive been testing this on mpl default sdk for the new shaka hls opt in, along with safari native, bitmovin, hlsjs,theo,videojs plays fine on all those. probably just a small bug :-)
Yes, the issue is at https://github.com/shaka-project/shaka-player/commit/776b69dcb99e1f5dbd22181e40c22898f0b8e47a, and it looks like the same root cause as https://github.com/shaka-project/shaka-player/issues/6299
yeah that might fix the stopping part, but do you want another issue for the discontinuity ads related errors?
@avelad i do see nightly fixes the just stops behavior. i still see those possible possible encoding problems, repeated segements/audio/frames/freezing,Jumping forward to catch up with the seek range, console errors etc. should i open a new ticket for those?
@dbanbahji I've been looking to see what happens with your stream and I think it is poorly generated:
Start of stream (player load)
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:2188154
#EXT-X-DISCONTINUITY-SEQUENCE:28392
#EXT-X-TARGETDURATION:9
#EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:35.882500Z
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01011.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01012.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01013.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01014.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01015.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01016.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01017.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01018.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01019.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01020.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01021.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01022.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01023.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01024.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01025.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01026.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01027.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01028.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01029.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01030.ts
1º update
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:2188155
#EXT-X-DISCONTINUITY-SEQUENCE:28392
#EXT-X-TARGETDURATION:9
#EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:43.991300Z
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01012.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01013.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01014.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01015.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01016.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01017.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01018.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01019.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01020.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01021.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01022.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01023.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01024.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01025.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01026.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01027.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01028.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01029.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01030.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01031.ts
2º update
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:2188156
#EXT-X-DISCONTINUITY-SEQUENCE:28392
#EXT-X-TARGETDURATION:9
#EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:52.098800Z
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01013.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01014.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01015.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01016.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01017.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01018.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01019.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01020.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01021.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01022.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01023.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01024.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01025.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01026.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01027.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01028.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01029.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01030.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01031.ts
#EXTINF:8,
https://pg-15-linear.perfectgame.tv/009000-393466-pg-321_1ev9/file-5928k-01032.ts
The PDTs are:
- #EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:35.882500Z
- #EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:43.991300Z
- #EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:52.098800Z
If the duration of the segments is 8, the time increment should always be 8, and what your stream says is not like that
The expected would be:
- #EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:35.882500Z
- #EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:43.882500Z
- #EXT-X-PROGRAM-DATE-TIME:2024-07-03T13:40:51.882500Z
You can ignore the PDT by configuration with manifest.hls.ignoreManifestProgramDateTime = true
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen
in a comment.
@avelad i was wondering if you could help with some general question. whats the difference between sequence mode and segements mode? which one should be used/default? i also see Ignore Manifest Timestamps in Segments Mode and Ignore Program Date Time from manifest options for each of these modes. which is the best combinations of these 3 options for general HLS .ts AES 128 streams like this? i also see Inaccurate Manifest Tolerance is that related here as well? @shaka-bot reopen
@shaka-bot reopen
Segments mode or sequence mode is how MSE works, in general sequence mode requires less computational power (it is more efficient), but is less tolerant to errors.
Each stream may need something different depending on how it is generated, if it is generated well the default configuration should work correctly.
whats the difference between sequence mode and segements mode?
if i just want shaka to play the segements/ts to the best of its abiltiy without caring too much about timings/pts/dta/manifest timestamps i assume sequence mode is probably better.
if i have sequence mode which seems to be the default does it make sense to add Ignore Manifest Timestamps in Segments Mode and Ignore Program Date Time from manifest.
what would be the best for inaccurate manifest tolerance?
It seems that this problem could be mitigated by configuring manifest.hls.sequenceMode
to false and manifest.hls. ignoreManifestTimestampsInSegmentsMode
to true.
@avelad Can you explain in detail why setting hls sequenceMode to false in the above issue alleviates the playback issue?
Because of the way the timestampOffset is calculated to pass it to MSE, we tolerate more errors this way.
- Can you give me a link to the relevant code? There is an issue below where hls sync is not correct when buffering is turned off. https://github.com/shaka-project/shaka-player/issues/7087
By setting sequenceMode to false, the error below that occurs when out of sync does not occur. 2. Is it related to the above option?
The sync problem has been resolved, but the error below occurs repeatedly and the buffer is filled and depleted repeatedly.
shaka-player.compiled.debug.js:852 Assertion failed: SegmentIndex.merge should not change the first reference time!
We will follow up on this last error at https://github.com/shaka-project/shaka-player/issues/7087
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen
in a comment.