Before Proceeding with the FFMPEG compilation script, please make sure the check the Wiki section for different usage examples of FFMPEG. Another good source of information is the Ubuntu compilation guide for FFMPEG
Automated scripts for compilation of FFMPEG v.4.1 and its most popular librarires for Ubuntu based systems. The script is tested and working on Ubuntu 16.04 LTS Xenial Xerus and Ubuntu 18.04 LTS Bionic Beaver. After compilation the FFMPEG configuration should be:
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --pkg-config-flags=--static --extra-libs='-lpthread -lm' --toolchain=hardened --enable-gpl --enable-nonfree --enable-version3 --disable-stripping --enable-avisynth --enable-libass --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-librubberband --enable-libshine --enable-libsnappy --enable-libssh --enable-libtwolame --enable-libwavpack --enable-libzvbi --enable-openal --enable-sdl2 --enable-libdrm --enable-frei0r --enable-ladspa --enable-libpulse --enable-libsoxr --enable-libspeex --enable-avfilter --enable-postproc --enable-pthreads --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-ffplay --enable-libopenjpeg --enable-libsrt --enable-libwebp --enable-libxvid --enable-libvidstab --enable-libopenh264 --enable-zlib --enable-openssl
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
The following libraries are also installed from source:
Video Codecs:
Video Plugins:
Transport Protocols
Audio Codecs:
Container Formats:
Filters
Please run the compilation.sh script sh compilation.sh
and it will take care of installing the latest version of FFMPEG and its most popular libraries from scratch presuming that you have cloned this repository.
In case you want to automate the installation of GIT and run the compilation script you can execute:
sudo apt update && sudo apt install git -y && git clone https://github.com/stoyanovgeorge/ffmpeg.git && cd ffmpeg && sh compilation.sh
If you want to omit the installation of some of these libraries, please comment the line in the compilation.sh script and also remove the parameter in the ffmpeg.sh script.
For example if you want to remove x265 support, you need to comment the sh $PWD/scripts/libx265.sh 2> $HOME/ffmpeg/logs/libx265.log
line in the compilation.sh script.
And in the ffmpeg.sh script you need to remove --enable-libkvazaar
option.
Please use Github Issues in case you spot a bug or have an idea how to optimize the scripts.