-
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
EXT-X-GAP #2940
Comments
Thanks for the examples @mtoczko, and for creating this issue to point out the gap in our implementation. Looking through the latest spec I see LL-HLS Partial Segments can also be flagged with a GAP attribute, so that's worth noting here since it looks like EXT-X-GAP was added at the same time as LL-HLS tags.
|
#2865 Parses GAP, although functionally the result is the same as before; All unknown tags starting with Filling with silence is doable. We don't have any code that can generate black frames. At best we can copy or extend the duration of existing frames. |
@robwalch Safari fills the gap with the last video frame. If the gap is in the first place, it takes the first frame of the next segment and extends the duration. |
Thanks for clarifying @mtoczko. That makes sense, and would be a great feature, not just for GAP segments, for for actual start gaps that result in stalls and require seek nudging. |
From the HLS spec:
So after avoiding segments or parts marked with a GAP, and before filling with silence or extending frames, we should attempt to find media in other renditions. |
hey @robwalch I see that this feature is in the list of top priorities for the next release - do you guys know what the status on this? |
Hi @lelandhwu, The Milestone is set to 1.4.0 which is the next planned release: HLS.js Roadmap. The work hasn't started yet. I need to wrap up #5191 first. The plan is to skip loading of segments with a GAP tag, and handle them the same way a FRAG_PARSING_ERROR would be handled. |
Hi @robwalch What is the source of the value of this constant? RENDITION_PENALTY_DURATION_MS = 300000 |
It's an arbitrary value. We could make it configurable in the future. It exists so that clients to flip back and forth between redundant streams (or hosts). If a set errors enough to be put in the "penalty box" it will not be switched back to for five minutes.
No? If an audio or subtitle track errors the whole rendition (the variants using that group) error, and the player switches to the backup (or should switch to a variant with a different group). |
v1.4.0 will include support added in #5257. This issue can be used to track additional enhancements and feedback. |
Hi @robwalch To reproduce the issue, you need to watch the entire video and seek to 105. |
Hi @robwalch
Maybe you have an idea why it plays the video normally once and switches the group, but when played again it skips the gap.
|
I've just made some improvements to this in #5366 that allow for more variant and redundant rendition failover (back to renditions that already failed). The thing is with redundant failover we don't maintain the level details for alternates (only roughly in the error handler now for this issue). The failover is not something we want to repeat when both renditions have errors, so there is some basic balancing and penalization of renditions selection based on error count where we do not switch back to alternates if they have errored more the the current selection and errored recently. If you add PATHWAY-ID to the redundant variants then the player would use Pathway Switching rather than redundant failover to organize levels and handle the failover switching. This will change behavior such that each variant or level is a different object rather than one level with redundant urls and attributes grouped in the level object. The error penalty may be harsher (not allowing for failover back to pathways that errored recently) but because the data is there, fragment gaps could be compared across all options. In the future, redundant levels may be refactored discrete objects with assigned pathways, but for now, that implementation (level.urls and level.urlId) remains the same. |
What version of Hls.js are you using?
0.14.7
What browser and OS are you using?
Chrome 84
Test stream:
gap: video segment 1.ts and 5.ts, audio segment 1.ts and 5.ts
https://mtoczko.github.io/hls-test-streams/test-gap-audio-video/playlist.m3u8
gap: video segment 1.ts and 5.ts
https://mtoczko.github.io/hls-test-streams/test-gap-video/playlist.m3u8
gap: audio segment 1.ts and 5.ts
https://mtoczko.github.io/hls-test-streams/test-gap-audio/playlist.m3u8
Checklist
Expected behavior
The client should not attempt to load segment.
Fill audio gaps with silence. (Safari)
Fill video gaps with black frame. (Safari)
The text was updated successfully, but these errors were encountered: