{"id":134,"date":"2009-09-30T17:13:08","date_gmt":"2009-09-30T21:13:08","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=134"},"modified":"2013-03-20T08:39:37","modified_gmt":"2013-03-20T12:39:37","slug":"error-pix_fmt_rgba32-undeclared","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/error-pix_fmt_rgba32-undeclared","title":{"rendered":"error: PIX_FMT_RGBA32 undeclared"},"content":{"rendered":"<p>The error message <strong>&#8220;Unable to load dynamic library &#8216;\/usr\/lib64\/php\/modules\/ffmpeg.so&#8221;<\/strong> is received when you add the ffmpeg.so extension to the PHP configuration file i.e. php.ini file and tries to run PHP. You can easily reproduce the error message by executing &#8220;php -v&#8221;:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>PHP Warning:\u00a0 PHP Startup: Unable to load dynamic library &#8216;\/usr\/lib64\/php\/modules\/ffmpeg.so&#8217; &#8211; \/usr\/lib64\/php\/modules\/ffmpeg.so: undefined symbol: _php_create_ffmpeg_frame in Unknown on line 0<\/strong><\/span><\/p><\/blockquote>\n<p>You may also notice the &#8220;PIX_FMT_RGBA32&#8221; error message while compiling ffmpeg-php<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>ffmpeg-php-0.5.0\/ffmpeg_frame.c:495: error: \u2018PIX_FMT_RGBA32\u2032 undeclared (first use in this function)<\/strong><\/span><\/p><\/blockquote>\n<p><strong>The above error messages is the result of incorrect function declared in the ffmpeg_frame.c file<\/strong> under the ffmpeg-php-0.x.0 directory.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>Solution:<\/strong><\/span><\/p>\n<p>Goto the the ffmpeg-php-0.x.0 directory and edit the ffmpeg_frame.c file<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>vi ffmpeg-php-0.x.0\/ffmpeg_frame.c<\/strong><\/span><\/p><\/blockquote>\n<p>Now replace every instance of &#8216;PIX_FMT_RGBA32&#8217; with &#8216;PIX_FMT_RGB32&#8217; in the file by executing<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>:%s\/PIX_FMT_RGBA32\/PIX_FMT_RGB32<\/strong><\/span><\/p><\/blockquote>\n<p><strong>OR<\/strong><\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>replace  &#8220;PIX_FMT_RGBA32&#8221; &#8220;PIX_FMT_RGB32&#8221; &#8212; ffmpeg_frame.c<\/strong><\/span><span style=\"color: #993300;\"><strong><br \/>\n<\/strong><\/span><\/p><\/blockquote>\n<p>Save the file and compile &#8216;ffmpeg-php&#8217; again using the following steps<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>cd ffmpeg-php-0.x.0<br \/>\nmake clean<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<\/strong><\/span><\/p><\/blockquote>\n<p>Once done, ffmpeg should work along with PHP now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The error message &#8220;Unable to load dynamic library &#8216;\/usr\/lib64\/php\/modules\/ffmpeg.so&#8221; is received when you add the ffmpeg.so extension to the PHP configuration file i.e. php.ini file and tries to run PHP. You can easily reproduce the error message by executing &#8220;php -v&#8221;:<br \/>\nPHP Warning:\u00a0 PHP Startup: Unable to load dynamic library &#8216;\/usr\/lib64\/php\/modules\/ffmpeg.so&#8217; &#8211; \/usr\/lib64\/php\/modules\/ffmpeg.so: undefined symbol: _php_create_ffmpeg_frame in Unknown on line 0<br \/>\nYou may also notice the &#8220;PIX_FMT_RGBA32&#8221; error message while compiling ffmpeg-php<br \/>\nffmpeg-php-0.5.0\/ffmpeg_frame.c:495: error: \u2018PIX_FMT_RGBA32\u2032 undeclared (first use in this function)<br \/>\nThe above error messages is the result of incorrect function declared [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1024,152,1027,1026,1023,1025],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/134"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":7,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":2097,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/134\/revisions\/2097"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}