Skip to content
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

There are videos where buffer stalls always occur. #5743

Closed
sgbai78 opened this issue Aug 16, 2023 · 8 comments · Fixed by #5804
Closed

There are videos where buffer stalls always occur. #5743

sgbai78 opened this issue Aug 16, 2023 · 8 comments · Fixed by #5804

Comments

@sgbai78
Copy link

sgbai78 commented Aug 16, 2023

What do you want to do with Hls.js?

I am working on a code to play hls using flutter.
I'm using exoplayer on android, but the problem is occurring only on the web version.

The web version uses hls.js, but buffering always occurs for some videos.

When I check such videos on the demo page, there are parts that seem to be cut off in the media buffer and video buffer parts.

Can you explain to me what these cut outs mean?

And can I play the video naturally without buffering like this by changing the options in hls.js?

2023-08-16 11 08 05

this is a test video.
http://61.74.215.10:8888/streaming/ql1Yuxbop1yr5WYNDbmiLJSAVAxCXlBzwz2MXg2pvm9wcN343G9c4OD3X8M5kpx8/hls.m3u8

What have you tried so far?

I tried changing lowLatencyMode to false or increasing backBufferLength, but to no avail.

@sgbai78 sgbai78 added Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Question labels Aug 16, 2023
@robwalch
Copy link
Collaborator

Hi @sgbai78,

Can you please share the console logs from one of the sessions using the media.

The gap is likely an issue with alignment of video timestamps between to quality on start, and the quality playback switches up to.

You could try setting startLevel to the highest levels index to avoid adaptive switch up for most sessions to avoid the gap.

@sgbai78
Copy link
Author

sgbai78 commented Aug 17, 2023

Your answer helped me a lot.

After looking at the answer, I confirmed that the duration is different between m3u8 files.

This is the file for 360p

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:8
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="video_360p_365k_h264_init.mp4"
#EXTINF:8.000,
video_360p_365k_h264_1.mp4
#EXTINF:8.000,
video_360p_365k_h264_2.mp4
#EXTINF:8.000,

This is a 720p file.
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:8
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="video_720p_4.5M_h264_init.mp4"
#EXTINF:4.000,
video_720p_4.5M_h264_1.mp4
#EXTINF:4.000,
video_720p_4.5M_h264_2.mp4
#EXTINF:4.000,
video_720p_4.5M_h264_3.mp4

The problem seems to be caused by the 720p file being cut off at 4 seconds.

It's a little disappointing that this problem has not occurred on other platforms.

However, I believe this is an encoding issue, so let's take a look at the environment on the encoder side again.

@robwalch
Copy link
Collaborator

Funny that the 60fps variant has 4 seconds segments while the 30fps variants have 8 second durations (but they both have been given a target duration of 8). If the keyframes/GoPs align between these segments it shouldn't be an issue to overwrite the second half of the 30fps content with 60fps content, but MSE in Chrome doesn' t seem to go for that. Maybe we can look into deferring the switch until the 8 second segment boundary in a future release.

@robwalch robwalch added Stream Issue and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Aug 18, 2023
@bes
Copy link

bes commented Sep 6, 2023

Hello @sgbai78 I'm trying to convince Chrome to fix this issue. Do you have a source where I can download the video to build a proof of concept? Thanks!

@sgbai78
Copy link
Author

sgbai78 commented Sep 7, 2023

@bes
Copy link

bes commented Sep 7, 2023

@sgbai78 thank you, I have downloaded the zip 👍

@robwalch
Copy link
Collaborator

robwalch commented Sep 7, 2023

Hi @sgbai78,

Please let me know if the changes in #5804 fix this issue or at least improve playback performance for you.

https://bugfix-chrome-avc-overlap-fm.hls-js-4zn.pages.dev/demo/

@sgbai78
Copy link
Author

sgbai78 commented Sep 8, 2023

@robwalch

I just tested it and it works fine.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants