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

Solve the problem of inaccurate HLS TS duration. v5.0.187 v6.0.87 #3824

Merged
merged 16 commits into from
Oct 9, 2023

Conversation

winlinvip
Copy link
Member

@winlinvip winlinvip commented Oct 7, 2023

  1. The comment on the ratio configuration says it can affect the slice duration, but there is no effect after configuring it.
  2. The default hls_td_ratio is 1.5, and after setting it to 1, the duration is still slightly more than 10 seconds.
  3. Even if the GOP is an integer, like 1 second, the slice is still a non-integer, like 0.998 seconds, which seems a bit unreliable.
  4. In the duration of the TS in the m3u8 file, it is one frame less than the duration of the slice.
  5. Set hls_dispose to 120s to dispose HLS files when no stream.
  6. Use docker.conf for docker.

Before this patch:

#EXTINF:10.983, no desc
livestream-0.ts?hls_ctx=3p095hq0

After this patch:

#EXTINF:10.000, no desc
livestream-0.ts?hls_ctx=3p095hq0

Note: If the fragment is set to 10 seconds, but the GOP size cannot be divided by 10, such as not 1, 2, 5, or 10, then the duration of ts will still be more than 10 seconds.


Co-authored-by: john hondaxiao@tencent.com

1. The comment on the ratio configuration says it can affect the slice duration, but there is no effect after configuring it.
2. The default hls_td_ratio is 1.5, and after setting it to 1, the duration is still slightly more than 10 seconds.
3. Even if the GOP is an integer, like 1 second, the slice is still a non-integer, like 0.998 seconds, which seems a bit unreliable.
4. In the duration of the TS in the m3u8 file, it is one frame less than the duration of the slice.
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Oct 7, 2023
@winlinvip
Copy link
Member Author

winlinvip commented Oct 7, 2023

We need to merge into 5 and 6.

TRANS_BY_GPT4

@xiaozhihong xiaozhihong changed the title Solve the problem of inaccurate HLS TS duration Solve the problem of inaccurate HLS TS duration. v6.0.86 Oct 8, 2023
@xiaozhihong xiaozhihong added the RefinedByAI Refined by AI/GPT. label Oct 8, 2023
@xiaozhihong xiaozhihong changed the title Solve the problem of inaccurate HLS TS duration. v6.0.86 Solve the problem of inaccurate HLS TS duration. v5.0.185 v6.0.87 Oct 8, 2023
@xiaozhihong xiaozhihong changed the title Solve the problem of inaccurate HLS TS duration. v5.0.185 v6.0.87 Solve the problem of inaccurate HLS TS duration. v5.0.187 v6.0.87 Oct 8, 2023
@xiaozhihong xiaozhihong merged commit a1e4f61 into ossrs:develop Oct 9, 2023
17 checks passed
duiniuluantanqin pushed a commit to duiniuluantanqin/srs that referenced this pull request Oct 11, 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. RefinedByAI Refined by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants