FFmpeg Linux source code compilation and installation
Ubuntu16.04.10 version
1) instruction installation
Add source: sudo add-apt-repository ppa:djcj/hybrid
Update source: sudo apt-get update
Download and install: sudo apt-get-y install ffmpeg
2) Source code compilation and installation
1. Download source code: git clone git://source.ffmpeg.org/ffmpeg.git
two。 Generate configuration:. / configure-- enable-shared-- prefix=/home/dong/ffmpeg/ffmpeg/build/-- disable-x86asm
The old version can use-- disable-yasm to disable assembly language, while the new version supports enable-x86asm /-- disable-x86asm instead. Enable / disable assembly acceleration
Note: WARNING: The-- disable-yasm option is only provided for compatibility and will be removed in the future. Use-enable-x86asm /-disable-x86asm instead. Enable / disable assembly acceleration
3. Make & & make install
Version 4 query
Save the version number of each module in the / home/dong/ffmpeg/ffmpeg/build/lib/pkgconfig directory
Libavcodec.pc libavdevice.pc libavfilter.pc libavformat.pc libavutil.pc libswresample.pc libswscale.pc
Pkg-config libavdevice-modversion
The version number of libavdevice under the current system directory is queried. By default, libavdevice.pc is queried from / usr/lib/pkgconfig, / usr/local/lib/pkgconfig,/usr/share/pkgconfig/.
If you need to find the version number compiled by the source code first, you need to make the following settings
Export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig;$PKG_CONFIG_PATH
5 download URL of each version
Http://ffmpeg.org/releases/
6 add additional library
1. Yasm (libx264 depends on yasm)
Sudo apt-get install yasm
2 、 libx264
Sudo apt-get install libx264-dev
3 、 libfaac
Sudo apt-get install libfaac-dev
4 、 libmp3lame
Sudo apt-get install libmp3lame-dev
5 、 libtheora
Sudo apt-get install libtheora-dev
6 、 libvorbis
Sudo apt-get install libvorbis-dev
7 、 libxvid
Sudo apt-get install libxvidcore-dev
8 、 libxext
Sudo apt-get install libxext-dev
9 、 libxfixes
Sudo apt-get install libxfixes-dev
. / configure-- prefix=/usr/local/ffmpeg-- enable-gpl-- enable-version3-- enable-nonfree-- enable-postproc-- enable-pthreads-- enable-libfaac-- enable-libmp3lame-- enable-libtheora-- enable-libx264-- enable-libxvid-- enable-x11grab-- enable-libvorbis