установка ffmpeg

12
[Удален]
3331

Устанавливаю ffmpeg и постоянно выдает одну и ту же ошибку

после команд

cd /usr/local/src/ffmpeg-php-0.5.0

phpize

./configure

make && make install

ошибка

make: *** [ffmpeg_frame.lo] Error 1

Как это вылечить?

M
На сайте с 16.09.2009
Offline
278
#1
WapGraf:
Устанавливаю ffmpeg и постоянно выдает одну и ту же ошибку
после команд

cd /usr/local/src/ffmpeg-php-0.5.0
phpize
./configure
make && make install

ошибка

make: *** [ffmpeg_frame.lo] Error 1

Как это вылечить?

Скорее всего, какой-то кодек отсутствует. Ошибки вы не привели. Нужно смотреть лог компиляции.

Что за система? CentOS?

тогда гуглить по словам ffmpeg php rpm centos. Проще пересобрать rpm-ку от какой-нибудь федоры (сам так дела), если нужной версии ffmpeg нет в репах centos. Не стоит систему превращать в помойку без особой необходимости ;-)

Абонементное сопровождение серверов (Debian) Отправить личное сообщение (), написать письмо ().
C2
На сайте с 14.07.2009
Offline
83
#2

попробуйте

cp ffmpeg_frame.loT ffmpeg_frame.lo

и запустите компиляцию снова.

мож поможет.

[Удален]
#3
cyber2:
попробуйте
cp ffmpeg_frame.loT ffmpeg_frame.lo
и запустите компиляцию снова.
мож поможет.

cp: cannot stat `ffmpeg_frame.loT': No such file or directory

WapGraf добавил 07.10.2009 в 01:27

[root@server ffmpeg-php-0.5.0]# ./configure

checking for egrep... grep -E

checking for a sed that does not truncate output... /bin/sed

checking for gcc... gcc

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 gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking whether gcc and cc understand -c and -o together... yes

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... i686-redhat-linux-gnu

checking host system type... i686-redhat-linux-gnu

checking target system type... i686-redhat-linux-gnu

checking for PHP prefix... /usr

checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext

checking for PHP extension directory... /usr/lib/php/modules

checking for PHP installed headers prefix... /usr/include/php

checking for re2c... no

configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.

checking for gawk... gawk

checking for ffmpeg support... yes, shared

checking for ffmpeg headers... ...found in /usr/local/include/ffmpeg

checking for ffmpeg libavcodec.so... ...found in /usr/local/lib

checking for ld used by gcc... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for /usr/bin/ld option to reload object files... -r

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking how to recognise dependent libraries... pass_all

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking dlfcn.h usability... yes

checking dlfcn.h presence... yes

checking for dlfcn.h... yes

checking for g++... no

checking for c++... no

checking for gpp... no

checking for aCC... no

checking for CC... no

checking for cxx... no

checking for cc++... no

checking for cl... no

checking for FCC... no

checking for KCC... no

checking for RCC... no

checking for xlC_r... no

checking for xlC... no

checking whether we are using the GNU C++ compiler... no

checking whether g++ accepts -g... no

checking for g77... no

checking for f77... no

checking for xlf... no

checking for frt... no

checking for pgf77... no

checking for fort77... no

checking for fl32... no

checking for af77... no

checking for f90... no

checking for xlf90... no

checking for pgf90... no

checking for epcf90... no

checking for f95... no

checking for fort... no

checking for xlf95... no

checking for ifc... no

checking for efc... no

checking for pgf95... no

checking for lf95... no

checking for gfortran... no

checking whether we are using the GNU Fortran 77 compiler... no

checking whether accepts -g... no

checking the maximum length of command line arguments... 32768

checking command to parse /usr/bin/nm -B output from gcc object... ok

checking for objdir... .libs

checking for ar... ar

checking for ranlib... ranlib

checking for strip... strip

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc static flag -static works... yes

checking if gcc supports -c -o file.o... yes

checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no

configure: creating libtool

appending configuration tag "CXX" to libtool

appending configuration tag "F77" to libtool

configure: creating ./config.status

config.status: creating config.h

config.status: config.h is unchanged

[root@server ffmpeg-php-0.5.0]# make && make install

/bin/sh /usr/local/src/ffmpeg-php-0.5.0/libtool --mode=compile gcc -I. -I/usr/local/src/ffmpeg-php-0.5.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.5.0/include -I/usr/local/src/ffmpeg-php-0.5.0/main -I/usr/local/src/ffmpeg-php-0.5.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c -o ffmpeg_frame.lo

gcc -I. -I/usr/local/src/ffmpeg-php-0.5.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.5.0/include -I/usr/local/src/ffmpeg-php-0.5.0/main -I/usr/local/src/ffmpeg-php-0.5.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o

In file included from /usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:8:

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.h:5:22: error: avformat.h: No such file or directory

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c: In function '_php_convert_frame':

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:162: warning: implicit declaration of function 'img_convert'

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c: In function '_php_crop_frame':

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:215: warning: implicit declaration of function 'img_copy'

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c: In function '_php_resample_frame':

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:237: error: 'ImgReSampleContext' undeclared (first use in this function)

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:237: error: (Each undeclared identifier is reported only once

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:237: error: for each function it appears in.)

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:237: error: 'img_resample_ctx' undeclared (first use in this function)

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:263: warning: implicit declaration of function 'img_resample_full_init'

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:276: warning: implicit declaration of function 'img_resample'

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:281: warning: implicit declaration of function 'img_resample_close'

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c: In function 'zif_toGDImage':

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:409: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c: In function 'zif_ffmpeg_frame':

/usr/local/src/ffmpeg-php-0.5.0/ffmpeg_frame.c:495: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)

make: *** [ffmpeg_frame.lo] Error 1

N
На сайте с 06.05.2007
Offline
419
#4

Да нет. Такие вещи стоит собирать из исходников с обязательным нарушением авторских прав и тд. Например, ради поддержки аудиокодеков amr, которые в мобильном видео встречаются. Дистрибутивщики и сторонние репозитарии не любят собирать так.

А вот зачем нужен ffmpeg в php, я никогда не понимал. Бинарник отлично работает. Что, там в вордпрессе какой-нибудь придурошный плагин написали ?

Кнопка вызова админа ()
[Удален]
#5

что за бинарник? как использовать?

N
На сайте с 06.05.2007
Offline
419
#6

Прямо из php запускаете программу system("/usr/bin/ffmpeg" . " тут куча разных параметров"); и он вам все конвертирует. И php не жрет лишней памяти и программа ffmpeg не сможет завалить процесс php. Параметры придется изучить.

Такой бинарник возможно даже в официальной поставке дистрибутива есть.

[Удален]
#7

понятно. завтра поищу что к чему здесь. спасибо

Andreyka
На сайте с 19.02.2005
Offline
822
#8

Так оно же пишет: avformat.h: No such file or directory

Поставь чего ему не хватает и все соберется

Или используй готовый ffmpeg искаропки но без hd и прочих вкусностей ибо авторские права

Не стоит плодить сущности без необходимости
C2
На сайте с 14.07.2009
Offline
83
#9
netwind:

А вот зачем нужен ffmpeg в php, я никогда не понимал. Бинарник отлично работает. Что, там в вордпрессе какой-нибудь придурошный плагин написали ?

помоему это новая мода у адалт вебмастеров насчет потокового видео - свой клон ютюба на тему адалта. :) и тот скрипт требует php-ffmpeg.

N
На сайте с 06.05.2007
Offline
419
#10

ну hd (x.264) из коробки обычно таки работает.

неплохой вариант в репозитории medibuntu - там и amr и виндовые кодеки уже украдены, но текущие версии староваты. Так ведь у адалта и нет потребности конвертировать все разношерстные форматы.

12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий