Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install FFMPEG on Raspberry with all options
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
sudo apt-get -y install libtool build-essential autoconf checkinstall git libgpac-dev libomxil-bellagio-dev libssl-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev pkg-config texi2html yasm zlib1g-dev xvfb nasm gcc yasm
# install ffmpeg
cd ~
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot*
./configure --enable-static --disable-opencl --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
make -j4
make install
cd ~
rm -rf x264-snapshot*
cd ~
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 --disable-shared
make -j3
make install
ldconfig
cd ~
rm -rf mstorsjo-fdk-aac*
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 --enable-nasm --disable-shared
make -j3
make install
cd ~
rm -rf lame-3.99.5
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --disable-examples --disable-unit-tests
make -j3
make install
cd ~
rm -rf libvpx
git clone -b release/3.4 https://github.com/FFmpeg/FFmpeg.git ffmpeg
cd ffmpeg
./configure --arch=armel --target-os=linux --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-mmal --enable-omx --enable-omx-rpi --enable-decoder=h264_mmal --enable-decoder=mpeg2_mmal --enable-encoder=h264_omx --enable-encoder=h264_omx --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-gpl --enable-pthreads --enable-runtime-cpudetect --enable-openssl --bindir="/usr/local/bin"
make -j3
sudo make install
cd ~
rm -rf ffmpeg
# for headless-gl
sudo apt-get install -y xserver-xorg-dev libxext-dev build-essential libxi-dev libglu1-mesa-dev libglew-dev
wget http://www.ijg.org/files/jpegsrc.v9c.tar.gz
tar xvfz jpegsrc*
cd jpeg-9c
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
make -j4
sudo make install
cd ~
rm -rf jpeg-9c
rm jpegsrc.v9c.tar.gz
wget https://github.com/adddog/raspberrypi-setup/raw/master/ImageMagick-6.9.9-44.zip
unzip ImageMagick-6.9.9-44
cd ImageMagick-6.9.9-44
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp
make -j4
sudo make install
sudo ldconfig /usr/local/lib
cd ~
rm -rf ImageMagick-6.9.9-44
rm ImageMagick-6.9.9-44.zip
@Knot83

This comment has been minimized.

Copy link

@Knot83 Knot83 commented Aug 26, 2019

I must use 'sudo' before make install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment