【问题标题】:Installing FFmpeg on Ubuntu 14.04 LTS fails on libvpx在 Ubuntu 14.04 LTS 上安装 FFmpeg 在 libvpx 上失败
【发布时间】:2015-11-17 23:06:32
【问题描述】:

这是我目前正在遵循的过程:

安装依赖项

sudo apt-get remove ffmpeg x264 libx264-dev
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall texi2html \
libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libavcodec-dev

安装 x264

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

安装 libvpx

cd /opt
git clone https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no \
--default --deldoc=yes

安装蹩脚

sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
cd /opt
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
tar xzvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default --deldoc=yes

安装 FFMpeg

cd /opt
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
git checkout release/2.8
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab --enable-libvpx --enable-libmp3lame
make

这里,在编译 FFmpeg 时,出现以下错误,导致安装失败:

libavcodec/libvpxenc.c:107:6: error: ‘VP8E_UPD_ENTROPY’ undeclared here (not in a function)
     [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
      ^
libavcodec/libvpxenc.c:107:5: error: array index in initializer not of integer type
     [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
     ^
libavcodec/libvpxenc.c:107:5: error: (near initialization for ‘ctlidstr’)
libavcodec/libvpxenc.c:108:6: error: ‘VP8E_UPD_REFERENCE’ undeclared here (not in a function)
     [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
      ^
libavcodec/libvpxenc.c:108:5: error: array index in initializer not of integer type
     [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
     ^
libavcodec/libvpxenc.c:108:5: error: (near initialization for ‘ctlidstr’)
libavcodec/libvpxenc.c:109:6: error: ‘VP8E_USE_REFERENCE’ undeclared here (not in a function)
     [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
      ^
libavcodec/libvpxenc.c:109:5: error: array index in initializer not of integer type
     [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
     ^
libavcodec/libvpxenc.c:109:5: error: (near initialization for ‘ctlidstr’)
make: *** [libavcodec/libvpxenc.o] Error 1

我认为它最近对 libvpx 存储库进行了一些更改。 那么,有人对我应该如何解决这个问题有任何提示吗?

【问题讨论】:

    标签: compiler-errors ffmpeg ubuntu-14.04 libvpx


    【解决方案1】:

    票务:https://trac.ffmpeg.org/ticket/4956

    在提交 6540fe04a3f9a11ba7084a49b3ee5fa2fc5b32ab 时已修复。

    获取git master,而不是 2.8 版本。

    【讨论】:

    • 天哪,我之前看到了票,错过了它已经解决的事实。谢谢你好心的先生!
    • 更新:我相信最新版本已经合并了这个提交,所以这个错误应该不会再出现了!
    • 你也可以试试我的这个安装程序,github.com/razzbee/ffmpeg_installer
    猜你喜欢
    • 2015-09-25
    • 1970-01-01
    • 2015-05-31
    • 2015-08-30
    • 2023-03-31
    • 2015-06-08
    • 1970-01-01
    • 2016-02-24
    • 1970-01-01
    相关资源
    最近更新 更多