第十六章-FFmpeg
这里的安装方法启用了mmal
,可以提升性能
sudo apt-get update
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb-shm0-dev \
libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
mkdir ~/ffmpeg_sources
Yasm:
sudo apt-get install yasm
libx264:
sudo apt-get install libx264-dev
libfdk-aac:
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 -j4
make install
make distclean
libmp3lame:
sudo apt-get install libmp3lame-dev
libopus:
sudo apt-get install libopus-dev
ffmpeg:
sudo ldconfig
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
configure:
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" \
./configure --arch=armv7h --target-os=linux --enable-gpl --enable-libx264 --enable-opengl \
--enable-x11grab --enable-mmal --enable-nonfree --enable-libass \
--enable-libfdk-aac --enable-libmp3lame --enable-libopus --bindir="/usr/bin"
make:
make -j4
sudo make install