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

[BUG] Strange loading error for HLS stream with 4 second fragments #406

Open
david-molnar-oculai opened this issue Sep 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@david-molnar-oculai
Copy link

We're using this producer library to send frames to AWS Kinesis Video. The stream's resolution is 2560x1920 and has 1 FPS with 1 Mbps max bitrate. The stream plays perfectly fine when using HLS streaming.

We're producing a key frame (IDR) every 16 seconds. This results in 16 second fragments. The stream plays perfectly fine when using HLS streaming.

However, we tried to switch to shorter fragments, e.g. 4s. We did this, by producing a key frame every 4 frame instead of 16. This works. The only problem is, that when playing the stream using HLS, the first 3 seconds plays and then the loading spinner appears for a few seconds. After that, the stream plays without any loading spinner for a longer period of time. This behaviour happens almost always when playing the stream.

We want to switch to shorter fragments to fix this issue: #399.

What could be the cause of this strange behaviour?

@david-molnar-oculai david-molnar-oculai added the bug Something isn't working label Sep 5, 2023
@stefankiesz
Copy link
Contributor

Hi Dávid, can you please provide the full command parameters used for the GetHLSStreamingSessionURL request?

@david-molnar-oculai
Copy link
Author

Here are the params:

StreamName=<stream_id>,
PlaybackMode="LIVE",
ContainerFormat="FRAGMENTED_MP4",
DiscontinuityMode="ON_DISCONTINUITY",
DisplayFragmentTimestamp="NEVER",
Expires=3600,
MaxMediaPlaylistFragmentResults=5000,

@stefankiesz
Copy link
Contributor

stefankiesz commented Apr 9, 2024

We recommend that a live HLS media playlist have a minimum of 3 fragments and a maximum of 10 fragments.

Per the above GetHLSStreamingSessionURL recommendation, can you please try with a MaxMediaPlaylistFragmentResults less than 10.

Also, can you please report whether you still see the loading issue happen when DiscontinuityMode is set to ALWAYS and NEVER? I'd like to rule out discontinuities in the first fragments as being the cause of this.

@david-molnar-oculai
Copy link
Author

The behavior is the same with DiscontinuityMode set to ON_DISCONTINUITY, ALWAYS or NEVER. Tried also with MaxMediaPlaylistFragmentResults set to 3, 5, 8 and 10. No change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants