cd ~/ffmpeg_sources curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 tar xjvf nasm-2.13.02.tar.bz2 cd nasm-2.13.02 ./autogen.sh ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" make make install
安装Yasm:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz tar xzvf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" make make install
安装libx264转码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources git clone --depth 1 http://git.videolan.org/git/x264 cd x264 git checkout stable PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static make make install
如果不切换分支到stable分支,make提示错误:
1 2
filters/video/resize.c: In function ‘pick_closest_supported_csp’: filters/video/resize.c:215: error: ‘AVComponentDescriptor’ has no member named ‘depth’
安装libx265编码器:
1 2 3 4 5 6
cd ~/ffmpeg_sources hg clone https://bitbucket.org/multicoreware/x265 cd ~/ffmpeg_sources/x265/build/linux cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source make make install
安装aac编码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources git clone --depth 1 https://github.com/mstorsjo/fdk-aac cd fdk-aac autoreconf -fiv ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make make install
安装libmp3lame编码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources curl -O -L http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz tar xzvf lame-3.100.tar.gz cd lame-3.100 ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm make make install
安装libopus编码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources curl -O -L https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz tar xzvf opus-1.2.1.tar.gz cd opus-1.2.1 ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make make install
安装libogg编码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources curl -O -L http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz tar xzvf libogg-1.3.3.tar.gz cd libogg-1.3.3 ./configure --prefix="$HOME/ffmpeg_build" --disable-shared make make install
安装libvorbis编码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources curl -O -L http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz tar xzvf libvorbis-1.3.5.tar.gz cd libvorbis-1.3.5 ./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared make make install
安装libtheora编码器:
1 2 3 4 5 6 7
cd ~/ffmpeg_sources curl -O -L http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz tar xzvf libtheora-1.1.1.tar.gz cd libtheora-1.1.1 ./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared make make install
安装libvpx编码器:
1 2 3 4 5 6
cd ~/ffmpeg_sources git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git cd libvpx ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm make make install