

Now let’s begin with php-ffmpeg extension, which will allow you to manipulate video and audio via PHP programming laguage:īackup your current php.ini file cp /usr/local/lib/php.ini /usr/local/lib/Įdit your php.ini nano -w /usr/local/lib/php.iniĪt the end of the file, add the extension so PHP can load it: extension="ffmpeg.so" You should see this kind of output: :~]ffmpeg -versionīuilt on 13:00:18 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)Ĭonfiguration: -prefix=/usr -libdir=/usr/lib64 -shlibdir=/usr/lib64 -mandir=/usr/share/man -enable-shared -enable-runtime-cpudetect -enable-gpl -enable-version3 -enable-postproc -enable-avfilter -enable-pthreads -enable-x11grab -enable-vdpau -disable-avisynth -enable-frei0r -enable-libopencv -enable-libdc1394 -enable-libgsm -enable-libmp3lame -enable-libnut -enable-libopencore-amrnb -enable-libopencore-amrwb -enable-libopenjpeg -enable-librtmp -enable-libspeex -enable-libtheora -enable-libvorbis -enable-libvpx -enable-libx264 -enable-libxavs -enable-libxvid -extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' -disable-stripping Install ffmpeg and ffmpeg-devel packages: yum -y install ffmpeg ffmpeg-devel Install package libdc1394: yum install libdc1394-devel Paste this inside exactly as you see it:

Let’s begin.Ĭreate a new file called dag.repo inside yum repositories: nano -w /etc/yum.repos/dag.repo Sometimes this installation process may be difficult or you may find lot of errors while compiling if you are using source code, however we will use rpm files for the ffmpeg installation and will compile only the php-ffmpeg extension.

Important: this method should work for plain CentOS 6.x and 7.x without cPanel, you just have to edit the correct php.ini file (usually located at /etc/php.ini) while loading the php-ffmpeg extension Install FFmpeg and the PHP-FFmpeg extension FFmpeg can also convert multimedia on the fly and apply powerful filters to your audio and video files. FFmpeg is a popular video and audio converter/processing library, along with the PHP-FFmpeg extension can help you to build powerful video web apps within minutes.
