ffmpeg-php icon indicating copy to clipboard operation
ffmpeg-php copied to clipboard

PHP is unable to load dynamic library

Open cyke opened this issue 9 years ago • 4 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.

cyke avatar Jan 01 '16 17:01 cyke

I've got that too. :)

pbek avatar Jan 13 '16 11:01 pbek

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)

pbek avatar Jan 13 '16 11:01 pbek

now in https://github.com/tony2001/ffmpeg-php/pull/18

pbek avatar Jan 13 '16 11:01 pbek

@tony2001, any ideas?

pbek avatar Jan 13 '16 12:01 pbek