audio - FFmpeg : Error occurred while encoding audio stream from ac3 to aac

标签 audio ffmpeg

我正在使用以下命令将我的视频编码为 h264 和 aac 音频编解码器:

ffmpeg -i sample.mp4 -codec:v libx264 -profile:v high -level:v 4.0 -codec:a libvo_aacenc -b:a 128k output_file.mp4

以下是我在控制台上遇到的错误的跟踪。

Input #0, mpegts, from 'sample.mp4':
  Duration: 00:00:58.08, start: 1.000033, bitrate: 17290 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1
080 [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fl
tp, 448 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
[libx264 @ 003dc660] using SAR=1/1
[libx264 @ 003dc660] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 003dc660] profile High, level 4.0
[libx264 @ 003dc660] 264 - core 130 r2274 c832fe9 - H.264/MPEG-4 AVC codec - Cop
yright 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 de
block=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1
me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chr
oma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1
 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=
1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scen
ecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmi
n=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libvo_aacenc @ 03c3c640] Unable to set encoding parameters
Output #0, mp4, to 'output_file.mp4':
    Stream #0:0: Video: h264, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 90
k tbn, 29.97 tbc
    Stream #0:1: Audio: aac, 48000 Hz, 5.1(side), s16, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> libvo_aacenc)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters
such as bit_rate, rate, width or height

我真的找不到可能出什么问题。我不想复制音频编解码器,我希望将其从 ac3 编码为 aac

还有任何使其无损的建议

最佳答案

libvo_aacenc 支持最多 2 个 channel ,并且源中包含 5.1。尝试显式设置 -ac 2 ,甚至更好地使用 libfdk_aac 来代替,这是非常优越的。如果不可用,您可以使用带有 -c:a aac -strictexperimental 的原生 FFmpeg AAC 编码器:它最多支持 8 个 channel 。请参阅FFmpeg Wiki: AAC了解更多信息。

AAC 提供有损压缩,如果需要无损压缩,请使用 FLAC。

另外,我希望您购买了正在翻录的蓝光光盘;)

关于audio - FFmpeg : Error occurred while encoding audio stream from ac3 to aac,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31429314/

相关文章:

ios4 - MIME类型音频/mpeg不流式传输?

html - 可以使用多个音频标签吗

java - android实时获取声音频率?

c++ - SFML 内部 OpenAL 错误

PHP - 主动刷新 exec 函数结果?

PHP FFMPEG 如何在转换前根据比特率和持续时间计算视频的文件大小?

javascript - 如何将Javascript变量作为音频播放器播放的mp3文件传递

FFMPEG 将带有 alpha channel 的 .avi/.mov 编码为 .3g2(保留 alpha)

asp.net - ffmpeg 读取文件大小

FFMPEG:无限循环播放多个视频