本文介绍了FFmpeg的:而来自AC3编码音频流为AAC时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的命令连接code我的视频H264和AAC音频codeC:

I am using following command to encode my video to h264 and aac audio codec :

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

以下是我在控制台收到错误的痕迹。

Following is a trace of the error i am getting at the console.

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

我真的无法找到什么可能可能是错的。我不想复制音频codeC,我想带code从 AC3 AAC

还有什么建议,使之无损

推荐答案

libvo_aacenc 最多可支持2通道,你必须在你的源5.1。尝试设置 -ac 2 明确,甚至更好的使用 libfdk_aac ,而不是这是大大优于。如果不可用,您可以使用本机FFmpeg的AAC EN codeR与 -c:它最多8个通道支持:-strict实验 A AAC。请参见获得更多信息。

libvo_aacenc supports up to 2 channels and you have 5.1 in your source. Try to set -ac 2 explicitly or even better use libfdk_aac instead which is vastly superior. If it is not available you can use the native FFmpeg AAC encoder with -c:a aac -strict experimental: it supports up to 8 channels. See FFmpeg Wiki: AAC for more info.

AAC 提供的有损 COM pression,使用FLAC来代替,如果你需要无损。

AAC offers lossy compression, use FLAC instead if you need lossless.

另外,我希望你买你翻录蓝光射线;)

Also, I hope you bought the blu-rays you're ripping ;)

这篇关于FFmpeg的:而来自AC3编码音频流为AAC时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 12:57