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

bugfix: hls ts segment does not start with key frame for a stream with audio and video #3040

Open
wants to merge 1 commit into
base: 4.0release
Choose a base branch
from

Conversation

peipeiguo
Copy link

@peipeiguo peipeiguo commented May 16, 2022

bugfix: hls ts segment does not start with key frame for a stream with audio and video.

  • my hls config as below:
vhost __defaultVhost__ {
    hls {
        enabled         on;
        hls_fragment    6;
        hls_td_ratio    1.0;
        hls_aof_ratio   1.0;
        hls_window      30;
        hls_path        ./objs/nginx/html;
        hls_m3u8_file   [app]/[stream]/[stream].m3u8;
        hls_ts_file     [app]/[stream]/[stream]-[2006][01][02][15][04]-[seq].ts;
        hls_ts_floor    off;
    }
}
  • bug description as below:
    For a stream with audio and video, some ts segment not start with key frame.

  • root cause is as below:
    reap_segment is triggered both in write_audio and write_video.
    is_segment_absolutely_overflow true when write audio. it is early then is_segment_overflow when write video.

  • bug fix solution as below:
    is_segment_absolutely_overflow should only check for a stream with pure audio.

@winlinvip winlinvip force-pushed the 4.0release branch 2 times, most recently from 7e5cace to cd85a96 Compare June 29, 2022 23:43
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants