How to compile only required libs of ffmpeg on required version of ffmpeg on CentOS

How to compile only required libs of ffmpeg on required version of ffmpeg on CentOS

To Build FFmpeg from the Source install below requirements Since we are only dealing with MP4 libraries, I have only done minimal install.

# As root user install below
yum install gcc-c++ make yasm pkgconfig libXext-devel libXfixes-devel x264-devel zlib-devel

Next, download FFmpeg source code (I am trying to install a specific version 2.8.15), and compile it as follows. To install latest version of ffmpeg please use this trac-link. FFmpeg version 2.8.15 doesn’t support static install while compiling.

mkdir ffmpeg_sources
cd ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-2.8.15.tar.gz
tar -zxvf ffmpeg-2.8.15.tar.gz
cd ffmpeg-2.8.15
./configure --enable-shared --enable-nonfree --enable-gpl --enable-decoder=aac --enable-libx264 --enable-demuxer=mov --enable-x11grab --enable-zlib  --enable-protocol=http --enable-filter=aformat --enable-filter=volume --enable-filter=aresample
make
make install

Issues found after installation

ffmpeg -v
unable to load libavcodec.so.53 (something similar to this kind of error)

To fix this issue, execute below command

find / -name libavdevice.so.53

For example, you’ve found this file in the /usr/local/lib. Next include that library into your library path. Add this to your /etc/ld.so.conf:

include ld.so.conf.d/*.conf
/usr/local/lib

save the file and execute

ldconfig

Later copy the binary files generated in $HOME/bin to /usr/local/bin

that’s all

Published:
comments powered by Disqus