从 DTS 转码到 AAC 时音频丢失

标签 audio ffmpeg

在 Synology 驱动器上,我正在尝试使用 native 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 解码?我想也许这就是我没有错误的原因。但是我在输出中没有看到任何明显的选项。

最佳答案

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

--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。问题解决了。

关于从 DTS 转码到 AAC 时音频丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32913809/

相关文章:

ios - 使用 Web Audio API 时应用程序关闭时的 ionic 背景音频

c++ - 将已采样的吉他弦更改为听起来像是被手稍微阻尼的算法

android - Xuggler:UnsatisfiedLinkError:无法加载xuggle-xuggler:findLibrary返回null

ios - 用于音频测量的 Swift AVFoundation 计时信息

FFMPEG 为视频添加 2 个水印(txt + png)

python - 使用ffmpeg拼接图像形成视频文件时出错

java - 创建用于将所有视频设置为相同大小并添加水印的 FFMPEG 命令?

php - 为什么会出现:警告:printf():第59行的参数太少

audio - 如何将 wav 转换为带有时间码的 mxf 文件?

Delphi:如何捕获 CONSOLE 应用程序的彩色输出?