如何通过ffmpeg对没有声音的red5视频进行编码

发布于 2024-08-15 15:02:46 字数 286 浏览 7 评论 0原文

嗨,

我们通过red5服务器录制视频,但没有添加声音(因为没有声音环境)。所以输出的 flv 文件中没有音轨。当我们通过 ffmpeg 将 flv(无音轨)编码为其他视频格式时,会出现编码错误。

错误消息是 找不到编解码器参数(音频:0x0000、0 个通道、s16)

请建议我们如何解决该问题。

  1. 有什么办法 ffmpeg 可以编码无音轨视频 flv 吗?
  2. 即使实际上没有录制声音,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 .

  1. is there any way ffmpeg can encoding no sound track video flv ?
  2. is there any way that red5 server can add sound track even there is actually no sound recorded ?

Thanks !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘和柠 2024-08-22 15:02:46

如果您的问题中有 FFmpeg 命令行,我们可以更好地帮助您。无论如何,回答你的第二个问题:

ffmpeg有什么办法可以编码无音轨视频flv吗?

是的,使用-an开关!

这可以在FFmpeg 文档。您的新命令行将如下所示:

./ffmpeg -i myred5recording.flv -an myoutput.mp4

也可以使用 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:

Is there any way ffmpeg can encoding no sound track video flv?

Yes, with the -an switch!

This can be found in the FFmpeg documentation. Your new command line will look something like this:

./ffmpeg -i myred5recording.flv -an myoutput.mp4

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文