1. Subscriptions
  2. Services
  3. Hardware
  4. Support

ClearFoundation

Forums
Welcome, Guest
installing ffmpeg-php
(1 viewing) 1 Guest
Go to bottomPage: 1
TOPIC: installing ffmpeg-php
#15448
installing ffmpeg-php 1 Year, 9 Months ago  
Hello,

I'm trying to setup ffmpeg-php on my system, I installed ffmpeg with:

Code:


yum --enablerepo=base-extras install ffmpeg



However when I downloaded ffmpeg-php v 0.6 from Sourceforge.

and run:

Code:


./configure
make
make test



I get the following:

Code:


=====================================================================
PHP         : /usr/bin/php 
PHP_SAPI    : cli
PHP_VERSION : 5.3.2
ZEND_VERSION: 2.3.0
PHP_OS      : Linux - Linux sns.scischina.org 2.6.18-164.11.1.v5 #1 SMP Mon Feb 1 18:51:28 EST 2010 i686
INI actual  : /usr/local/src/ffmpegphp/ffmpeg/tmp-php.ini
More .INIs  :  
CWD         : /usr/local/src/ffmpegphp/ffmpeg
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2010-08-07 13:50:21
=====================================================================
SKIP Check for ffmpeg presence [tests/001.phpt] 
FAIL ffmpeg getAudioChannels test [tests/getAudioChannels.phpt] 
FAIL ffmpeg getAudioCodec test [tests/getAudioCodec.phpt] 
FAIL ffmpeg getBitRate test [tests/getBitRate.phpt] 
FAIL ffmpeg getDuration test [tests/getDuration.phpt] 
FAIL ffmpeg getFileName test [tests/getFileName.phpt] 
SKIP ffmpeg getFrame test [tests/getFrame.phpt] reason: ffmpeg extension not loaded
FAIL ffmpeg getFrameCount test [tests/getFrameCount.phpt] 
SKIP ffmpeg getFrame cropping test [tests/getFrameCrop.phpt] reason: ffmpeg extension not loaded
FAIL ffmpeg getFrameHeight test [tests/getFrameHeight.phpt] 
FAIL ffmpeg getFrameNumber test [tests/getFrameNumber.phpt] 
FAIL ffmpeg getFrameRate test [tests/getFrameRate.phpt] 
SKIP ffmpeg getFrameResampled test [tests/getFrameResampled.phpt] reason: ffmpeg extension not loaded
FAIL ffmpeg getFrameWidth test [tests/getFrameWidth.phpt] 
SKIP ffmpeg getFrame backwards test [tests/getFramesBackwards.phpt] reason: ffmpeg extension not loaded
SKIP ffmpeg getFrames forward test [tests/getFramesForward.phpt] reason: ffmpeg extension not loaded
SKIP ffmpeg getFrame without an argument test [tests/getFramesNoArg.phpt] reason: ffmpeg extension not loaded
SKIP ffmpeg getFrameResampled test [tests/getFramesResampled.phpt] reason: ffmpeg extension not loaded
FAIL ffmpeg getPixelFormat test [tests/getPixelFormat.phpt] 
FAIL ffmpeg getVideoCodec test [tests/getVideoCodec.phpt] 
FAIL ffmpeg hasAudio test [tests/hasAudio.phpt] 
=====================================================================
TIME END 2010-08-07 13:50:21

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   28
---------------------------------------------------------------------

