从DTS到AAC的转码时音频丢失

时间:2015-10-02 18:44:11

标签: audio ffmpeg

在Synology硬盘上,我正在尝试使用原生ffmpeg编码器将.MKV文件中的音频从DTS转码到AAC。但没有任何错误消息(至少我不认识这里),输出文件中只缺少音频流。我尝试了几个不同的文件,都有相同的结果,导致我无法看到错误或FFMPEG出错的结论。我使用了随OPKG提供的标准FFMPEG包。 这是我通常得到的输出:

CirkosDaten> ffmpeg -i encodertest.mkv -map 0 -c:v copy -c:s copy -c:a aac 
-strict experimental output.mkv
ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  3 2015 06:25:48 with gcc 4.6.4 (Marvell GCC release 
20150204-c4af733b 64K MAXPAGESIZE ALIGN CVE-2015-0235)
  configuration: --prefix=/usr/syno --incdir='${prefix}/include/ffmpeg' 
--arch=arm --target-os=linux --cross-prefix=/usr/local/arm-marvell-linux-
gnueabi/bin/arm-marvell-linux-gnueabi- --enable-cross-compile --enable-
optimizations --enable-pic --enable-gpl --enable-shared --disable-static 
--enable-version3 --enable-nonfree --enable-libfaac --enable-encoders 
--enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-
muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-
ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-
altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-encoder=zmbv 
--disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed 
--disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 
--disable-decoder=truehd --cc=/usr/local/arm-marvell-linux-gnueabi/bin/arm-
marvell-linux-gnueabi-ccache-gcc

  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.100 / 55. 12.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 79.101 /  3. 79.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.1 : 5.1
Guessed Channel Layout for  Input Stream #0.2 : 5.1
Input #0, matroska,webm, from 'encodertest.mkv':
  Metadata:
    title           : encodingtest
    creation_time   : 2012-09-23 09:38:19
  Duration: 00:01:00.94, start: 0.000000, bitrate: 9624 kb/s
    Chapter #0.0: start 0.000000, end 55.347000
    Metadata:
      title           : 00:00:00.000
    Chapter #0.1: start 55.347000, end 60.936000
    Metadata:
      title           : 00:04:56.171
    Stream #0:0: Video: h264 (High), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : encodingtest
    Stream #0:1(ger): Audio: dts, 48000 Hz, 5.1 (default)
    Metadata:
      title           : DTS
    Stream #0:2(eng): Audio: dts, 48000 Hz, 5.1
    Metadata:
      title           : DTS
    Stream #0:3(ger): Subtitle: subrip (default)
    Metadata:
      title           : Forced Subs
Output #0, matroska, to 'output.mkv':
  Metadata:
    title           : encodingtest
    encoder         : Lavf55.12.100
    Chapter #0.0: start 0.000000, end 55.347000
    Metadata:
      title           : 00:00:00.000
    Chapter #0.1: start 55.347000, end 60.936000
    Metadata:
      title           : 00:04:56.171
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], q=2-31, 23.98 fps, 1k tbn, 1k tbc (default)
    Metadata:
      title           : encodingtest
    Stream #0:1(ger): Subtitle: subrip (default)
    Metadata:
      title           : Forced Subs
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:3 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1461 fps=528 q=-1.0 Lsize=   54636kB time=00:01:00.81 bitrate=7360.1kbits/s    
video:54624kB audio:0kB subtitle:0 global headers:0kB muxing overhead 
0.023249%encodingtest

当我另外设置比特率时,输出显示

Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 
(output.mkv) has not been used for any stream. The most likely reason is 
either wrong type (e.g. a video option with no video streams) or that it is 
a private option of some encoder which was not actually used for any stream.

这表明5.1,48kHz DTS流不会被视为输入。为什么呢?

编辑: DTS解码是否可能在某处关闭?我估计也许这就是我没有错误的原因。但是我没有在输出中看到任何明显的选项。

1 个答案:

答案 0 :(得分:0)

好的,我想我发现了错误:

--disable-decoder=dca

所以编译this armv7 FFmpeg build i used and got via OPKG时没有DCA解码。 可能我需要在我的Disk Station上使用所有编解码器重新编译它:-( - 或者是否有人知道是否可以通过IPKG / OPKG进行升级?

有没有其他人认为自己建造FFmpeg是一种折磨? : - )

编辑:我刚尝试使用the standard 32bit package from the FFmpeg project,实际上它也适用于armv7。问题解决了。