Answers:
我靠自己成功地找到了答案,这就是方法。
通过运行以下命令删除当前的ffmpeg:
sudo apt-get remove --purge ffmpeg
为14.04添加ppa trusty-media:
sudo apt-add-repository ppa:mc3man/trusty-media
对于16.04,添加以下回购:
sudo apt-add-repository ppa:jonathonf/ffmpeg-3
更新仓库:
sudo apt-get update
最后安装它:
sudo apt-get install ffmpeg
通过键入Link安装依赖项:
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
ffmpeg
mkdir /home/user/ffmpeg
cd /home/user/ffmpeg
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
......
.......
PATH="$HOME/bin:$PATH" make
make install
make distclean
然后执行:
home/user/ffmpeg/bin/ffmpeg -i ../input.avs ../videos/output.avi