ffmpeg 将 mp3 转换为 aac 时出现错误

ffmpeg 将 mp3 转换为 aac 时出现错误

我一直在使用此解决方案将 mp3 转换为 aac。到目前为止,它运行良好。但是,我有许多文件一直出现以下错误:

[ipod @ 0x7fe585819600] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x7fe58581a800] using SAR=1/1
[libx264 @ 0x7fe58581a800] MB rate (92160000) > level limit (16711680)
[libx264 @ 0x7fe58581a800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fe58581a800] profile High 4:4:4 Predictive, level 6.2, 4:4:4, 8-bit
[libx264 @ 0x7fe58581a800] 264 - core 161 r3048 b86ae3c - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=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 chroma_qp_offset=4 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 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[ipod @ 0x7fe585819600] Could not find tag for codec h264 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 -- 

源文件是普通的mp3文件:

Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Duration                                 : 6 min 47 s
Bit rate mode                            : Constant
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Frame rate                               : 38.281 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 4.66 MiB (98%)

我尝试过普通 aac 和 he-aac

ffmpeg -i "$i" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 80k "${i%.mp3}.m4b"
ffmpeg -i "$i" -c:a libfdk_aac -b:a 128k "${i%.mp3}.m4b"

对于导致此错误的原因您有什么想法吗?

答案1

有一个封面图像,ffmpeg 将尝试将其转换为常规视频流。添加-c:v png -vsync 0

相关内容