我有几个视频文件,其中既包含常规 DTS 音轨,又包含 DTS-HD MA 音轨。我想在转码过程中删除 DTS-HD MA 音频流,但还没搞清楚该怎么做。我试过-c:a:codec:DTS copy
,但这也会复制 DTS-HD 音轨。
音频流的排列方式如下:
Stream #0:1(deu): Audio: dts (DTS-HD MA), 48000 Hz, stereo, s32p (24 bit) (default)
Metadata:
title : Stereo
BPS-eng : 1714423
DURATION-eng : 01:26:25.973333333
NUMBER_OF_FRAMES-eng: 486185
NUMBER_OF_BYTES-eng: 1111369156
SOURCE_ID-eng : 001100
_STATISTICS_WRITING_APP-eng: MakeMKV v1.10.8 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2017-12-03 16:23:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(deu): Audio: dts (DTS), 48000 Hz, stereo, fltp, 768 kb/s
Metadata:
title : Stereo
BPS-eng : 768000
DURATION-eng : 01:26:25.973333333
NUMBER_OF_FRAMES-eng: 486185
NUMBER_OF_BYTES-eng: 497853440
SOURCE_ID-eng : 001100
_STATISTICS_WRITING_APP-eng: MakeMKV v1.10.8 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2017-12-03 16:23:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:3(jpn): Audio: dts (DTS-HD MA), 48000 Hz, stereo, s32p (24 bit)
Metadata:
title : Stereo
BPS-eng : 1014690
DURATION-eng : 01:26:25.973333333
NUMBER_OF_FRAMES-eng: 486185
NUMBER_OF_BYTES-eng: 657769964
SOURCE_ID-eng : 001101
_STATISTICS_WRITING_APP-eng: MakeMKV v1.10.8 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2017-12-03 16:23:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:4(jpn): Audio: dts (DTS), 48000 Hz, stereo, fltp, 768 kb/s
Metadata:
title : Stereo
BPS-eng : 768000
DURATION-eng : 01:26:25.973333333
NUMBER_OF_FRAMES-eng: 486185
NUMBER_OF_BYTES-eng: 497853440
SOURCE_ID-eng : 001101
_STATISTICS_WRITING_APP-eng: MakeMKV v1.10.8 linux(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2017-12-03 16:23:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
我有一堆文件要处理,所以我不想手动找出每个文件的映射。我如何拒绝 DTS-HD 流/仅选择 DTS?我试过了如何使用 ffmpeg 或其他基于 Linux 的工具从 DTS-HD MA 音轨中提取 DTS 核心?它不会过滤掉高清音轨。
答案1
如果您的常规 DTS 音轨具有如下所示的固定比特率,
Metadata:
title : Stereo
BPS-eng : 768000
DURATION-eng : 01:26:25.973333333
您可以使用
ffmpeg -in.mkv -c copy -map 0:v -map 0:m:BPS-eng:768000 -map 0:s? out.mkv