我有一些.mkv
包含 FLAC 格式的 6.1 音频的文件。mediainfo
将这些文件中的音轨报告为:
Audio
ID : 2
Format : FLAC
Format/Info : Free Lossless Audio Codec
Codec ID : A_FLAC
Duration : 2mn 29s
Bit rate mode : Variable
Channel(s) : 7 channels
Channel positions : Front: L C R, Side: L R, Back: C, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Delay relative to video : 14ms
Writing library : libFLAC 1.3.0 (UTC 2013-05-26)
Language : English
Default : Yes
Forced : No
我还有一个“家庭影院”6.1 amp(Sony STR-DE895,如果有人关心的话),它通过以下格式的 S/PDIF(光纤和同轴电缆)连接本机接受数字音频:
- PCM(在 S/PDIF 上限制为 2 个通道)
- 数字电视 (5.1)
- DTS-ES (6.1)
- NEO6 (6.1)
- 杜比数字 (5.1)
- 数字-EX (6.1)
- 专业逻辑二
我想让这些.mkv
文件从放大器驱动所有 6.1 扬声器,但如果我.mkv
使用如下命令转换文件:
ffmpeg -i Input.FLAC.6.1.mkv -c:s copy -c:v copy -c:a ac3 Output.AC3.6.1.mkv
然后我得到 5.1 音频,即我失去了中央后置声道。每mediainfo
:
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 2mn 29s
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 9ms
Stream size : 8.00 MiB (9%)
Writing library : Lavc57.107.100 ac3
Language : English
Default : Yes
Forced : No
DURATION : 00:02:29.768000000
NUMBER_OF_FRAMES : 1755
NUMBER_OF_BYTES : 56974307
_STATISTICS_WRITING_APP : mkvmerge v8.2.0 ('World of Adventure') 64bit
_STATISTICS_WRITING_DATE_UTC : 2015-08-01 13:29:10
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
注意它是如何变化的:
Channel(s) : 7 channels
Channel positions : Front: L C R, Side: L R, Back: C, LFE
至:
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
如果我尝试强制使用-ac 7
我得到的频道数量:
[ac3 @ 0x43f2a40] Specified channel layout '6.1' is not supported
尝试转换为DTS
具有完全相同的结果。即替换:
-c:a ac3
和:
-strict experimental -c:a dts
结果mediainfo
:
Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 2mn 29s
Bit rate mode : Constant
Bit rate : 1 413 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 14ms
Stream size : 25.2 MiB (23%)
Writing library : Lavc57.107.100 dca
Language : English
Default : Yes
Forced : No
DURATION : 00:02:29.774000000
NUMBER_OF_FRAMES : 1755
NUMBER_OF_BYTES : 56974307
_STATISTICS_WRITING_APP : mkvmerge v8.2.0 ('World of Adventure') 64bit
_STATISTICS_WRITING_DATE_UTC : 2015-08-01 13:29:10
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
并尝试强制 6.1-ac 7
导致与上述相同的'6.1' is not supported
错误。
$ ffmpeg -version
ffmpeg version 3.4.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.4.0 (Debian 6.4.0-10) 20171112
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
那么,如何将.mkv
文件中的音频转换为系统支持的格式,同时保留 6.1 声道格式?