将 DTS 转换为 AC3,但前提是容器中不存在 AC3 轨道

发布于 2025-01-20 13:22:22 字数 505 浏览 3 评论 0原文

我的声音系统不支持DTS AC3。我正在使用bash自动执行该过程,该过程可以检测到电影添加到文件夹,使用此命令(其中一个部分)下载字幕并将音轨转换为AC3:

ffmpeg -i“ {{emotept}}}” -map 0:v -map 0:a:0 -map 0:a -map 0:s -c:v copy -c:a copy -c:s copy -c:a:0 ac3 -b:a:a:0 640k” {{directory}}“/{{Eppision_name}} temp2.​​mkv

这无问题,我最终得到了一个.MKV文件,其中包含原始DTS音频轨道和新创建的AC3音频轨道。问题是,某些文件已经包含AC3和DTS轨道,在这种情况下,我最终获得了两个AC3轨道和一个DTS轨道。另一个问题是,每当字幕更新时,都会触发此命令。因此,该命令可能会在几天的时间内多次执行,并且容器将具有X号AC3轨道。

在我从上方启动命令之前,我需要一种方法来检测文件是否已经包含AC3轨道,但是我不确定该命令是什么。任何帮助都将受到赞赏!

I have sound system that does not support DTS only AC3. I'm automating the process using bash that detects when movie was added to folder, downloads subtitles and converts audio track to AC3 using this command (one part of it):

ffmpeg -i "{{episode}}" -map 0:v -map 0:a:0 -map 0:a -map 0:s -c:v copy -c:a copy -c:s copy -c:a:0 ac3 -b:a:0 640k "{{directory}}"/{{episode_name}}temp2.mkv

This works without issue and I end up with a .mkv file that contains original DTS audio track and newly created AC3 audio track. The issue is that some files already contain both AC3 and DTS tracks and in those cases I end up with two AC3 tracks and one DTS track. Another issue is that this command is triggered every time there is update to subtitles. So it's possible that the command will execute multiple times in a period of a few days and the container will have X number of the AC3 tracks.

I need a way to detect if file already contains AC3 track before I initiate command from above, but I'm not sure what the command would be. Any help is appreciated!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文