LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-19-2008, 03:11 PM   #1
UBdebian
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Rep: Reputation: 0
Problem with ffmpeg-php?


Hello,

So...I try to launch ffmpeg-php/ffmpeg working in the last several days...but NO result. I install it and it shows OK/installed in phpinfo(), also when I run the tests everything goes well.
BUT the problem is that when I download or buy some video script online, I just can't see the movies in the video scripts(like clipshare, for example...).
I tried to install ffmpeg-php on fedora, centos and now on Debian. But everywhere I have that one and the same issue. It is OK, aside from the fact that it doesn't work (it doesn't convert the videos into flash and later doesn't show then of course...).

Is it possible to be a PHP 5 problem? In most tutorials online only the PHP 4 instructions are given and some people complain that ffmpeg-php stops to function when they install PHP 5. Why is that???
I am going to try it now on PHP 4 and will post later here if I succeed...in order to "help" some people like me...to work around that PHP 5 issue. If however the problem isn't in PHP 5, then I suspect it might be in the hostname. Since I run it on "localhost", perhaps it expects some domain name, depending on the "www" URL??? I don't know, but everything else seems to be OK.

Thanks for the help...
 
Old 05-03-2008, 01:20 PM   #2
UBdebian
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by UBdebian View Post
Hello,

So...I try to launch ffmpeg-php/ffmpeg working in the last several days...but NO result. I install it and it shows OK/installed in phpinfo(), also when I run the tests everything goes well.
BUT the problem is that when I download or buy some video script online, I just can't see the movies in the video scripts(like clipshare, for example...).
I tried to install ffmpeg-php on fedora, centos and now on Debian. But everywhere I have that one and the same issue. It is OK, aside from the fact that it doesn't work (it doesn't convert the videos into flash and later doesn't show then of course...).

Is it possible to be a PHP 5 problem? In most tutorials online only the PHP 4 instructions are given and some people complain that ffmpeg-php stops to function when they install PHP 5. Why is that???
I am going to try it now on PHP 4 and will post later here if I succeed...in order to "help" some people like me...to work around that PHP 5 issue. If however the problem isn't in PHP 5, then I suspect it might be in the hostname. Since I run it on "localhost", perhaps it expects some domain name, depending on the "www" URL??? I don't know, but everything else seems to be OK.

Thanks for the help...
I fixed it . The problem was that ffmpeg itself wasn't working...
I just typed ffmpeg the command on the terminal and it didn't find some .so file. I then copied the file on the required directory and so it worked...


Anyway, if anyone here experiences similar problems with ffmpeg, feel free to email me...I will usually reply within 12 hours .
 
Old 05-30-2008, 05:20 PM   #3
redbullet
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
Problems

Hi, we are having problems getting the ffmpeg working with PHP5. We have the example scripts but these will not do the video flash conversion - on of errors below:

Processing MOV00007.3gp
Warning: unlink(/hsphere/local/home/davidshead/daredevilworld.com/examples/tmp/1212181817-48406d395c973-multipass-0.log): No such file or directory in /hsphere/local/home/davidshead/daredevilworld.com/phpvideotoolkit.php on line 2266 FFMPEG ERROR: Execute error. Output for file "/hsphere/local/home/davidshead/daredevilworld.com/examples/to-be-processed/MOV00007.3gp" was not found. Please check server write permissions and/or available codecs compiled with FFmpeg. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().

Is there something we are doing wrong, could it be the paths in the example config file - ie its not finding the following:

define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', '/var/hsphere/local/bin/ffmpeg');
define('PHPVIDEOTOOLKIT_FLVTOOLS_BINARY', '/var/hsphere/bin/flvtool2');
define('PHPVIDEOTOOLKIT_MENCODER_BINARY', '/var/hsphere/local/bin/mencoder'); // only required for video joining
define('PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK', '/var/hsphere/local/lib/vhook/watermark.dylib'); // only required for video wartermarking

Any hints welcomed!
Thanks,
Simon
 
Old 06-01-2008, 12:25 PM   #4
UBdebian
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by redbullet View Post
Hi, we are having problems getting the ffmpeg working with PHP5. We have the example scripts but these will not do the video flash conversion - on of errors below:

Processing MOV00007.3gp
Warning: unlink(/hsphere/local/home/davidshead/daredevilworld.com/examples/tmp/1212181817-48406d395c973-multipass-0.log): No such file or directory in /hsphere/local/home/davidshead/daredevilworld.com/phpvideotoolkit.php on line 2266 FFMPEG ERROR: Execute error. Output for file "/hsphere/local/home/davidshead/daredevilworld.com/examples/to-be-processed/MOV00007.3gp" was not found. Please check server write permissions and/or available codecs compiled with FFmpeg. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().

Is there something we are doing wrong, could it be the paths in the example config file - ie its not finding the following:

define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', '/var/hsphere/local/bin/ffmpeg');
define('PHPVIDEOTOOLKIT_FLVTOOLS_BINARY', '/var/hsphere/bin/flvtool2');
define('PHPVIDEOTOOLKIT_MENCODER_BINARY', '/var/hsphere/local/bin/mencoder'); // only required for video joining
define('PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK', '/var/hsphere/local/lib/vhook/watermark.dylib'); // only required for video wartermarking

Any hints welcomed!
Thanks,
Simon

Hey there,

Well, to me it seems that your ffmpeg is not installed with the .3gp option.
The software responsible for 3gp conversion is called: AMR.

Here is a very detailed guide how to installed ffmpeg + the 3gp convert option(AMR...).

http://linux.justinhartman.com/FFmpe...R_Installation
The guide above is for Debian and Ubuntu only!

If you need guide for redhat based distribution(redhat, fedora, centos), then try this:

http://vexxhost.com/blog/category/ffmpeg/
However keep in mind that this guide doesn't include AMR(3gp conversion...) so you should add this...(simply download AMRnb in one directory with the rest of the tools and
then: configure -> make -> make install.


But if your problem is not in the 3gp conversion, then first off try to see if your ffmpeg is
installed at all:

1. Open terminal and type:
ffmpeg -v
2. You should see output similar to this:
debian:/home/johny# ffmpeg -v
FFmpeg version SVN-r12909, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-libmp3lame --enable-shared
libavutil version: 49.6.0
libavcodec version: 51.55.0
libavformat version: 52.13.0
libavdevice version: 52.0.0
built on Apr 19 2008 14:13:34, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
ffmpeg: missing argument for option '-v'
3. If you see something like this without any ERRORS, then your ffmpeg is ready to use...

And yet another option:
What script do you use??? I found that "clipshare" doesn't work on php5 so in my opinion
try something simpler such as "youtube clone". Try to find this script..."youtube clone".
It has automatic installer and it's free. Try to avoid clipshare or any other script that
uses perl or anytyhing else other than PHP for ffmpeg conversion.


And at the end...check your permissions on the directories.
Better every directory to have chmod 777 permission. Open terminal and make all
/www directories "chmod 777".


So at the end: Try simpler script, try to convert .avi file(to see if the problem is in 3gp)
and see your permissions + ffmpeg if it's up and running.


Hope this helps...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg problem mkhan919 Linux - Newbie 5 09-24-2008 05:03 PM
FFMPEG-PHP "toGdImage()" error and many other problems JustinMs66 Linux - Server 0 03-07-2008 10:23 PM
PHP: Adding ffmpeg-php without re-compiling? vxc69 Linux - Software 2 05-17-2007 05:47 PM
Problem with ffmpeg.. BDiddy Linux - Software 0 10-18-2005 04:38 PM
Problem executing a linux script from php that runs ffmpeg darkisolde Linux - Software 4 10-04-2005 08:43 AM


All times are GMT -5. The time now is 08:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration