{"id":1059,"date":"2015-02-10T03:47:33","date_gmt":"2015-02-10T01:47:33","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=1059"},"modified":"2015-02-10T04:17:48","modified_gmt":"2015-02-10T02:17:48","slug":"install-ffmpeg-php-on-centos-6-with-directadmin","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2015\/02\/10\/install-ffmpeg-php-on-centos-6-with-directadmin\/","title":{"rendered":"Install ffmpeg-php on CentOS 6 with DirectAdmin"},"content":{"rendered":"<p>Install FFmpeg<\/p>\n<p>First of all download and install RPMForge repository using the following commands:<\/p>\n<p>user@myVPS:~# wget http:\/\/pkgs.repoforge.org\/rpmforge-release\/rpmforge-release-0.5.3-1.el6.rf.$(arch).rpm<\/p>\n<p>user@myVPS:~# rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.$(arch).rpm<\/p>\n<p>Now you can install FFmpeg and some additional packages using yum.<\/p>\n<p>user@myVPS:~# yum -y install ffmpeg ffmpeg-devel libogg libvorbis lame flvtool2 mencoder<\/p>\n<p>Install ffmpeg-php<\/p>\n<p>To download and extract the ffmpeg-php tarball, run:<\/p>\n<p>user@myVPS:~# wget https:\/\/centos.googlecode.com\/files\/ffmpeg-php-0.6.0.tbz2<\/p>\n<p>user@myVPS:~# tar -xjf ffmpeg-php-0.6.0.tbz2<br \/>\nuser@myVPS:~# cd ffmpeg-php-0.6.0<\/p>\n<p>Run \u2018phpize\u2019 to create the necessary build scripts<\/p>\n<p>user@myVPS:~# phpize<\/p>\n<p>If you get an error message \u201cphpize: command not found\u201d, It means that phpize is not in the system PATH. In our case, using PHP FPM version 5.6 the full path to the phpize is \u2018\/usr\/local\/php56\/bin\/phpize\u2019, so we need to run:<\/p>\n<p>user@myVPS:~# \/usr\/local\/php56\/bin\/phpize<\/p>\n<p>Run \u201cconfigure\u201d to set the installation options, in our case the command is as follows:<\/p>\n<p>user@myVPS:~# .\/configure &#8211;with-php-config=\/usr\/local\/php56\/bin\/php-config<\/p>\n<p>You can find the locations of phpize and php-config binaries using the find command:<\/p>\n<p>user@myVPS:~# find \/usr\/local\/ -type f -name<\/p>\n<p>user@myVPS:~# phpize find \/usr\/local\/ -type f -name php-config<\/p>\n<p>Run make to start the compilation:<\/p>\n<p>user@myVPS:~# make<\/p>\n<p>If you get an error message like make: *** [ffmpeg_movie.lo] Error 1 open the ffmpeg_movie.c file and make the following changes:<\/p>\n<p>user@myVPS:~# vim ffmpeg_movie.c<\/p>\n<p>Change list_entry *le; to zend_rsrc_list_entry *le;<br \/>\nChange list_entry new_le; to zend_rsrc_list_entry new_le;<br \/>\nChange hashkey_length+1, (void *)&#038;new_le, sizeof(list_entry), to hashkey_length+1, (void *)&#038;new_le,sizeof(zend_rsrc_list_entry),<\/p>\n<p>and restart the compilation:<\/p>\n<p>user@myVPS:~# make<\/p>\n<p>to install the binaries run:<\/p>\n<p>user@myVPS:~# make install<\/p>\n<p>Once the installation is complete, open the php.ini file<\/p>\n<p>user@myVPS:~# vim \/usr\/local\/php56\/lib\/php.ini<\/p>\n<p>change the extension_dir to point to the extension directory, in our case :<\/p>\n<p>extension_dir =&#8221;\/usr\/local\/php56\/lib\/php\/extensions\/no-debug-non-zts-20131226\/&#8221;<\/p>\n<p>and append the following line to enable the ffmpeg extension<\/p>\n<p>extension=&#8221;ffmpeg.so&#8221;<\/p>\n<p>Finally restart php-fpm for changes to take effect.<\/p>\n<p>user@myVPS:~# service php-fpm56 restart<\/p>\n<p>If you\u2019re running PHP as an Apache module, then restart apache with the command below:<\/p>\n<p>user@myVPS:~# service httpd restart<\/p>\n<p>That\u2019s it. You have successfully installed the ffmpeg-php extension.<\/p>\n<p>NOT!<br \/>\nEGER PIX_FMT_RGBA32\/PIX_FMT_RGB32<\/p>\n<p>ALIRSAN<\/p>\n<p>nano ffmpeg_frame.c<\/p>\n<p>DEDIKTEN SONRA<\/p>\n<p>RGBA32 OLAN SATIRLARI RGB32<br \/>\nYAP<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install FFmpeg First of all download and install RPMForge repository using the following commands: user@myVPS:~# wget http:\/\/pkgs.repoforge.org\/rpmforge-release\/rpmforge-release-0.5.3-1.el6.rf.$(arch).rpm user@myVPS:~# rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.$(arch).rpm Now you can install FFmpeg and some additional packages using yum. user@myVPS:~# yum -y install ffmpeg ffmpeg-devel libogg libvorbis lame flvtool2 mencoder Install ffmpeg-php To download and extract the ffmpeg-php tarball, run: user@myVPS:~# wget [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1059","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1059"}],"version-history":[{"count":2,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1059\/revisions"}],"predecessor-version":[{"id":1061,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1059\/revisions\/1061"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}