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

When converting RTMP to HLS and generating TS files, there is a possibility of incorrect determination between Annex B and IBMF, which can result in a distorted playback of the generated TS files. #1405

Closed
xiaoninger opened this issue Jul 8, 2019 · 3 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@xiaoninger
Copy link

xiaoninger commented Jul 8, 2019

srs_avc_startswith_annexb determines that if it encounters 000001, it is considered to be in annexb format. It could also be in ibmf format, but the length happens to be the same. For example, 00000122 could possibly be in ibmf format, with a length of 290 bytes.

TRANS_BY_GPT3

@xiaoninger xiaoninger changed the title rtmp转hls生成的ts的时候判断是annexb还是ibmf rtmp转hls生成ts的时候判断是annexb还是ibmf 有可能判断错误,导致生成的ts播放花屏 Jul 8, 2019
@winlinvip
Copy link
Member

Make sense.

@winlinvip winlinvip added the Bug It might be a bug. label Dec 1, 2020
@winlinvip winlinvip added this to the SRS 4.0 release milestone Dec 1, 2020
@Antony-An
Copy link

Antony-An commented May 16, 2022

Have you ever encountered the annexb format in rtmp?
Is it possible to use the annexb format only when consecutive n frames are annexb? Are there any other better methods?
I feel like no matter what we do, there will always be a possibility of misjudgment.

TRANS_BY_GPT3

@winlinvip winlinvip modified the milestones: 4.0, 5.0 Sep 1, 2022
@winlinvip winlinvip assigned winlinvip and unassigned wenjiegit Sep 1, 2022
@winlinvip
Copy link
Member

winlinvip commented Sep 1, 2022

SRS 5.0, add a new configuration to specify guessing IMBF first:

vhost __defaultVhost__ {
    publish {
        # When parsing SPS/PPS, whether try ANNEXB first. If not, try IBMF first, then ANNEXB.
        # default: on
        try_annexb_first on;
    }
}

Today, a friend encountered a screen flickering issue, and it was found that there was an extra byte in the TS, causing an abnormal GOP.

image

TRANS_BY_GPT3

@winlinvip winlinvip changed the title rtmp转hls生成ts的时候判断是annexb还是ibmf 有可能判断错误,导致生成的ts播放花屏 When converting RTMP to HLS and generating TS files, there is a possibility of incorrect determination between Annex B and IBMF, which can result in a distorted playback of the generated TS files. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

5 participants