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

Change the hls_aof_ratio to 2.1. v5.0.200 v6.0.101 #3886

Merged
merged 2 commits into from
Nov 19, 2023

Conversation

winlinvip
Copy link
Member

@winlinvip winlinvip commented Nov 19, 2023

In pure audio mode, there are no keyframes. Therefore, we can only rely on the length of the slice to determine whether it should be output. hls_aof_ratio is the coefficient that, once reached, will generate a new slice.

In scenarios with video, if the hls_aof_ratio is too small, for example 1.2, and the GOP (Group of Pictures) is 10 seconds, then a slice will definitely be generated at 12 seconds. At this point, if there are no keyframes, it will cause the next slice to start with a non-keyframe.

A safer coefficient is twice the GOP (Group of Pictures). This way, it won't trigger incorrectly and prevent the individual transcoding of a ts segment file.


TRANS_BY_GPT4


Co-authored-by: Haibo Chen 495810242@qq.com

@winlinvip winlinvip changed the title Change the hls_aof_ratio to 2.1 HLS: Change the hls_aof_ratio to 2.1 Nov 19, 2023
@winlinvip winlinvip changed the title HLS: Change the hls_aof_ratio to 2.1 Change the hls_aof_ratio to 2.1 Nov 19, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Nov 19, 2023
@winlinvip winlinvip changed the title Change the hls_aof_ratio to 2.1 Change the hls_aof_ratio to 2.1. v5.0.200 v6.0.101 Nov 19, 2023
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Nov 19, 2023
@winlinvip winlinvip merged commit 8865ddd into ossrs:develop Nov 19, 2023
17 checks passed
winlinvip added a commit that referenced this pull request Nov 19, 2023
In pure audio mode, there are no keyframes. Therefore, we can only rely
on the length of the slice to determine whether it should be output.
`hls_aof_ratio` is the coefficient that, once reached, will generate a
new slice.

In scenarios with video, if the `hls_aof_ratio` is too small, for
example 1.2, and the GOP (Group of Pictures) is 10 seconds, then a slice
will definitely be generated at 12 seconds. At this point, if there are
no keyframes, it will cause the next slice to start with a non-keyframe.

A safer coefficient is twice the GOP (Group of Pictures). This way, it
won't trigger incorrectly and prevent the individual transcoding of a ts
segment file.

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RefinedByAI Refined by AI/GPT. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants