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

Playback error with HLS Low latency and byte ranges #5089

Closed
sebastieng opened this issue Mar 13, 2023 · 4 comments · Fixed by #5294
Closed

Playback error with HLS Low latency and byte ranges #5089

sebastieng opened this issue Mar 13, 2023 · 4 comments · Fixed by #5294
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@sebastieng
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
v4.3.5

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
demo app

If custom app, can you reproduce the issue using our demo app?

What browser and OS are you using?
Windows/Chrome

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

What configuration are you using? What is the output of player.getConfiguration()?

What did you do?
start to play from the manifest

What did you expect to happen?
Play smoothly

What actually happened?
Play is not smooth. Player stops or play several times the same segment

Console log shows following errors:
image

I have started to investigate the issue:

The manifest is:
#EXT-X-PROGRAM-DATE-TIME:2023-03-13T16:12:46.920Z
#EXT-X-PART:DURATION=1.00000,URI="1678379181946item-01item_Segment-3446360800000.m4v",BYTERANGE="105753@0",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.00000,URI="1678379181946item-01item_Segment-3446360800000.m4v",BYTERANGE="138194@105753"
#EXT-X-PART:DURATION=1.00000,URI="1678379181946item-01item_Segment-3446360800000.m4v",BYTERANGE="132348@243947",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.00000,URI="1678379181946item-01item_Segment-3446360800000.m4v",BYTERANGE="109317@376295"
#EXTINF:4.000,
1678379181946item-01item_Segment-3446360800000.m4v
#EXT-X-KEY:METHOD=NONE
#EXT-X-PROGRAM-DATE-TIME:2023-03-13T16:12:50.920Z
#EXT-X-PART:DURATION=1.00000,URI="1678379181946item-01item_Segment-3446400800000.m4v",BYTERANGE="130885@0",INDEPENDENT=YES
#EXT-X-PRELOAD-HINT:TYPE=PART,URI="1678379181946item-01item_Segment-3446400800000.m4v", BYTERANGE-START=130885

I think that the issue is about the processing of #EXT-X-PRELOAD-HINT.
The player detects a difference between the segment duration and the expected duration.
This line https://github.com/shaka-project/shaka-player/blob/main/lib/hls/hls_parser.js#L2724 considers that the duration for the part indicated by #EXT-X-PRELOAD-HINT is the part target duration. But it is not true. In the example above, we will get 3 parts using #EXT-X-PRELOAD-HINT
When I discard the processing of #EXT-X-PRELOAD-HINT in the player, there is no more errors, the playback is smooth but the latency is not optimized

@sebastieng sebastieng added the type: bug Something isn't working correctly label Mar 13, 2023
@avelad avelad added the component: HLS The issue involves Apple's HLS manifest format label Mar 13, 2023
@github-actions github-actions bot added this to the v4.4 milestone Mar 13, 2023
@avelad
Copy link
Member

avelad commented Mar 16, 2023

@sebastieng are you interested on send a PR to fix it? Thanks!

@sebastieng
Copy link
Author

@avelad
I have not really a fix.
I have a dirty workaround that consist to ignore #EXT-X-PRELOAD-HINT. So latency is not optimized.
I don't know enough how the player works to develop a clean fix: Issue is about reference end time, it is not known as we don't know the segment duration reference by #EXT-X-PRELOAD-HINT. This reference end time seems to be used a lot in the code so difficult to handle a reference end time not defined

@avelad avelad added the priority: P1 Big impact or workaround impractical; resolve before feature release label Mar 20, 2023
@prate3k
Copy link

prate3k commented May 20, 2023

Screenshot 2023-05-20 at 9 37 17 PM

I'm getting a similar error, is there a workaround for this? I'm trying v4.3.6 in chrome 38 browser. hlsjs player works fine though.

I'm using HLS streams provided by akamai : https://players.akamai.com/players/hlsjs?streamUrl=https%3A%2F%2Fcph-msl.akamaized.net%2Fhls%2Flive%2F2000341%2Ftest%2Fmaster.m3u8

@sebastieng
Copy link
Author

@prate3k
This stream is not a Low -latency stream, there is no #EXT-X-PRELOAD-HINT.
So your issue is not the same than this ticket

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants