Заголовки ffmpeg не найдены при настройке ffmpeg-php

2577
Digin Dominic

Я настраиваю ffmpeg-php на установленном cpanel сервере centos 6.8.

Мне удалось успешно установить все необходимые пакеты, необходимые для установки ffmpeg.

Также я успешно конвертировал видео из одного формата в другой.

[root@server ~]# ffmpeg -version ffmpeg version N-81056-g134fe28-syslint Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 50.100 / 57. 50.100 libavformat 57. 43.100 / 57. 43.100 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 47.100 / 6. 47.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 

Следующим шагом была настройка ffmpeg-php

Я следовал этой процедуре

wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.6.0.tbz2 Untar this package, build and install it with following commands: tar xjf ffmpeg-php-0.6.0.tbz2 cd ffmpeg-php-0.6.0 sed -i ‘s/PIX_FMT_RGBA32/PIX_FMT_RGB32/g’ ffmpeg_frame.c phpize ./configure make make install 

Затем я внес изменения /usr/local/lin/php.iniв следующем

extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20020429" 

и добавил следующую строку в конец файла php.ini

extension=ffmpeg.so 

Настоящая проблема возникает при выполнении ./configure Я получаю эту ошибку и не могу продолжить.

[root@server ffmpeg-php-0.6.0]# ./configure checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables...  checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr/local checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20121212 checking for PHP installed headers prefix... /usr/local/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 0.13.6 (ok) checking for gawk... gawk checking for ffmpeg support... yes, shared checking whether to force gd support in ffmpeg-php... no checking for ffmpeg headers...  configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option 

Дополнительно

[root@server ffmpeg-php-0.6.0]# make make: *** No targets specified and no makefile found. Stop. [root@server ffmpeg-php-0.6.0]# make install make: *** No rule to make target `install'. Stop. 
2
Я получаю ту же ошибку с php5.6 на centos, как решить эту ошибку? Nullpointer 7 лет назад 0

1 ответ на вопрос

-2
Elvis Thomas

Попробуй настроить

./configure --with-ffmpeg=/usr/local/cpffmpeg 
В какой момент процесса это должно произойти? Что это будет делать? Как это решает проблему как описано OP? music2myear 7 лет назад 0

Похожие вопросы