tony2001 / ffmpeg-php

PHP extension for video editing, wrapping ffmpeg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP is unable to load dynamic library

cyke opened this issue · comments

Hello.

I was able to compile this library.
But when I look it into php (with php --ri ffmpeg) I got this output :

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/ffmpeg.so' - /usr/lib/php5/20121212/ffmpeg.so: undefined symbol: avcodec_alloc_frame in Unknown on line 0

Do you know why ?

Thanks a lot.

Adrien.

I've got that too. :)

I added #define av_frame_alloc avcodec_alloc_frame to php_ffmpeg.h, that did the trick.

It would be better to do a

#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
#define av_frame_alloc avcodec_alloc_frame
#endif

but that threw an error

php_ffmpeg.h:61:44: error: missing binary operator before token "("
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)