hls.js
hls.js copied to clipboard
#EXT-X-MEDIA-SEQUENCE resets, playback stall
What do you want to do with Hls.js?
Hello, Is it possible to "inject" #EXT-X-DISCONTINUITY on the client side if the #EXT-X-MEDIA-SEQUENCE counter goes down? I have an HLS packager (Nimble Streamer), which does not add #EXT-X-DISCONTINUITY when encoder was restarted, but it creates the m3u8 playlist again. Playback via hls.js stops, the playlist is still downloading and when #EXT-X-MEDIA-SEQUENCE returns to the previous value - playback goes again.
I cannot change the behavior of the packager, I know it is out of specification. I'm looking for a workaround for the problem on the player side.
Playlist before encoder reset:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:1
#EXT-X-MEDIA-SEQUENCE:1419
#EXT-X-PROGRAM-DATE-TIME:2021-09-04T17:40:13.930Z
#EXTINF:1,
l_157_1420160_1419.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-04T17:40:14.930Z
#EXTINF:1,
l_157_1421160_1420.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-04T17:40:15.930Z
#EXTINF:1,
l_157_1422160_1421.ts
Playlist after encoder reset:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:1
#EXT-X-MEDIA-SEQUENCE:2
#EXT-X-PROGRAM-DATE-TIME:2021-09-04T17:40:29.829Z
#EXTINF:1,
l_169_2600_2.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-04T17:40:30.829Z
#EXTINF:1,
l_169_3600_3.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-04T17:40:31.829Z
#EXTINF:1,
l_169_4600_4.ts
What have you tried so far?
No response
Hi @st24pl,
Set the DVR with a short time window, this will keep the sequence after encoder restart. Probably the simplest solution.
Set the DVR with a short time window, this will keep the sequence after encoder restart. Probably the simplest solution.
In Nimble? DVR playlist ends with #EXT-X-ENDLIST
.
Nimble support says it's correct behavior :/
If media is delivered via RTMP/RTSP and on a reset event the connection from Encoder becomes gracefully closed [and re-initiated after that] - Nimble regards that stream as offline on the disconnect event and doesn't provide chunks anymore, it returns 404 [for playlists/chunklists/chunks]. After the encoder's reconnection - Nimble produces chunks again from 0.
I forgot that nimble has live2VOD by default :/
I forgot that nimble has live2VOD by default :/
Maybe there is better HLS packager? This looks good, but it's very unstable: https://github.com/AirenSoft/OvenMediaEngine