FFMPEG-将DTS -Audio转换为AC3 - 但请保留原始视频和音频文件

发布于 2025-01-23 22:40:00 字数 218 浏览 2 评论 0原文

“ https://ffmpeg.org/ffmpeg.html”上理解文档。

我很难在

到目前为止
C:\ffmpeg\bin\ffmpeg.exe -i File.mkv -map 0 -vcodec copy -scodec copy -acodec ac3 -b:a 640k File.mkv

i am having trouble to understand the documentation on FFMPEG-Website

Can you please help me out?

So far i got an working command for converting the DTS to AC3 but overwrite the original DTS

C:\ffmpeg\bin\ffmpeg.exe -i File.mkv -map 0 -vcodec copy -scodec copy -acodec ac3 -b:a 640k File.mkv

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

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

发布评论

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

评论(1

嘦怹 2025-01-30 22:40:00

您需要两次映射音频流并指定需要重新编码的哪个音频流:

ffmpeg -i File.mkv -map 0 -map 0:a -c copy -c:a:1 ac3 -b:a:1 640k File.mkv

使用-C复制产生最紧凑的CLI命令,但会产生可忽略的警告:

Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 3, only the last option '-c:a:1 ac3' will be used.

如果这困扰您,您可以指定每个相反:

-c:v copy -c:a copy -c:a:0 copy -c:a:1 ac3

上面的所有内容都假定要先呈现原始音频流。如果要交换其订单,只需交换a:0a:1到处都是。

You need to map the audio stream twice and specify which audio stream needs to be reencoded:

ffmpeg -i File.mkv -map 0 -map 0:a -c copy -c:a:1 ac3 -b:a:1 640k File.mkv

Using -c copy yields the most compact cli command but produces an ignorable warning:

Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 3, only the last option '-c:a:1 ac3' will be used.

If this bothers you, you can specify each separately instead:

-c:v copy -c:a copy -c:a:0 copy -c:a:1 ac3

All above assume that the original audio stream to be presented first. If you want to swap their order, just swap a:0 and a:1 everywhere.

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