videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.5k stars 422 forks source link

player stalls if target duration different between resolutions? #1278

Closed tzarebczan closed 2 years ago

tzarebczan commented 2 years ago

I reached out on Slack, but will try here also. Hope it's the right place vs something to do with the quality selector. The stream does play fine when going to the /live m3u8 directly. The problem presents itself after switching from auto to 1080p.

https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=false&minified=false&sync-workers=false&liveui=true&llhls=false&url=https%3A%2F%2Fcloud.odysee.live%2Fcontent%2F3d279587280cc17fa96da7854751625131033fce%2Fmaster.m3u8&type=application%2Fx-mpegurl&keysystems=&buffer-water=false&exact-manifest-timings=false&pixel-diff-selector=false&network-info=false&dts-offset=false&override-native=true&preload=auto&mirror-source=true

good direct 1080p: https://cloud.odysee.live/live/3d279587280cc17fa96da7854751625131033fce.m3u8

video-archivist-bot commented 2 years ago

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

gesinger commented 2 years ago

Hey @tzarebczan , the HLS specification requires different renditions to have the same target duration, see https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-10#section-6.2.4

Each Media Playlist in each Variant Stream MUST have the same Target Duration. The only exceptions are SUBTITLES Renditions and Media Playlists containing an EXT-X-I-FRAMES-ONLY tag, which MAY have different Target Durations if they have an EXT-X-PLAYLIST-TYPE of VOD.

This is primarily because EXT-X-MEDIA-SEQUENCE and EXT-X-DISCONTINUITY-SEQUENCE are used to sync renditions when switching, and in the case of the sample above, they are very far off due to the different target durations, e.g.,:

https://cloud.odysee.live/720/3d279587280cc17fa96da7854751625131033fce.m3u8

#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:11844

https://cloud.odysee.live/live/3d279587280cc17fa96da7854751625131033fce.m3u8

#EXT-X-TARGETDURATION:9
#EXT-X-MEDIA-SEQUENCE:2767

Hope this helps!

video-archivist-bot commented 2 years ago

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

tzarebczan commented 2 years ago

Thanks for the info, appreciate it!