FFMpeg - 输出流 #0.0 不支持的编解码器
我正在尝试使用 FFmpeg 库将 .WAV 文件转换为 .MP3。我正在 Ubunto 安装上尝试此操作。我已经使用此命令安装了 FFMpeg
sudo apt-get install ffmpeg
似乎存在某种问题,因为它说存在某种不支持的编解码器。而且生成的 .mp3 文件大小为 0 字节。其他一些帖子建议我需要安装 libavcodec-unstripped-51 包。这是正确的吗?如果是,我该怎么做?
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
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 seems 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ffmpeg avcodec 库包含在许多单独的包中:libavutil、libavcodec、libavfilter、libavformat 和 libavdevice。对于 Ubuntu 9.10 及更早版本,这些软件包采用“未剥离”版本(即 libavutil-unstripped、libavfilter-unstriped 等)。
从 10.04 及更高版本开始的 Ubuntu 版本已将“未剥离”软件包重命名为“额外”软件包,例如 libavcodec-extra。但是,如果您不知道自己拥有哪个版本,则可以只安装未剥离的版本,它们会自动为您安装 -extra 软件包。
只需启动包管理器(软件中心或 Synaptic)并搜索“libav”。找到名称中带有“unstripped-51”的软件包并安装它们。
从命令行,您可以使用 aptitude 的模式匹配,如下所示:
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: