Skip to content

Instantly share code, notes, and snippets.

@chappyhome
Created March 4, 2014 02:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chappyhome/9339482 to your computer and use it in GitHub Desktop.
Save chappyhome/9339482 to your computer and use it in GitHub Desktop.
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie___construct':
Latest svn revision will not compile against php 5.4
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie___construct':
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: 'list_entry' undeclared (first use in this function)
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: (Each undeclared identifier is reported only once
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: for each function it appears in.)
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:318: error: 'le' undeclared (first use in this function)
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:353: error: expected ';' before 'new_le'
/root/ffmpeg/ffmpeg-php-0.7.0/ffmpeg_movie.c:363: error: 'new_le' undeclared (first use in this function)
Discussion
Kirill
Kirill
2012-07-18
Same problem
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c: In function 'zim_ffmpeg_movie___construct':
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c:311: error: 'list_entry' undeclared (first use in this function)
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c:311: error: (Each undeclared identifier is reported only once
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c:311: error: for each function it appears in.)
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c:311: error: 'le' undeclared (first use in this function)
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c:346: error: expected ';' before 'new_le'
/usr/work/src/php-5.4.4/ext/ffmpeg/ffmpeg_movie.c:356: error: 'new_le' undeclared (first use in this function)
Link
CentTom
CentTom
2012-07-27
Hi Guys,
i have the solucion ... i hope it helps
Changes in ffmpeg_movie.c:
row 311: list_entry *le; TO zend_rsrc_list_entry *le;
row 346: list_entry new_le; TO zend_rsrc_list_entry new_le;
row 360: hashkey_length+1, (void *)&new_le, sizeof(list_entry), TO hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),
Thats all... change it and make it
Thomas
@chappyhome
Copy link
Author

ffmpeg-php gd support disabled

I just upgraded a CentOS 6.5 server from PHP 5.4.x to PHP 5.5.x, without any problems. However when I recompile ffmpeg-php-0.6.0 I get this in a PHP info page:

Code:

ffmpeg-php gd support   disabled

Previous it was enabled. Does anybody have any idea how to solve this? I have tried for several hours. Heres is more output:

Code:

[root@server/]# php --info | grep ffmpeg
ffmpeg
ffmpeg-php version => 0.6.0-svn
ffmpeg-php built on => Dec 21 2013 17:14:58
ffmpeg-php gd support  => disabled
ffmpeg libavcodec version => Lavc52.72.2
ffmpeg libavformat version => Lavf52.64.2
ffmpeg swscaler version => SwS0.11.0
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
OLDPWD => /root/ffmpeg-php-0.6.0
_SERVER["OLDPWD"] => /root/ffmpeg-php-0.6.0

Code:

[root@server /]# php --info | grep GD
GD Support => enabled
GD Version => bundled (2.1.0 compatible)

Code:

[root@server/]# which ffmpeg
/usr/bin/ffmpeg

Reply With Quote Reply With Quote
12-21-2013, 10:46 PM #2
ditto
ditto is offline Verified User

Join Date
Apr 2009
Posts
1,494

I fixed it by disabling the check for gd, because I have gd installed in php, so it should work. I added --enable-skip-gd-check in configure command, like this:

Code:

./configure --enable-skip-gd-check

Looks good now:

Code:

[root@server~]# which ffmpeg
/usr/bin/ffmpeg
[root@server~]# php --info | grep GD
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
[root@server~]# php --info | grep ffmpeg
ffmpeg
ffmpeg-php version => 0.6.0-svn
ffmpeg-php built on => Dec 22 2013 06:44:40
ffmpeg-php gd support  => enabled
ffmpeg libavcodec version => Lavc52.72.2
ffmpeg libavformat version => Lavf52.64.2
ffmpeg swscaler version => SwS0.11.0
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
[root@server~]#

@chappyhome
Copy link
Author

ffmpeg-php error

While compiling ffmpeg-php Error: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_toGDImage’: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function) /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.) /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_ffmpeg_frame’: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function) ————————————————————————————–

Fix: With the latest version of ffmpeg-php (0.6.0), update ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32

vi ffmpeg_frame.c

:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32

:w :q!

./configure make make install add extension=”ffmpeg.so” inside php.ini .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment