未知的编码器“libx264”

我在ubuntu11上安装了ffmpeg 0.8.9

./configure –enable-gpl –enable-nonfree –enable-pthreads –enable-libfaac –enable-libmp3lame –enable-libx264

当我运行它

ffmpeg -y -i test.mp4 -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -vcodec libx264 -b 250k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 250k -maxrate 250k -bufsize 250k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 a.ts 

它说

未知的编码器“libx264”

(注:同样的错误可能与avconv

我怎样才能解决这个问题? 谢谢!

我正在使用Ubuntu 11.04,而且我也遇到了这个错误 – Unknown encoder 'libx264' 。 安装软件包libavcodec-extra-53解决了这个问题。

在Ubuntu 14.04 LTS中,需要的软件包叫做libavcodec-extra-54 (和libav-tools

下载faac源文件并给它一个./configure && make && sudo make install:

 sudo apt-get install libfaac-dev # <-- encouraged to use this __OR__ get source from http://www.audiocoding.com/downloads.html Version 1.28 bootstrapped TAR.BZ2 Package http://downloads.sourceforge.net/faac/faac-1.28.tar.bz2 which after you decompress gives you a dir : cd faac-1.28 ./configure make -j8 # the number after the j should be double the number of your CPU cores ... when it throws errors fix : just comment out line 126 of file faac-1.28/common/mp4v2/mpeg4ip.h so it looks like // char *strcasestr(const char *haystack, const char *needle); make clean make -j8 sudo make install 

那么对于x264:

 git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-static --enable-shared make -j8 sudo make install 

对于mp3从http://lame.sourceforge.net/版本3.99.5获得LAME(libmp3lame),然后给它正&#x5E38;

 cd lame-3.99.5/ ./configure make -j8 sudo make install 

最后下载ffmpeg源码并安装:

 git clone git://source.ffmpeg.org/ffmpeg.git cd ffmpeg ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libx264 --enable-libfaac --enable-libmp3lame make -j8 sudo make install 

我感觉到你的痛苦,但这是有效的