ubuntu 14.04并没有包含ffmpeg,这里编译安装一个完整的带ffplay的ffmpeg,并加入debian的包管理,步骤如下:
1.安装依赖项
1 2 3 4 5 |
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev yasm libx264-dev libfdk-aac-dev libmp3lame-dev libopus-dev libvpx-dev |
2.编译安装ffmpeg
1 2 3 4 5 6 7 8 9 |
git clone --depth 1 git://source.ffmpeg.org/ffmpeg cd ffmpeg ./configure --extra-libs="-ldl" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab make sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default |