我通过以下方式在ubuntu11上安装了ffmpeg 0.8.9
/configure --enable-gpl --enable-gpl-
--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
中)
我该如何解决这个问题呢?谢谢!
发布于 2012-04-05 19:20:09
我正在使用Ubuntu11.04,我也遇到了这个错误-- Unknown encoder 'libx264'
。安装程序包libavcodec-extra-53
解决了此问题。
在Ubuntu14.04LTS中,所需的包称为libavcodec-extra-54
(和libav-tools
)
发布于 2013-02-27 14:52:41
首先安装这些库
sudo apt-get install libfdk-aac-dev libass-dev libopus-dev \
libtheora-dev libvorbis-dev libvpx-dev libssl-dev
对于Ubuntu 20.04问题
sudo apt-get install nasm
并跳过此手动nasm安装...然而,从Ubuntu17.04开始,sudo apt-get install nasm
还没有提供足够新的nasm,所以需要手动安装
从http://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D获取nasm的源代码然后下载最新版本
cd ~/src/nasm-2.13.02 # update to release you just downloaded
./configure
make -j $(nproc)
sudo make install
然后对于x264:
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --enable-static --enable-shared
make -j $(nproc)
sudo make install
For mp3 get LAME (libmp3lame)
sudo apt-get install libmp3lame-dev
或者从http://lame.sourceforge.net/ v3.100手动安装,然后将其设置为
cd lame-3.100/
./configure
make -j $(nproc)
sudo make install
最后下载ffmpeg源代码并安装:
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-shared --enable-openssl
make -j $(nproc)
sudo make install
我能感受到你的痛苦,但这仍然有效-在Ubuntu 18.10上仍然有效
发布于 2019-10-17 04:37:45
当我使用OpenAI健身房时,我在Ubuntu18上得到了这个错误。你需要正确版本的ffmpeg和x264编码器。为了获得它们,我使用了下面的命令,并且它起作用了:
conda install x264=='1!152.20180717' ffmpeg=4.0.2 -c conda-forge
https://stackoverflow.com/questions/9764740
复制相似问题