开发者

FFMpeg - Unsupported codec for output stream #0.0

I am attempting to convert a .WAV file to .MP3 using the FFmpeg library. I am attempting this on a Ubunto installation. I have installed FFMpeg using this command

sudo apt-get install ffmpeg

There see开发者_JAVA技巧ms to be some sort of problem tho since it says that there is some sort of unsopported codec. And also the .mp3 file generated is o 0bytes in size. Some other posts suggested I need to install the libavcodec-unstripped-51 package. Is this correct and if so how do I do this?

me@framework:/var/www/wavtest$ ffmpeg -i test.wav -ab 128k test.mp3
    FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6.2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Apr 23 2010 15:08:34, gcc: 4.3.3
    Input #0, wav, from 'test.wav':
      Duration: 00:00:07.55, bitrate: 88 kb/s
        Stream #0.0: Audio: pcm_u8, 11025 Hz, mono, s16, 88 kb/s
    Output #0, mp3, to 'test.mp3':
        Stream #0.0: Audio: 0x0000, 11025 Hz, mono, s16, 128 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
    Unsupported codec for output stream #0.0


The ffmpeg avcodec libraries come in many separate packages: libavutil, libavcodec, libavfilter, libavformat, and libavdevice. For versions of Ubuntu 9.10 and older, these packages came in "unstripped" versions (i.e. libavutil-unstripped, libavfilter-unstriped, etc.)

Versions of Ubuntu starting with 10.04 and newer have renamed the "unstripped" packages to "extra" packages, such as libavcodec-extra. However, if you don't know which version you have, you can just install the unstripped ones, and they will automatically install the -extra packages for you instead.

Just launch the package manager (either Software Center or Synaptic,) and search for "libav." Find the packages with "unstripped-51" in their name and install those.

From the command line, you can use aptitude's pattern matching like this:

sudo aptitude install unstripped-51
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