This article will teach you how to install ffmpeg on Centos Linux with the admin directory, ffmpeg is a video and audio management framework capable of encoding, decoding, converting and recording.
In fact, ffmpeg is a php extensible installation that enables you to view and display audio and video file information through php scripts. If you still don’t know what the script is you can use the tutorial we put on the website.
This tutorial can be installed and implemented on other Linux distributions that have the admin directory installed, but we did the testing on version 6 centos without any problems.
Steps to install ffmpeg in the admin directory
To install ffmpeg you need to have the RPMForge repository installed on Linux so we use the following command to download this package. For whatever reason, if the link below wasn’t available to you, just look for Google to get many direct links.
Now we will install RPMForge by following command.
rpm -Uvh rpmforge-release-0.5.3-1.el6.rf. $ (arch) .rpm
You can now install ffmpeg and its related packages via Yum with the command below.
yum -y install ffmpeg ffmpeg-devel libogg libvorbis lame flvtool2 mencoder
You can also use the following command to install ffmpeg as an extension for php.
wget https://centos.googlecode.com/files/ffmpeg-php-0.6.0.tbz2 tar -xjf ffmpeg-php-0.6.0.tbz2 cd ffmpeg-php-0.6.0 phpize
Note that you have to execute the above command sequentially, if you run the last command with the phpize: command not found error, it means that the phpize command is not accessible in your PATH variable and its location is definitely somewhere else. Is.
In this tutorial we have PHP version 5.6 and Handler is PHP FPM. So our phpize file path is located in the following directory.
/ usr / local / php56 / bin / phpize
After executing the above command execute the following command to config the ffmpeg package.
./configure --with-php-config = / usr / local / php56 / bin / php-config
If the above command does not work for you, your php-config file path may be different. Finding that Linux has provided you with the file search capability that we have fully trained in Linux commands , but here again you will get the command again. we put.
find / usr / local / -type f -name php-config
Now enter the following command to install ffmpeg and wait for the installation process to finish.
If you hit the make command with an error like make: *** [ffmpeg_movie.lo] Error 1 you should open the ffmpeg_movie.c file with an editor and incorporate the changes we said below.
Change list_entry * le; To zend_rsrc_list_entry * le; Change list_entry new_le; To zend_rsrc_list_entry new_le; Change hashkey_length + 1, (void *) & new_le, sizeof (list_entry), to hashkey_length + 1, (void *) & new_le, sizeof (zend_rsrc_list_entry),
Now re-enter the make command, your problem will probably be 100% resolved.
Finally, enter the final command to install ffmpeg on the admin directory.
Open the php.ini file when installation is complete If you do not know where this file is located on your server, you can use the php.ini file instruction.
Now change the extension_dir to its correct path that belongs to ffmpeg.
xtension_dir = "/ usr / local / php56 / lib / php / extensions / no-debug-non-zts-20131226 /"
Now add the following line to the php.ini file.
extension = "ffmpeg.so"
And Now restart your php and web server handler services to make the changes.
restart php-fpm56 service restart httpd service
Well the tutorial is done and the installation of ffmpeg in your admin directory is as easy as I hope the tutorial is.