LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tryin to install FFmpeg (https://www.linuxquestions.org/questions/linux-newbie-8/tryin-to-install-ffmpeg-888965/)

awww 06-29-2011 07:41 AM

Tryin to install FFmpeg
 
I have been tryin to install ffmpeg but it doesnt seem to work when i type the whereis command i get this ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz

so ok that means its installed but every time i try to install the extension it doesn't show i recently installed uploadprogress and added the extension to the .php.ini file and its there
http://i51.tinypic.com/2iqi9hl.png
extensions here what am i doing wrong

http://i51.tinypic.com/e1avqh.png

Snark1994 06-29-2011 07:47 AM

Is it under the "Dynamic Extensions" section of your php.ini file? There should be a line saying "extension=ffmpeg.so", like you had in your screenshot (btw, if you're just posting text, it's better to do it AS text rather than in a screenshot :) )

Also, have you restarted your httpd server (or rebooted)?

Cultist 06-29-2011 07:52 AM

What distro are you trying to install it in?

awww 06-29-2011 07:52 AM

yes i rebooted the whole server even to make sure its here

its below every thing in my php.ini file

---------- Post added 06-29-11 at 07:52 AM ----------

OS: CentOS 5 w/ Plesk

Cultist 06-29-2011 07:56 AM

Did you compile FFmpeg from source or did you install it as an RPM package? And if you used a package, was it one specific to another distro?

awww 06-29-2011 07:57 AM

i used yum to install it

Snark1994 06-29-2011 07:58 AM

Wait, sorry, just re-read your original post - you've install ffmpeg, have you installed ffmpeg-php ?

awww 06-29-2011 08:04 AM

i think yes

Code:

[root@~]# yum install ffmpeg ffmpeg-devel php-devel
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * atomic: www4.atomicorp.com
 * epel: mirrors.solfo.com
 * rpmforge: fr2.rpmfind.net
Reducing CentOS-5 Testing to included packages only
Finished
2051 packages excluded due to repository priority protections
Setting up Install Process
Package ffmpeg-0.6.1-1.el5.rf.x86_64 already installed and latest version
Package ffmpeg-devel-0.6.1-1.el5.rf.x86_64 already installed and latest version
Package php-devel-5.3.6-3.el5.art.x86_64 already installed and latest version


Snark1994 06-29-2011 08:05 AM

Reading this article, you need to compile and install ffmpeg-php manually having installed some of the packages you just installed.

awww 06-29-2011 08:10 AM

would this be the issue because thats the same site i followed to install it


Code:

Reducing CentOS-5 Testing to included packages only
Finished
2051 packages excluded due to repository priority protections
Setting up Install Process
Package ffmpeg-0.6.1-1.el5.rf.x86_64 already installed and latest version
Package ffmpeg-devel-0.6.1-1.el5.rf.x86_64 already installed and latest version
Package php-devel-5.3.6-3.el5.art.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package php-devel.i386 0:5.3.6-3.el5.art set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch        Version                    Repository      Size
================================================================================
Installing:
 php-devel        i386        5.3.6-3.el5.art            atomic        623 k

Transaction Summary
================================================================================
Install      1 Package(s)
Upgrade      0 Package(s)

Total size: 623 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /usr/bin/php-config from install of php-devel-5.3.6-3.el5.art.i386 conflicts with file from package php-devel-5.3.6-3.el5.art.x86_64
  file /usr/include/php/main/build-defs.h from install of php-devel-5.3.6-3.el5.art.i386 conflicts with file from package php-devel-5.3.6-3.el5.art.x86_64
  file /usr/include/php/main/php_config.h from install of php-devel-5.3.6-3.el5.art.i386 conflicts with file from package php-devel-5.3.6-3.el5.art.x86_64

Error Summary
-------------


Snark1994 06-29-2011 08:11 AM

Then what about the section:

Quote:

Installing ffmpeg-php

Now we are ready to install ffmpeg-php. This can be done in six easy steps:

Download the latest ffmpeg-php release
Extract the archive:
Code:

tar -xjf ffmpeg-php-X.x.x.tbz2
    cd ffmpeg-php-X.x.x/
    phpize
    ./configure && make
    sudo make install



awww 06-29-2011 08:16 AM

yes i get these errors

Code:

config.status: creating config.h
/bin/sh /root/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing  -c /root/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
mkdir .libs
 cc -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/ffmpeg-php-0.6.0/ffmpeg-php.c  -fPIC -DPIC -o .libs/ffmpeg-php.o
/bin/sh /root/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing  -c /root/ffmpeg-php-0.6.0/ffmpeg_movie.c -o ffmpeg_movie.lo
 cc -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/ffmpeg-php-0.6.0/ffmpeg_movie.c  -fPIC -DPIC -o .libs/ffmpeg_movie.o
/root/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function '_php_read_av_frame':
/root/ffmpeg-php-0.6.0/ffmpeg_movie.c:1215: warning: 'avcodec_decode_video' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3454)
/bin/sh /root/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing  -c /root/ffmpeg-php-0.6.0/ffmpeg_frame.c -o ffmpeg_frame.lo
 cc -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/ffmpeg-php-0.6.0/ffmpeg_frame.c  -fPIC -DPIC -o .libs/ffmpeg_frame.o
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_toGDImage':
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_ffmpeg_frame':
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1
[root@e2180-22530 ffmpeg-php-0.6.0]# make install
/bin/sh /root/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing  -c /root/ffmpeg-php-0.6.0/ffmpeg_frame.c -o ffmpeg_frame.lo
 cc -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.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/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/ffmpeg-php-0.6.0/ffmpeg_frame.c  -fPIC -DPIC -o .libs/ffmpeg_frame.o
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_toGDImage':
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_ffmpeg_frame':
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1
[root@ ffmpeg-php-0.6.0]#


Snark1994 06-29-2011 08:21 AM

Okay, run these commands:
Code:

cp /root/ffmpeg-php-0.6.0/ffmpeg_frame.c{,.bak}
sed 's/PIX_FMT_RGBA32/PIX_FMT_RGB32/g' /root/ffmpeg-php-0.6.0/ffmpeg_frame.c.bak > /root/ffmpeg-php-0.6.0/ffmpeg_frame.c

(ie. replace all the PIX_FMT_RGBA32s with PIX_FMT_RGB32s :) )

EDIT: Also, can you replace your [PHP] tags with [CODE] tags please? Currently, it distorts the page :D

awww 06-29-2011 08:28 AM

ok i done that now what

Snark1994 06-29-2011 08:30 AM

Try to compile it again :) ./configure, make, make install.

awww 06-29-2011 09:25 AM

i installed ffmpeg correctly when i run the php -m | grep ffmpeg i get a blank response why?

Snark1994 06-29-2011 09:28 AM

Because it's not compiled in (see 'man php'). Check your phpinfo() to see if the module is being correctly loaded dynamically

awww 06-29-2011 09:35 AM

im looking in my phpinfo and see ffmpeg install correctly ffmpeg
ffmpeg-php version 0.6.0-svn
ffmpeg-php built on Jun 29 2011 07:14:47
ffmpeg-php gd support enabled
ffmpeg libavcodec version Lavc52.72.2
ffmpeg libavformat version Lavf52.64.2
ffmpeg swscaler version SwS0.11.0
ffmpeg.allow_persistent 0 0
ffmpeg.show_warnings 0 0

Snark1994 06-29-2011 09:38 AM

So has your problem been solved? If so, can you mark it as [SOLVED] using the thread tools please.

awww 06-29-2011 09:39 AM

no its not solved because it still wont convert videos at all maybe its my script

Snark1994 06-29-2011 09:42 AM

In that case, could you make this thread as SOLVED (as you have managed to install ffmpeg-php), open a new thread in the programming forum called "ffmpeg-php won't convert videos", and post the link here? That way I will be able to continue to help you, and other people who might be more experienced with the package / problem will be able to help you as well :)

Thanks,

mount.nfs 02-27-2021 01:38 AM

Attachment 35730

simply download the debian .deb packages
unzip extract the debian file by dpkg-deb -x file.deb .
./command
don't forget . and /

command example ./ffmpeg -i input.mp3 -aq 0.3 out.m4a

mount.nfs 12-18-2021 03:17 AM

I executable ./ffmpeg on 18.04.x

./ffmpeg -i file1.mp3 -i file2.mp3 output1.mp3

./ffmpeg -i file1.mp3,file2.mp3 output2.mp3

above commands error invalid.
Can join 2 or more mp3 sound file(s) ?

computersavvy 12-18-2021 11:12 AM

Please, PLEASE, open your own thread.

This one has been closed for more than ten years and it is not likely that you will get an answer that is specific to YOUR problem here.


All times are GMT -5. The time now is 02:33 PM.