{"id":155,"date":"2013-05-30T08:16:49","date_gmt":"2013-05-30T08:16:49","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=155"},"modified":"2013-05-30T08:16:49","modified_gmt":"2013-05-30T08:16:49","slug":"installing-and-configuring-ffmpeg-and-ffpeg-php","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2013\/05\/30\/installing-and-configuring-ffmpeg-and-ffpeg-php\/","title":{"rendered":"Installing and configuring FFmpeg and FFpeg-Php"},"content":{"rendered":"<p>FFMPEG\u00a0is a complete solution to record, convert and stream audio and video segments. It includes libavcodec, the leading audio\/video codec library.<b><br \/>\n<\/b><span style=\"color: #ff0000;\"><b>NOTES<\/b><\/span>:<\/p>\n<ul>\n<li>This guide had been used effectively on several Web production servers with CentOS v5.x and Red Hat v4\/5, however there are some which might not be compatible.<\/li>\n<li>Although this guide is designed for a Linux\u00a0<b>i386<\/b>\u00a0powered server, it might work on a\u00a0<b>86_64<\/b>\u00a0system &#8212; (proceed at your own risk.)<\/li>\n<li>If you experience any problems installing FFmpeg and FFmpeg-Php on your server and need help, just PM me or reply in thread i&#8217;ll install for you .<\/li>\n<\/ul>\n<p>There are two methods to install FFmpeg and FFmpeg-Php, their libraries, and modules:<\/p>\n<ol>\n<li>Our preferred method is to use\u00a0<b>Yum\u00a0<\/b>on systems including Red Hat, CentOS, and Fedora Core.<\/li>\n<li>Manually, from source archives\/packages &#8211;\ufffdNOT RECOMMENDED (proceed at your own risk.)<\/li>\n<\/ol>\n<p><span style=\"color: #ff0000;\"><b>*** Caution<\/b><\/span><\/p>\n<ul>\n<li>You must remove all previous installation of FFmpeg and FFmpeg-Php, then follow installation instructions below.<\/li>\n<li>Follow these steps (in that order):<\/li>\n<\/ul>\n<p><b>Method #1: Using yum\u00a0<\/b><\/p>\n<p>First, make sure the following binary packages are installed on your server:<\/p>\n<blockquote><p>gcc, gcc4, gcc4-c++, gcc4-gfortran, gd, gd-devel, gmake, ImageMagick, ImageMagick-devel, libcpp, libgcc, libstdc++, make, ncurses, ncurses-devel, ruby, subversion<\/p><\/blockquote>\n<p>If any of these packages are missing, install them using\u00a0<b>Yum\u00a0<\/b>. For example:<\/p>\n<ul>\n<li>yum install\u00a0<i>PACKAGE<\/i><\/li>\n<\/ul>\n<ol>\n<li><b>Install rpmforge repository<\/b>. Follow the instructions on CentOS Wiki\n<ul>\n<li>wget\u00a0<a href=\"http:\/\/pkgs.repoforge.org\/rpmforge-release\/rpmforge-release-0.5.2-2.el5.rf.i386.rpm\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/pkgs.repoforge.org\/rpmforge-r&#8230;l5.rf.i386.rpm<\/a><\/li>\n<li>rpm -ivh rpmforge-release-0.5.2-2.el5.rf.*.rpm<\/li>\n<\/ul>\n<\/li>\n<li>Install ffmpeg, mplayer, mencoder with all supported libraries\/modules\n<ul>\n<li>yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2<\/li>\n<\/ul>\n<\/li>\n<li>Manually, install\u00a0<b>FFmpeg-Php<\/b>\n<ul>\n<li>cd \/usr\/local\/src<\/li>\n<li>wget\u00a0<a href=\"http:\/\/garr.dl.sourceforge.net\/sourceforge\/ffmpeg-php\/ffmpeg-php-0.6.0.tbz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/garr.dl.sourceforge.net\/sourc&#8230;php-0.6.0.tbz2<\/a><\/li>\n<li>tar jxvf ffmpeg-php-0.6.0.tbz2<\/li>\n<li>cd ffmpeg-php-0.6.0<\/li>\n<li>phpize<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>If FFmpeg-Php is compiled successfully, an ffmpeg.so module will be generated and copied into the default Php directory. Next,\ufffdrun the following command to enable FFmpeg-Php. By running this command you will be\ufffdadding<b>ffmpeg.so<\/b>\u00a0module into the\ufffd<b>php.ini<\/b>\u00a0file:<\/p>\n<blockquote><p>echo &#8216;extension=ffmpeg.so&#8217; &gt;&gt; \/local_path_to_your\/php.ini<\/p><\/blockquote>\n<p>Final step, restart apache<\/p>\n<blockquote><p>service httpd restart<br \/>\nOR<br \/>\n\/etc\/init.d\/httpd restart<\/p><\/blockquote>\n<p><b>&#8211; Testing FFmpeg<\/b><\/p>\n<p>Verify that FFmpeg is working properly by running the following two commands:<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\">php -r &#8216;phpinfo();&#8217; | grep ffmpeg<\/span><\/li>\n<\/ul>\n<p>You will get a few lines similar to the following:<\/p>\n<blockquote><p>ffmpeg<br \/>\nffmpeg-php version =&gt; 0.6.0-svn<br \/>\nffmpeg-php built on =&gt; April\ufffd 15 2010 15:31:45<br \/>\nffmpeg-php gd support\ufffd =&gt; enabled<br \/>\nffmpeg libavcodec version =&gt; Lavc51.62.0<br \/>\nffmpeg libavformat version =&gt; Lavf52.18.0<br \/>\nffmpeg swscaler =&gt; disabled<br \/>\nffmpeg.allow_persistent =&gt; 0 =&gt; 0<br \/>\nffmpeg.show_warnings =&gt; 0 =&gt; 0<\/p><\/blockquote>\n<p>This is the second command to make sure that FFmpeg is working properly:<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\">\/usr\/local\/bin\/ffmpeg<\/span><\/li>\n<\/ul>\n<p>If you do not get any errors after running the test commands above, FFmpeg, FFmpeg-Php, MPlayer, MEncoder, and FLV2tool are working properly on your server. CONGRATULATIONS!<\/p>\n<p><b>Method #1: Source archives\/packages<\/b><\/p>\n<p><span style=\"color: #ff0000;\"><b>*** Caution<\/b><\/span><\/p>\n<ul>\n<li>You must remove all previous installation of FFmpeg and FFmpeg-Php, then follow installation instructions below.<\/li>\n<li>Follow these steps (in that order):<\/li>\n<\/ul>\n<p>First, make sure the following binary packages are installed on your server:<\/p>\n<blockquote><p>gcc, gcc4, gcc4-c++, gcc4-gfortran, gd, gd-devel, gmake, ImageMagick, ImageMagick-devel, libcpp, libgcc, libstdc++, make, ncurses, ncurses-devel, ruby, subversion<\/p><\/blockquote>\n<p>If any of these packages are missing, install them using\u00a0<b>Yum\u00a0<\/b>. For example:<\/p>\n<ul>\n<li>yum install\u00a0<span style=\"color: #ff0000;\"><i>PACKAGE<\/i><\/span><\/li>\n<\/ul>\n<p><span style=\"color: #ff0000;\"><b>*** Caution<\/b><\/span><\/p>\n<ul>\n<li>The following source packages are always updated with newer versions. You might experience technical issues if you download and install a newer\/older version of any of these applications.<\/li>\n<li>You must remove all previous installation of FFmpeg and FFmpeg-Php, then follow installation instructions below.<\/li>\n<\/ul>\n<p>To install FFmpeg from\u00a0<b>source<\/b>, execute the following commands (in that order).<\/p>\n<ol>\n<li>Let&#8217;s create a directory to do our work in:\n<ul>\n<li>mkdir \/usr\/local\/src<\/li>\n<li>cd \/usr\/local\/src<\/li>\n<\/ul>\n<\/li>\n<li>Download source packages\n<ul>\n<li>wget\u00a0<a href=\"http:\/\/liba52.sourceforge.net\/files\/a52dec-0.7.4.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/liba52.sourceforge.net\/files\/a52dec-0.7.4.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/ftp.penguin.cz\/pub\/users\/utx\/amr\/amrnb-7.0.0.2.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/ftp.penguin.cz\/pub\/users\/utx\/&#8230;.0.0.2.tar.bz2<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/ftp.penguin.cz\/pub\/users\/utx\/amr\/amrwb-7.0.0.2.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/ftp.penguin.cz\/pub\/users\/utx\/&#8230;.0.0.2.tar.bz2<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/www3.mplayerhq.hu\/MPlayer\/releases\/codecs\/essential-ppc-20071007.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/www3.mplayerhq.hu\/MPlayer\/rel&#8230;071007.tar.bz2<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.sourceforge.net\/project\/faac\/faac-src\/faac-1.28\/faac-1.28.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.sourceforge.net\/pro&#8230;c-1.28.tar.bz2<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.sourceforge.net\/project\/faac\/faad2-src\/faad2-2.7\/faad2-2.7.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.sourceforge.net\/pro&#8230;ad2-2.7.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/biznetnetworks.dl.sourceforge.net\/sourceforge\/ffmpeg-php\/ffmpeg-php-0.6.0.tbz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/biznetnetworks.dl.sourceforge&#8230;php-0.6.0.tbz2<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/rubyforge.org\/frs\/download.php\/17497\/flvtool2-1.0.6.tgz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/rubyforge.org\/frs\/download.ph&#8230;ool2-1.0.6.tgz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.sourceforge.net\/project\/lame\/lame\/3.98.4\/lame-3.98.4.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.sourceforge.net\/pro&#8230;-3.98.4.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.xiph.org\/releases\/ogg\/libogg-1.1.4.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.xiph.org\/releases\/o&#8230;g-1.1.4.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.xiph.org\/releases\/theora\/libtheora-1.1.1.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.xiph.org\/releases\/t&#8230;-1.1.1.tar.bz2<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.xiph.org\/releases\/vorbis\/libvorbis-1.2.2.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.xiph.org\/releases\/v&#8230;s-1.2.2.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.sourceforge.net\/project\/re2c\/re2c\/0.13.5\/re2c-0.13.5.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.sourceforge.net\/pro&#8230;-0.13.5.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/download.m0k.org\/handbrake\/contrib\/xvidcore-1.1.3.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/download.m0k.org\/handbrake\/co&#8230;e-1.1.3.tar.gz<\/a><\/li>\n<li>wget\u00a0<a href=\"http:\/\/downloads.videolan.org\/pub\/videolan\/x264\/snapshots\/x264-snapshot-20080324-2245.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/downloads.videolan.org\/pub\/vi&#8230;4-2245.tar.bz2<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Extract source packages\n<ul>\n<li>tar xzf a52dec-0.7.4.tar.gz<\/li>\n<li>tar jxvf amrnb-7.0.0.2.tar.bz2<\/li>\n<li>tar jxvf amrwb-7.0.0.2.tar.bz2<\/li>\n<li>tar jxvf essential-ppc-20071007.tar.bz2<\/li>\n<li>tar jxvf faac-1.28.tar.bz2<\/li>\n<li>tar xzf faad2-2.7.tar.gz<\/li>\n<li>tar jxvf ffmpeg-php-0.6.0.tbz2<\/li>\n<li>tar zxvf flvtool2-1.0.6.tgz<\/li>\n<li>tar xzf lame-3.98.4.tar.gz<\/li>\n<li>tar xzf libogg-1.1.4.tar.gz<\/li>\n<li>tar jxvf libtheora-1.1.1.tar.bz2<\/li>\n<li>tar xzf libvorbis-1.2.2.tar.gz<\/li>\n<li>tar xzf re2c-0.13.5.tar.gz<\/li>\n<li>tar xzf xvidcore-1.1.3.tar.gz<\/li>\n<li>tar jxvf x264-snapshot-20080324-2245.tar.bz2<\/li>\n<\/ul>\n<\/li>\n<li>Create the codecs directory &amp; export files\n<ul>\n<li>mkdir \/usr\/local\/lib\/codecs<\/li>\n<li>mv \/usr\/local\/src\/essential-ppc-20071007\/* \/usr\/local\/lib\/codecs<\/li>\n<li>chmod -R 755 \/usr\/local\/lib\/codecs<\/li>\n<li>echo &#8220;\/usr\/local\/lib&#8221; &gt;&gt; \/etc\/ld.so.conf<\/li>\n<li>ldconfig<\/li>\n<\/ul>\n<\/li>\n<li>Install SVN and Ruby (<span style=\"color: #ff0000;\">for RedHat\/CentOS v5.x<\/span>)\n<ul>\n<li>yum install subversion<\/li>\n<li>yum install ruby<br \/>\nOR (if you are using the cPanel control panel)<\/p>\n<ul>\n<li>\/scripts\/installruby<\/li>\n<li>\/usr\/local\/cpanel\/bin\/ror_setup<\/li>\n<\/ul>\n<\/li>\n<li>yum install ncurses-devel<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install FLVtool2\n<ul>\n<li>cd \/usr\/local\/src\/flvtool2-1.0.6\/<\/li>\n<li>ruby setup.rb config<\/li>\n<li>ruby setup.rb setup<\/li>\n<li>ruby setup.rb install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install LAME\n<ul>\n<li>cd \/usr\/local\/src\/lame-3.98.4<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install libOGG\n<ul>\n<li>cd \/usr\/local\/src\/libogg-1.1.4<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<li>PKG_CONFIG_PATH=\/usr\/local\/lib\/pkgconfig<\/li>\n<li>export PKG_CONFIG_PATH<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install LibVorbis\n<ul>\n<li>cd \/usr\/local\/src\/libvorbis-1.2.2<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install Libtheora\n<ul>\n<li>cd \/usr\/local\/src\/libtheora-1.1.1<\/li>\n<li>.\/configure &#8211;with-ogg-libraries=\/usr\/local\/lib\/<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install amr<b>NB<\/b>\n<ul>\n<li>cd \/usr\/local\/src\/amrnb-7.0.0.2<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install amr<b>WB<\/b>\n<ul>\n<li>cd \/usr\/local\/src\/amrwb-7.0.0.2<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install Liba52\n<ul>\n<li>cd \/usr\/local\/src\/a52dec-0.7.4<\/li>\n<li>.\/bootstrap<\/li>\n<li>ARCh=&#8217;arch&#8217;<\/li>\n<li>.\/configure &#8211;enable-shared<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install FAAC\n<ul>\n<li>cd \/usr\/local\/src\/faac-1.28<\/li>\n<li>.\/bootstrap<\/li>\n<li>.\/configure &#8211;with-mp4v2<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install FAAD\n<ul>\n<li>cd \/usr\/local\/src\/faad2-2.7<\/li>\n<li>.\/configure &#8211;with-mpeg4ip<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install XVIDCore\n<ul>\n<li>cd \/usr\/local\/src\/xvidcore\/build\/generic\/<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and Install\ufffdX264 Snapshot\n<ul>\n<li>cd \/usr\/local\/src\/x264-snapshot-20080324-2245<\/li>\n<li>.\/configure &#8211;enable-shared<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install RE2C\n<ul>\n<li>cd \/usr\/local\/src\/re2c-0.13.5<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<li>make install<\/li>\n<li>cp -aP \/usr\/local\/bin\/re2c \/usr\/bin\/<\/li>\n<\/ul>\n<\/li>\n<li>Download the latest release for FFmpeg and MPlayer from\u00a0<b>svn.mplayerhq.hu<\/b>\n<ul>\n<li>cd \/usr\/local\/src<\/li>\n<li>svn checkout svn:\/\/svn.mplayerhq.hu\/ffmpeg\/trunk ffmpeg -r 15594<\/li>\n<li>svn checkout svn:\/\/svn.mplayerhq.hu\/mplayer\/trunk mplayer<\/li>\n<li>svn update<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install MPlayer\n<ul>\n<li>cd \/usr\/local\/src\/mplayer<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<\/ul>\n<p><span style=\"color: #ff0000;\">(<b>STOP here<\/b>.)<\/span>\u00a0<i>Make sure MPlayer has been compiled successfully with NO errors. Do NOT proceed any further unless the MPlayer package has been compiled successfully.<\/i><\/p>\n<ul>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install FFmpeg\n<ul>\n<li>cd \/usr\/local\/src\/ffmpeg\/<\/li>\n<li>mkdir \/usr\/local\/src\/ffmpeg\/tmp<\/li>\n<li>export TMPDIR=\/usr\/local\/src\/ffmpeg\/tmp<\/li>\n<\/ul>\n<p><span style=\"color: #ff0000;\">(<i>The following .\/configure command is one single line<\/i>)<\/span><\/p>\n<ul>\n<li>.\/configure &#8211;enable-shared &#8211;enable-nonfree &#8211;enable-gpl &#8211;enable-pthreads &#8211;enable-liba52 &#8211;enable-libamr-nb &#8211;enable-libamr-wb &#8211;enable-libfaac &#8211;enable-libfaad &#8211;enable-libmp3lame &#8211;enable-libtheora &#8211;enable-libvorbis &#8211;enable-libx264 &#8211;enable-libxvid &#8211;enable-cross-compile<\/li>\n<li>make<\/li>\n<\/ul>\n<p><span style=\"color: #ff0000;\">(<b>STOP here<\/b>.)<\/span>\u00a0<i>Make sure FFmpeg has been compiled successfully with NO errors. Do NOT proceed any further unless the FFmpeg package has been compiled successfully.<\/i><\/p>\n<ul>\n<li>make install<\/li>\n<li>export LD_LIBRARY_PATH=\/usr\/local\/lib\/<\/li>\n<\/ul>\n<\/li>\n<li>Finalize the codec setups:<br \/>\n(Create symbolic links for the following modules. FYI: the number which comes after the extension *<b>.so<\/b>\u00a0might differ from one server to another. The\u00a0<span style=\"color: #ff0000;\">X<\/span>&#8216;s represent numbers. The number after *<b>.so.5<\/b>\u00a0must match the number after the *<b>.so.5<\/b>\u00a0at the end of the line.)<\/p>\n<ul>\n<li>ln -s \/usr\/local\/lib\/libavformat.so.5<span style=\"color: #ff0000;\">X.XX.0<\/span>\u00a0\/usr\/lib\/libavformat.so.<span style=\"color: #ff0000;\">5X<\/span><\/li>\n<li>ln -s \/usr\/local\/lib\/libavcodec.so.5<span style=\"color: #ff0000;\">X.XX.0<\/span>\u00a0\/usr\/lib\/libavcodec.so.<span style=\"color: #ff0000;\">5X<\/span><\/li>\n<li>ln -s \/usr\/local\/lib\/libavutil.so.49.X.0 \/usr\/lib\/libavutil.so.49<\/li>\n<li>ln -s \/usr\/local\/lib\/libmp3lame.so.0 \/usr\/lib\/libmp3lame.so.0<\/li>\n<li>\/sbin\/ldconfig<\/li>\n<\/ul>\n<\/li>\n<li>Compile and install FFmpeg-Php\n<ul>\n<li>cd \/usr\/local\/src\/ffmpeg-php-0.6.0\/<\/li>\n<li>\/usr\/bin\/phpize<\/li>\n<li>.\/configure<\/li>\n<li>make<\/li>\n<\/ul>\n<p><span style=\"color: #ff0000;\">(<b>STOP here<\/b>.)<\/span>\u00a0<i>Make sure FFmpeg-Php has been compiled successfully with NO errors. Do NOT proceed any further unless the FFmpeg-Php package has been compiled successfully.<\/i><\/p>\n<ul>\n<li>make install<br \/>\n<span style=\"color: #ff0000;\">Verify that ffmpeg-php module is saved in the Php extensions directory by running:<\/span><\/li>\n<li>ls -al \/usr\/local\/lib\/php\/extensions\/no-debug-non-zts-20060613\/<b>ffmpeg.so<\/b><\/li>\n<\/ul>\n<\/li>\n<li>Add FFmpeg-Php module directive in php.ini file: (<span style=\"color: #ff0000;\"><i>make sure the local path to your php.ini is correct<\/i><\/span>.)\n<ul>\n<li>echo &#8216;extension=ffmpeg.so&#8217; &gt;&gt; \/usr\/local\/lib\/php.ini<\/li>\n<\/ul>\n<\/li>\n<li>Restart Apache to load FFmpeg-Php (for RedHat\/CentOS v5.x)\n<ul>\n<li>service httpd restart<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><b>&#8211; Testing FFmpeg<\/b><br \/>\nVerify that FFmpeg is working properly by running the following two commands:<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\">php -r &#8216;phpinfo();&#8217; | grep ffmpeg<\/span><\/li>\n<\/ul>\n<p>You will get a few lines similar to the following:<\/p>\n<blockquote><p>ffmpeg<br \/>\nffmpeg-php version =&gt; 0.6.0-svn<br \/>\nffmpeg-php built on =&gt; April\ufffd 15 2010 15:31:45<br \/>\nffmpeg-php gd support\ufffd =&gt; enabled<br \/>\nffmpeg libavcodec version =&gt; Lavc51.62.0<br \/>\nffmpeg libavformat version =&gt; Lavf52.18.0<br \/>\nffmpeg swscaler =&gt; disabled<br \/>\nffmpeg.allow_persistent =&gt; 0 =&gt; 0<br \/>\nffmpeg.show_warnings =&gt; 0 =&gt; 0<\/p><\/blockquote>\n<p>This is the second command to make sure that FFmpeg is working properly:<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\">\/usr\/local\/bin\/ffmpeg<\/span><\/li>\n<\/ul>\n<p>If you do not get any errors after running the test commands above, FFmpeg, FFmpeg-Php, MPlayer, MEncoder, FLV2tool, LAME MP3 encoder &amp; libOGG are working properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FFMPEG\u00a0is a complete solution to record, convert and stream audio and video segments. It includes libavcodec, the leading audio\/video codec library. NOTES: This guide had been used effectively on several Web production servers with CentOS v5.x and Red Hat v4\/5, however there are some which might not be compatible. Although this guide is designed for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[53,60],"tags":[80],"class_list":["post-155","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","tag-installing-and-configuring-ffmpeg-and-ffpeg-php"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}