-
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
Safari decode error on overlapping append (regression in startup) #6441
Comments
I can reproduce the issue on desktop Safari 17.5 on macos Sonoma. I only see it when switching up on start (from any of levels 0-2 to 3) and then playing past the one second mark. The playback error is logged by the browser:
There is no issue playing each media playlist individually so this looks like a problem with what I noticed are overlapping appends on start. You can workaround it by setting
The decode error is not there in v1.4.13 with desktop Safari, but I notice there is no overlapping append of the first segment(s) of each loaded variant. Disabling MMS with |
Hey @robwalch , thanks for those insights. I'm having similar issues with Airplay that is not casted from iphone to macos -> works prior the v1.5.0 and on native hls ios implementation (testing from hls demo and with no warnings or errors in console) I'm waiting for customer permissions to publish the video, and I'll create a new issue for inspection. |
Does this help? https://webkit.org/blog/15036/how-to-use-media-source-extensions-with-airplay/ If so please file another issue. I'd like to keep this issue scoped to the decoding error in Safari with overlapping appends. |
The reason for the overlapping appends on switch is the difference in durations. The first segment in the lowest variant lists a duration of "4.000000" while the first segment of the highest lists "4.004011". |
Thanks for noticing that, indeed. Although FFProbe shows 4, the playlist reports different. Is there any equivalent to maxFragLookUpTolerance? |
Not for this scenario. We would either need to add a new tolerance for picking the next fragment on switch - it should very small by default (1/200s or %1 of fragment duration) and could be configurable. Or, we could look into inserting a flush operation or seek to flush the decoder for overlapping appends. I don't think the latter is appropriate for a patch. New config options usually wouldn't be included in a patch either, but would be OK as a configurable enhancement where the default matches current behavior (default of 0). Any preference on your end? |
…ist within 1/200s tolerance Fixes edge-case starting in v1.5 that causes #6441
…ist within 1/200s tolerance Fixes edge-case starting in v1.5 that causes #6441
I'm going to push a patch with #6471 that should address your start up issue and prevent overlapping appends for the first VOD segments which do not overlap (with a small allowance of 1/200s or less masked by |
Hey @robwalch sorry for the late response. Many thanks for your fast response and the patch! |
Hi @tvinko, Let me know if v1.5.10 resolves the issue for you. If you are still experiencing the decode error at or even after startup let me know. |
Hey @robwalch fixed! Thanks |
What version of Hls.js are you using?
1.5.0
What browser (including version) are you using?
Safari 17.4.1
What OS (including version) are you using?
IOS
Test stream
https://js-tests.b-cdn.net/freezing.html
Configuration
Additional player setup steps
No response
Checklist
Steps to reproduce
Open video from provided url on iPhone device
Expected behaviour
Playing video
What actually happened?
Video freezes in the first second. It works fine till v1.5 or on native hls support.
I'm aware that there were some changes from v1.5+ with adding support for MMS that can affect this.
Console output
Chrome media internals output
No response
The text was updated successfully, but these errors were encountered: