ffmpeg WAV到MP3转换后错误的比特率

时间:2015-02-19 20:21:28

标签: audio ffmpeg mp3

我将WAV文件转换为MP3。 ffmpeg的输出表明它被转换为128k比特率,但最终只有32k比特率。

# ffmpeg -i 3.28.09.WAV -acodec libmp3lame -ab 128k 3.28.09.mp3
ffmpeg version 0.8.6-6:0.8.6-1, Copyright (c) 2000-2013 the Libav developers
  built on Mar 24 2013 07:20:17 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[wav @ 0x954f800] max_analyze_duration reached
Input #0, wav, from '3.28.09.WAV':
  Duration: 00:27:07.47, bitrate: 2304 kb/s
    Stream #0.0: Audio: pcm_s24le, 48000 Hz, 2 channels, s32, 2304 kb/s
Incompatible sample format 's32' for codec 'libmp3lame', auto-selecting format 's16'
Output #0, mp3, to '3.28.09.mp3':
  Metadata:
    TSSE            : Lavf53.21.1
    Stream #0.0: Audio: libmp3lame, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
size=   25430kB time=1627.51 bitrate= 128.0kbits/s    
video:0kB audio:25430kB global headers:0kB muxing overhead 0.000495%

原始WAV文件是RIFF(小端)数据,WAVE音频,Microsoft PCM,24位,立体声48000 Hz。

输出MP3文件是ID3版本2.4.0的音频文件,包含:使用文件实用程序检查时的MPEG ADTS,第III层,v1,32 kbps,48 kHz,立体声。我的PHP库getID3也说明了。

# ffmpeg -i 3.28.09.mp3
ffmpeg version 0.8.6-6:0.8.6-1, Copyright (c) 2000-2013 the Libav developers
  built on Mar 24 2013 07:20:17 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[mp3 @ 0x8f56800] max_analyze_duration reached
Input #0, mp3, from '3.28.09.mp3':
  Metadata:
    encoder         : Lavf53.21.1
  Duration: 00:27:07.51, start: 0.000000, bitrate: 128 kb/s
    Stream #0.0: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
At least one output file must be specified

我在这里可能缺少什么想法?

1 个答案:

答案 0 :(得分:0)

原来我使用的ffmpeg版本是通过Debian数据包管理器安装的:

version 0.8.6-6:0.8.6-1
Copyright (c) 2000-2013 the Libav developers
built on Mar 24 2013 07:20:17 with gcc 4.7.2

本地我刚通过Homebrew升级到最新版本:

version 2.5.4
Copyright (c) 2000-2015 the FFmpeg developers
built on Feb 15 2015 20:17:10 with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)