Number of tests :   21                13
Tests skipped   :    8 ( 38.1%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :   13 ( 61.9%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    0 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
ffmpeg getAudioChannels test [tests/getAudioChannels.phpt]
ffmpeg getAudioCodec test [tests/getAudioCodec.phpt]
ffmpeg getBitRate test [tests/getBitRate.phpt]
ffmpeg getDuration test [tests/getDuration.phpt]
ffmpeg getFileName test [tests/getFileName.phpt]
ffmpeg getFrameCount test [tests/getFrameCount.phpt]
ffmpeg getFrameHeight test [tests/getFrameHeight.phpt]
ffmpeg getFrameNumber test [tests/getFrameNumber.phpt]
ffmpeg getFrameRate test [tests/getFrameRate.phpt]
ffmpeg getFrameWidth test [tests/getFrameWidth.phpt]
ffmpeg getPixelFormat test [tests/getPixelFormat.phpt]
ffmpeg getVideoCodec test [tests/getVideoCodec.phpt]
ffmpeg hasAudio test [tests/hasAudio.phpt]
=====================================================================

You may have found a problem in PHP.
We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.
Do you want to send this report now? [Yns]: 




Any idea what I'm going wrong. Is there an easier way to get ffmpeg-php running on my system. I'm trying to setup PHPMotion.

Chris
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15449
Re:installing ffmpeg-php 1 Year, 9 Months ago  
Did you edit /etc/php.ini and append the line "extension=ffmpeg.so" in the category ‘Dynamic Extensions’, then restart httpd?
Tony Ellis
Platinum Boarder
Posts: 927
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15454
Re:installing ffmpeg-php 1 Year, 9 Months ago  
You usually do that after ./configure and building ffmpeg-php.

However, i just added it, restarted apache, and then tried again... no luck.

Thanks for the suggestion however.
Chris
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15471
Re:installing ffmpeg-php 1 Year, 9 Months ago  
No problem - just you didn't mention doing so in your first append

There is a rpm available from Dag - why did you choose compile over the rpm? The rpm would make sure all the necessary pre-requisites are in place...
Tony Ellis
Platinum Boarder
Posts: 927
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15475
Re:installing ffmpeg-php 1 Year, 9 Months ago  
I installed ffmpeg with yum, but I don't see a way to install ffmpeg-php with the rpm.
Chris
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15478
Re:installing ffmpeg-php 1 Year, 9 Months ago  
Funny - I'm sure I had seen a rpm there, but evidently not...

The fact that you are skipping tests usually indicates a missing pre-requisite. That's the problem with tarballs - little checking. One common reason for skipping these ffmeg-php tests, for instance, is that php-gd is not installed...

Edit: OK - so my memory flipped a bit - it was a ffmpeg-php rpm for Fedora 7 that I used to run...
Tony Ellis
Platinum Boarder
Posts: 927
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/08 04:06 By track.
The administrator has disabled public write access.
 
#15488
Re:installing ffmpeg-php 1 Year, 9 Months ago  
Interesting, well it seems that GD is install (below from phpinfo). However from the test failures, it seems that ffmpeg is not installed correctly. I used yum with the repository and it seems to be missing prerequisites.

Code:


ffmpeg: error while loading shared libraries: libavfilter.so.1: cannot open shared object file: No such file or directory



Is there a recommended repository I use to install ffmpeg with along with required libraries etc?

I had attempted to install it with:

Code:


yum install ffmpeg


along with the devel.

I do have this as my repository

Code:


[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://dag.linux.iastate.edu/dag/redhat/el5/en/$basearch/dag
gpgcheck=1
enabled=1


Chris
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15504
Re:installing ffmpeg-php 1 Year, 9 Months ago  
My own view is that ffmpeg is problematic - I was last involved with it during the time dolphin was being discussed (beware - a very long thread)
www.clearfoundation.com/component/option...c,view/id,7263/#7263

ffmpeg has a very large number of pre-requisites, and I suspect things go wrong when you mix pre-requisites from a large number of different sources so you end up with some at levels that other associated programs are not compatible with... just a hunch...

If you use Dag, then I expect that you would have to make sure that every pre-requisite came from Dag if he has it, and not a mixture of CentOS and Dag.

Currently I am not using ffmpeg-php, but do use ffmpeg on my Fedora 12 workstation for video format conversions. Maybe I should compile ffmpeg-php there and see how it goes, if I can find the time...
Tony Ellis
Platinum Boarder
Posts: 927
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15511
Re:installing ffmpeg-php 1 Year, 9 Months ago  
OK I decided to test on ClearOS as that would be more useful to people here...

After installing all the rpms and compiling ffmpeg-php I get this - all test fail
Code:


---
Number of tests :   29                29
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :   29 (100.0%) (100.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
...



If I do this I get much more information...
Code:


[root@georgina tests]# php getAudioChannels.phpt
--TEST--
ffmpeg getAudioChannels test
--SKIPIF--
--FILE--
[mpeg @ 0x97a8590]invalid dts/pts combination
ffmpeg getAudioChannels(): 1
--EXPECT--
ffmpeg getAudioChannels(): 1
[root@georgina tests]# 



Note the test result is good - just this error
[mpeg @ 0x97a8590]invalid dts/pts combination

So I replaced the supplied test file with my own. Obviously the actual result will differ from the expected result in a large number of cases - but may prove enlightening with regards to errors...

Now we get (run 3 of the tests)...
Code:


[root@georgina tests]# php getAudioChannels.phpt
--TEST--
ffmpeg getAudioChannels test
--SKIPIF--
--FILE--
ffmpeg getAudioChannels(): 1
--EXPECT--
ffmpeg getAudioChannels(): 1
[root@georgina tests]# php getAudioSampleRate.phpt
--TEST--
ffmpeg getAudioSampleRate test
--SKIPIF--
--FILE--
ffmpeg getAudioSampleRate(): 11024
--EXPECT--
ffmpeg getAudioSampleRate(): 32000
[root@georgina tests]# php getFrameCount.phpt
--TEST--
ffmpeg getFrameCount test
--SKIPIF--
--FILE--
ffmpeg getFrameCount(): 414
--EXPECT--
ffmpeg getFrameCount(): 240
[root@georgina tests]# 


So it works - just the supplied test file (robot.avi) causes problems!

to be continued...
Tony Ellis
Platinum Boarder
Posts: 927
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/09 02:12 By track.
The administrator has disabled public write access.
 
#15526
Re:installing ffmpeg-php 1 Year, 9 Months ago  
To prevent the "invalid dts/pts combination" messages, your ffmpeg must have been compiled with this patch...

Code:


Author: cehoyos
Date: Thu Jul 1 01:01:44 2010
New Revision: 23919

Log:
Make "invalid dts/pts combination" a debug instead of a warning message.

Patch by XBMC

Modified:
trunk/libavformat/utils.c

Modified: trunck/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c    Thu Jul 1 00:39:13 2010    (r23918)
+++ trunk/libavformat/utils.c    Thu Jul 1 01:01:44 2010    (r23919)
@@ -908,7 +908,7 @@ static void compute_pkt_fields(AVFormatC
// we take the conservative approach and discard both
// Note, if this is misbehaving for a H.264 file then possibly presentation_delayed is not set correctly.
if(delay==1 && pkt->dts == pkt->pts && pkt->dts != AV_NOPTS_VALUE && presentation_delayed){
- av_log(s, AV_LOG_WARNING, "invalid dts/pts combination\n");
+ av_log(s, AV_LOG_DEBUG, "invalid dts/pts combination\n");
pkt->dts= pkt->pts= AV_NOPTS_VALUE;
}

Tony Ellis
Platinum Boarder
Posts: 927
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/09 08:46 By track.
The administrator has disabled public write access.
 
Go to topPage: 1
  get the latest posts directly to your desktop