Hướng dẫn cài đặt FFmpeg trên VPS server centos

f you want to use FFmpeg on RPM-based Linux, you can install pre-built FFmpeg package by using yum package manager after enabling additional third-party repositories. However, the version of FFmpeg included in such repositories is typically outdated. If you want to try FFmpeg’s bleeding edge features, you probably want to build FFmpeg yourself from its source.

Here is how to compile FFmpeg on CentOS, Fedora or RHEL.

On CentOS, enable RPM Fusion and EPEL repositories first. On Fedora, enable RPM Fusion first.

Go ahead and install all the packages required to build FFmpeg as follows. Note that depending on which libraries you want to enable, you may need to install additional packages.

$ sudo yum install gcc-c++ make yasm pkgconfig libXext-devel libXfixes-devel x264-devel zlib-devel

Next, download FFmpeg code, and compile it as follows.

$ wget http://ffmpeg.org/releases/ffmpeg-2.3.3.tar.bz2
$ tar xvfvj ffmpeg-2.3.3.tar.bz2
$ cd ffmpeg-2.3.3
$ ./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

Finally, install FFmpeg on your system.

$ sudo make install

Verify the installation by running ffmpeg command without any option.