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

关于replace_startcode_with_nalulen的热点较高 #41

Open
magicffourier opened this issue Jan 19, 2022 · 0 comments
Open

关于replace_startcode_with_nalulen的热点较高 #41

magicffourier opened this issue Jan 19, 2022 · 0 comments

Comments

@magicffourier
Copy link

magicffourier commented Jan 19, 2022

注意:提问前,请先看FAQ(Please read FAQ before file an issue) ossrs/srs#2716

描述(Description)

关于对于推送高码率视频和推流多了造成的replace_startcode_with_nalulen在perf上的热点比较高的问题,算抛砖引玉提出几个可行的优化方案,请大佬们轻拍。

  1. SRS版本(Version): srs-gb28181

  2. SRS的日志如下(Log):

  1. SRS的配置如下(Config):

重现(Replay)

重现Bug的步骤(How to replay bug?)
关于优化https://github.com/ossrs/srs-gb28181/blob/feature/gb28181/trunk/src/app/srs_app_gb28181.cpp#L1303-L1310`
有个需要考虑的点,即单frame是否是单slice,那么对于国标存在几种情况:

  1. 单frame多slices的编码器策略,那么一个gop中只要idr是多slices那么之后国标流的p帧也是多slices
  2. 编码特性上使用dp,我们使用的ffmpeg并不能解dp的编码策略,考虑到对标ffmpeg,这个情况可以不处理

那么就可以通过对idr的解析判断gop中是否一个slice为一帧来加速

期望行为(Expect)

降低replace_startcode_with_nalulen在perf上的热点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant