-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Since 1.4.2, when playing FMP4 files, level switching occurred when the network condition was bad. but playback was not possible. #5756
Comments
The most recent main branch does not reproduce this behavior. There are a few PRs related to the audio buffer that have been addressed, but it looks like these will be released to the new 1.5 version. |
Could this gave been fixed by #5742? |
What version should I use to use the version with #5742 applied? This PR looks like it's supposed to apply to 1.5. Has it been applied to 1.4.11-Canary-9471 by any chance? I still have the same symptoms in 1.4.11-Canary. The reason I ask is that I'm using hls.js from npm and combine it with external modules, so it's very easy to test im my test environments if you know the version. |
Hi @kakao-wise-kim, Yes, dev and the latest canary has it: https://0f22780e.hls-js-dev.pages.dev/demo/ (v1.4.11-0.canary.9471) |
Hi @RobWatch This version also made a similar action. But, video segments download action was not normal. It was try to download video segments what a high level. And, It was canceled. and seeked playback timeline. And try downed level video segment downloading again. But It also maybe high level on a throttle network states. When this process is repeated, playback stops and only video segments are downloaded in the background. After playback stops, playback will not start even if you click the Play button. It have to refresh to get back to normal. |
What kind of throttling are you performing exactly? |
@robwalch |
@robwalch From my analysis, the symptoms are as follows
I increased the TTL of the CDN to avoid the 404, and here are the results of my tests.
The time of requested for audio download here varied from case to case: 10 seconds, 20 seconds, 30 seconds, over a minute, etc. I have a question here.
|
v1.5.0 will be in beta in the coming weeks, with a stable release some time in September.
Audio segment loading is handled by the audio-stream-controller
HLS.js fills the main (video) forward buffer to at least The audio buffer should follow the end of the video buffer +1 segment within the same discontinuity sequence.
All versions should perform this way. It is still unclear why that is not the case with your live stream - but only for certain versions from your perspective. If this is fixed in dev, then the issue is resolved. Looking at your screenshots, the issue is with your audio playlist not updating. If your audio playlist is behind, there is no way for the player to load segments it does not know about. This could be an issue with playlist requests timing out, bad target duration values, misaligned media timestamps, or something else - we can't tell without a sample. I have tested 1.4.10 with live streams that I have access to and throttles down to 750kbps/100ms-rtt with the lowest level also being around 500-600kbps and I could not reproduce what you are describing. The player may have stalled for a couple of segments as the average causes level 1 to be selected (second lowest) before lowest, but audio and video were in lock step. |
hello. I made a mistake when I explained about reproduction testing earlier. I found repeated one symptom here. This is our Master Playlist Sample.
If a Buffer Stall error occurs while audio level switching is occurring, the switched audio pts are set olded time the video pts. This symptom does not occur every time. Often they will switch normally. |
What version of Hls.js are you using?
1.4.2 to 1.4.10
What browser (including version) are you using?
chrome 116.0.5845.96
What OS (including version) are you using?
mac os 13.4.1
Test stream
If you need a link, please leave your email address.
Configuration
Additional player setup steps
I can see this in the hls.js demo, so there's nothing to set up.
Checklist
Steps to reproduce
I can reproduce the symptom when playing adaptive live videos with audio and video separated (m4s files) and multiple quality.
Step1 - Run the live video in a normal environment. Play for a sufficiently long time (enough time for a file of more than 9 segments to be downloaded and played).
Step2 - After a period of time, set a random delay on network. I usually use the Network Conditions option in Chrome browser.
Step3 - Limit the Network Condition until you encounter "Type: 'networkError', details: 'fragLoadError'" or "type: 'mediaError', details: 'bufferStalledError'" Buffer as an error. (Repeat the normal and limited settings, but don't do it too fast)
Expected behaviour
The video should switch to a lower quality and play.
What actually happened?
In this case, Video File tries to download a file in normal time, but Audio File tries to download a old time file.
As a result, playback stops, and if you try to retry playback, it doesn't work.
Therefore, the video buffer will continue to fill first. The Audio buffer is filled, but the time difference with the Video buffer is very large. Or, Audio buffer is not filled. Sometimes It try to download audio files from a long time ago. If the file doesn't exist due to a CDN TTL timeout, you'll get a 404.
Console output
If you give me your email address, I'll forward the log to a file.
Chrome media internals output
The text was updated successfully, but these errors were encountered: