配置 ffmpeg 时出现“未知选项“--enable-libfaad”错误:未找到 libfaac”

配置 ffmpeg 时出现“未知选项“--enable-libfaad”错误:未找到 libfaac”

我尝试按照以下说明进行安装:

sudo apt-get remove ffmpeg x264 libx264-dev
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
cd
mkdir ffmpeg-x264-avfilter
cd ffmpeg-x264-avfilter
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
cd ..
svn checkout svn://svn.ffmpeg.org/soc/libavfilter
cd libavfilter
./checkout.sh
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf
make
sudo checkinstall --pkgname=ffmpeg-avfilter --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default

我收到以下错误:

Unknown option "--enable-libfaad".
Unknown option "--enable-avfilter-lavf".
ERROR: libfaac not found

我究竟做错了什么?

答案1

好吧,libfaac先安装。似乎安装时出错了。确保apt-get install libfaac-dev安装成功。

安装 FFmpeg 和 x264 的正确说明在这里

sudo apt-get update
sudo apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev \
  libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev \
  libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev \
  libxfixes-dev texi2html yasm zlib1g-dev

然后,对于 x264:

cd
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
  awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
  --fstrans=no --default

对于 FFmpeg:

cd
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
  --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
  --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
hash x264 ffmpeg ffplay ffprobe

就是这样 — 过滤器应该自动包含。

答案2

我发现在 Ubuntu 12.04 中无法安装 libfaac-dev,因此按照以下说明(https://superuser.com/questions/467774/how-to-install-libfaac-dev)我启用了多元宇宙存储库:

sudo nano /etc/apt/sources.list

删除以下几行上的哈希值以启用 repo:

deb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse

跑步:

sudo apt-get update
sudo apt-get install libfaac-dev

这应该可以解决这个错误。

答案3

如果您在 ec2 ubuntu 实例上安装...

您必须升级到此 yasm,它不在存储库中

.....

 install yasm

 wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz

 tar xvzf yasm-1.2.0.tar.gz

 cd yasm-1.2.0

 ./configure

 make && make install

 cd ..

答案4

libx264通过安装libavcodec-extra-53包修复了错误:

sudo apt-get install libavcodec-extra-53

相关内容