如何通过ffmpeg对没有声音的red5视频进行编码
嗨,
我们通过red5服务器录制视频,但没有添加声音(因为没有声音环境)。所以输出的 flv 文件中没有音轨。当我们通过 ffmpeg 将 flv(无音轨)编码为其他视频格式时,会出现编码错误。
错误消息是 找不到编解码器参数(音频:0x0000、0 个通道、s16)
请建议我们如何解决该问题。
- 有什么办法 ffmpeg 可以编码无音轨视频 flv 吗?
- 即使实际上没有录制声音,red5服务器有什么方法可以添加音轨吗?
谢谢 !
HI
We recorded video via red5 server but no sound added ( because there was no sound environment ) . So there is no sound track in output flv file. and there is encoding error when we do encoding that flv ( no sound track ) into other video format via ffmpeg .
error message is
Could not find codec parameters (Audio: 0x0000, 0 channels, s16)
Pls advice us how to solve the problem .
- is there any way ffmpeg can encoding no sound track video flv ?
- is there any way that red5 server can add sound track even there is actually no sound recorded ?
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的问题中有 FFmpeg 命令行,我们可以更好地帮助您。无论如何,回答你的第二个问题:
是的,使用
-an
开关!这可以在FFmpeg 文档。您的新命令行将如下所示:
也可以使用 FFmpeg '混入'音频,但这相对于仅使用
-an
开关来说并不简单。如果您想从这个角度探讨,请查看其他一些 Stack Overflow 问题,例如 如何使用 ffmpeg 将音频 (mp3) 添加到 flv(仅视频)?We could better assist you if you had your FFmpeg command line in your question. Regardless, to answer your second question:
Yes, with the
-an
switch!This can be found in the FFmpeg documentation. Your new command line will look something like this:
It is also possible to 'mux in' audio with FFmpeg, but that is non-trivial relative to just using the
-an
switch. If you want to pursue this angle, the have a look at some other Stack Overflow questions, such as How can I add audio (mp3) to a flv (just video) with ffmpeg?