ffmpeg把wav转为pcm

来源:互联网 发布:mac怎么删除office 编辑:程序博客网 时间:2024/06/06 20:21
root@Ubuntu32:/home/zhangbin/ffmpeg/ffmpegx86/ffmpegHome/bin# ./ffmpeg -i ../file.wav -f s16be -ar 8000 -acodec pcm_s16be ../file.raw
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 16 2013 19:40:09 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/zhangbin/ffmpeg/ffmpegx86/ffmpegHome --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-runtime-cpudetect --enable-gray --enable-avresample --enable-x11grab --enable-bzlib --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib --enable-pic --enable-libfaac --enable-libass --enable-libfaac --enable-librtmp --enable-openssl
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wav @ 0x8fe74a0] max_analyze_duration 5000000 reached at 5015510 microseconds
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from '../file.wav':
  Duration: 00:00:43.75, bitrate: 705 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, stereo, s16, 705 kb/s
Output #0, s16be, to '../file.raw':
  Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0: Audio: pcm_s16be, 8000 Hz, stereo, s16, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16be)
Press [q] to stop, [?] for help
size=    1367kB time=00:00:43.74 bitrate= 256.0kbits/s    
video:0kB audio:1367kB subtitle:0 global headers:0kB muxing overhead 0.000000%

root@Ubuntu32:/home/zhangbin/ffmpeg/ffmpegx86/ffmpegHome/bin# 




参考http://delog.wordpress.com/2011/11/04/convert-wav-to-pcm-using-ffmpeg/

原创粉丝点击