FFmpeg扩展编解码器

1、libx264

libx264-dev 安装:

sudo apt-get install libx264-dev

源码安装:

cd ~/ffmpeg_sources

wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2

tar xjvf last_x264.tar.bz2

cd x264-snapshot*

PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static --disable-opencl

PATH="$HOME/bin:$PATH" make

make install

make distclean

tips: --enable-gpl --enable-libx264

2、libx265

sudo apt-get install cmake mercurial

cd ~/ffmpeg_sources

hg clone https://bitbucket.org/multicoreware/x265

cd ~/ffmpeg_sources/x265/build/linux

PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source

make

make install

make distclean

tips: --enable-gpl --enable-libx265

3、libfdk-aac

sudo apt-get install libfdk-aac-dev

或者源码安装

cd ~/ffmpeg_sources

wget -O fdk-aac.tar.gz https://github.com/mstorsjo/fdk-aac/tarball/master

tar xzvf fdk-aac.tar.gz

cd mstorsjo-fdk-aac*

autoreconf -fiv

./configure --prefix="$HOME/ffmpeg_build" --disable-shared

make

make install

make distclean

tips: --enable-libfdk-aac --enable-nonfree --enable-gpl

4、libmp3lame

sudo apt-get install libmp3lame-dev

或者源码安装

sudo apt-get install nasm

cd ~/ffmpeg_sources

wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

tar xzvf lame-3.99.5.tar.gz

cd lame-3.99.5

./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared

make

make install

make distclean

tips: --enable-libmp3lame

5、libopus

sudo apt-get install libopus-dev

或者源码安装

cd ~/ffmpeg_sources

wget http://downloads.xiph.org/releases/opus/opus-1.1.2.tar.gz

tar xzvf opus-1.1.2.tar.gz

cd opus-1.1.2

./configure --prefix="$HOME/ffmpeg_build" --disable-shared

make

make install

tips: --enable-libopus

6、libvpx

cd ~/ffmpeg_sources

wget http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.5.0.tar.bz2

tar xjvf libvpx-1.5.0.tar.bz2

cd libvpx-1.5.0

PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests

PATH="$HOME/bin:$PATH" make

make install

make clean

tips: --enable-libvpx

note:

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 \

--enable-libass \

--enable-libfdk-aac \

--enable-libfreetype \

--enable-libmp3lame \

--enable-libopus \

--enable-libtheora \

--enable-libvorbis \

--enable-libvpx \

--enable-libx264 \

--enable-libx265 \

--enable-nonfree

你可能感兴趣的:(FFmpeg扩展编解码器)