Official Document: Https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
First, the simplest installation:
Install FFmpeg
Second, install the latest version
Gross steps
1. Create a few required directories
- ffmpeg_sources -where the source files will be downloaded. After you complete this guide, you can delete it as needed.
- Ffmpeg_build -Where to build the file and install the library. After you complete this guide, you can delete it as needed.
- bin -Store generated binaries (ffmpeg,ffplay,ffserver,x264,x265)
2, install the required files to compile, in our home directory new source code and binary storage file directory
mkdir -P ~/ffmpeg_sources ~/bin
Column as your home directory is:/home/www, create a new ffmpeg_sources directory and bin directory under the current path
3. Compile and install
All the rest follow the official use of Apt-get installation can be, need to compile and install only libx265 This library, need to compile the installation
4. After the compilation is complete, review the version
(1) Compiled and installed version
[Email protected]:~$ ffmpeg-versionffmpeg version N-89882-2018 GCC 5.4. 0 5.4. 0-6ubuntu1~16.04. 5 20160609 --prefix=/home/www/ffmpeg_build
(2) apt-installed version
[Email protected]:~$/usr/bin/ffmpeg-2.8. one by one -0ubuntu0. 16.04. 1 -gcc5.4. 0 5.4. 0-6ubuntu1~16.04. 4 20160609
Streaming Media Technology Learning notes (18) How Ubuntu 16.04.3 compiles FFmpeg records