如何在 Ubuntu 上配置 ffmpeg 将 3GP 文件转换为 PCM WAV?

如何在 Ubuntu 上配置 ffmpeg 将 3GP 文件转换为 PCM WAV?

我正在使用 Ubuntu 10.04。我需要将 .3gp 文件转换为 PCM WAV。为此,我使用了 ffmpeg。

当使用它从存储库安装时,aptitude install ffmpeg它会安装它的一些基本版本,而我无法转换我需要的内容。

我安装了最新的 yasm ver.1.1.0 和最新的 x264 - 0.125.2208。之后我使用 git 从官方主页git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

我尝试自己使用以下命令配置 ffmpeg:

./configure --enable-gpl --enable-version3 --enable-postproc 
--enable-nonfree --enable-swscale --enable-pthreads --enable-libmp3lame 
--enable-libx264 --enable-libopencore-amrnb --enable-libopencore-amrwb

然后:time make && make install

到现在为止一切都还好。转换后

ffmpeg -i audiotest.3gp -f s16le -ar 8000 -acodec pcm_s16le audio.wav

我想要检查有关此 PCM *.wav 文件的信息(ffmpeg -i audio.wav)但出现了此错误:

~# ffmpeg -i audio.wav

ffmpeg version N-42619-g6b7849e Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul 21 2012 00:50:52 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-postproc --enable-nonfree --enable-swscale --enable-pthreads --enable-libmp3lame --enable-libx264 --enable-libopencore-amrnb --enable-libopencore-amrwb

  libavutil      51. 65.100 / 51. 65.100
  libavcodec     54. 41.100 / 54. 41.100
  libavformat    54. 17.100 / 54. 17.100
  libavdevice    54.  1.100 / 54.  1.100
  libavfilter     3.  2.100 /  3.  2.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[aac @ 0x943d4e0] Format aac detected only with low score of 1, misdetection possible!
[aac @ 0x9443740] channel element 0.0 is not allocated
    Last message repeated 2 times
[aac @ 0x9443740] More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Number of bands (16) exceeds limit (4).
[aac @ 0x9443740] Number of bands (7) exceeds limit (2).
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] SSR not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x9443740] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[aac @ 0x9443740] channel element 2.0 is not allocated
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] channel element 0.0 is not allocated
[aac @ 0x9443740] Number of bands (31) exceeds limit (1).
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Number of bands (16) exceeds limit (2).
[aac @ 0x9443740] channel element 0.7 is not allocated
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Number of scalefactor bands in group (62) exceeds limit (41).
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] channel element 0.2 is not allocated
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] channel element 0.15 is not allocated
[aac @ 0x9443740] Pulse data corrupt or invalid.
[aac @ 0x9443740] Number of scalefactor bands in group (48) exceeds limit (41).
[aac @ 0x9443740] channel element 2.0 is not allocated
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Number of bands (16) exceeds limit (4).
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Reserved bit set.
    Last message repeated 1 times
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] channel element 2.0 is not allocated
[aac @ 0x9443740] Number of bands (31) exceeds limit (4).
[aac @ 0x9443740] Pulse data corrupt or invalid.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] SSR not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x9443740] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] channel element 0.0 is not allocated
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] channel element 0.3 is not allocated
[aac @ 0x9443740] Pulse data corrupt or invalid.
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Number of bands (35) exceeds limit (16).
[aac @ 0x9443740] Number of scalefactor bands in group (63) exceeds limit (41).
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] channel element 0.0 is not allocated
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] channel element 0.0 is not allocated
[aac @ 0x9443740] Number of bands (38) exceeds limit (10).
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] channel element 0.2 is not allocated
[aac @ 0x9443740] channel element 0.7 is not allocated
[aac @ 0x9443740] Reserved bit set.
    Last message repeated 2 times
[aac @ 0x9443740] channel element 0.2 is not allocated
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Reserved bit set.
    Last message repeated 1 times
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] decode_band_types: Input buffer exhausted before END element found
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Error decoding AAC frame header.
    Last message repeated 1 times
[aac @ 0x9443740] Reserved bit set.
    Last message repeated 1 times
[aac @ 0x9443740] Number of bands (4) exceeds limit (1).
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Reserved bit set.
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x9443740] Number of bands (31) exceeds limit (8).
[aac @ 0x9443740] Invalid Predictor Reset Group.
[aac @ 0x9443740] Number of bands (31) exceeds limit (2).
[aac @ 0x9443740] Number of bands (28) exceeds limit (1).
[aac @ 0x9443740] channel element 0.0 is not allocated
[aac @ 0x9443740] Input buffer exhausted before END element found
[aac @ 0x9443740] Number of bands (16) exceeds limit (2).
[aac @ 0x9443740] Error decoding AAC frame header.
[aac @ 0x943d4e0] decoding for stream 0 failed
[aac @ 0x943d4e0] Could not find codec parameters for stream 0 (Audio: aac, 4.0, s16, 383 kb/s): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[aac @ 0x943d4e0] Estimating duration from bitrate, this may be inaccurate
audio.wav: could not find codec parameters

有人能帮我吗?我做错了什么?

答案1

正如第一条错误消息所暗示的:

Format aac detected only with low score of 1, misdetection possible!

-f它错误地检测了输入文件类型。使用如下选项指定输入文件格式:

ffmpeg -f s16le -i input.wav

而且它应该能更好地发挥作用。

但是,如果您只是想获取有关文件的信息,您应该使用FF探针相反。它通常与 FFmpeg 一起打包,采用类似的选项并以更易于解析的格式提供信息。-show_format-show_streams选项应该会为您提供有关文件的大部分信息。

相关内容