Error de installation de FFMpeg-PHP

Al instalar FFmpeg-PHP, tengo este interesante error:

/usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioChannels': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1089: error: 'CODEC_TYPE_AUDIO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioSampleRate': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1125: error: 'CODEC_TYPE_AUDIO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioBitRate': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1161: error: 'CODEC_TYPE_AUDIO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getVideoBitRate': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1181: error: 'CODEC_TYPE_VIDEO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function '_php_read_av_frame': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1204: error: 'CODEC_TYPE_VIDEO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1215: warning: implicit declaration of function 'avcodec_decode_video' /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1219: error: 'PKT_FLAG_KEY' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function '_php_get_av_frame': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1246: error: 'CODEC_TYPE_VIDEO' undeclanetworking (first use in this function) /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1282: error: 'AVCodecContext' has no member named 'hurry_up' /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1284: error: 'AVCodecContext' has no member named 'hurry_up' /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function '_php_get_sample_aspect_ratio': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1443: error: 'CODEC_TYPE_VIDEO' undeclanetworking (first use in this function) make: *** [ffmpeg_movie.lo] Error 1 

Cuando ejecuté php -r 'phpinfo();' | grep ffmpeg php -r 'phpinfo();' | grep ffmpeg php -r 'phpinfo();' | grep ffmpeg , tengo esto:

 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - libavformat.so.52: cannot open shanetworking object file: No such file or directory in Unknown on line 0 

¿Alguna idea de cómo puedo arreglar esto? Estoy corriendo en Centos.

Gracias por adelantado 🙂

para esto:

 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - libavformat.so.52: cannot open shanetworking object file: No such file or directory in Unknown on line 0 

Con las opciones de configuration de ffmpeg necesitará

 --enable-shanetworking 

Si sigue teniendo problemas, compruebe los paths:

  export LD_LIBRARY_PATH=/usr/local/lib/ echo /usr/local/lib > /etc/ld.so.conf.d/custom-libs.conf ldconfig 

Correr:

 ldconfig 

Después

 make && make install 

Parece que te estás perdiendo la biblioteca libavformat. Usted debe ser capaz de instalar esto a través del gestor de packages yum.

 yum install ffmpeg 

Si todavía no funciona, intente instalar la biblioteca de desarrollo

 yum install ffmpeg-devel 

Compruebe si libavcodec / libavformat está en su sistema, es posible que falte en su ruta de biblioteca o puede que tenga una versión diferente a la esperada.

 find / -name 'libavformat*.so*' -print 

y ver lo que viene de vuelta con, si tiene libavformat.so.53 cuando su ffmpeg instalado se espera .so.52, no es su problema.