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

Ffmpeg pushes RTMP with error conversion failed #257

Merged
merged 5 commits into from
Jul 30, 2022

Conversation

gh-sxp
Copy link
Contributor

@gh-sxp gh-sxp commented Jul 30, 2022

PR描述:

ffmpeg 长时间推送rtmp音视频流,导致ffmpeg 报错av_interleaved_write_frame(): End of file,进而导致程序退出 error conversion failed。

详细描述:

原因:ffmpeg 通过av_interleaved_write_frame将音视频数据通过librtmp库函数RTMP_Write将数据发送到rtmp服务器。RTMP_Write内部会检查buffer数据大小,当size小于11时,RTMP_Write返回false,进而导致av_interleaved_write_frame函数返回AVERROR_EOF,该bug出现。
解决方法:当RTMP_Write返回false时,如果因为size太小的原因导致,不再返回AVERROR_EOF,继续运行,忽略该错误。至于什么原因导致的此次传输buffer size太小,暂不细究。

关联issue:

fix #256

@gh-sxp gh-sxp added the bug Something isn't working label Jul 30, 2022
@gh-sxp gh-sxp added this to the v1.8 milestone Jul 30, 2022
@zhangxiaojingCAN zhangxiaojingCAN merged commit cf8df6e into kendryte:dev Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rtmp推视音视频流, 4个小时左右,会出现Conversion failed
3 participants