Page 1 of 1

Cannot execute FFMPEG in php script

Posted: Sun Apr 15, 2007 3:28 pm
by arifsusam
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hello,

I am trying to convert uploaded video files of various formats, automatically to the flash format.

I use ffmpeg and php's "exec" command as below:

Code: Select all

<?php 
exec("ffmpeg -i clip_25.wmv -ar 22050 -ab 32 -f flv -s 320×240 destfile.flv");
echo "Test OK.";
?>
The script works fine on my local computer (meaning i can see 'Test OK')

but when i upload and run it on the server 'Test ok' doesn't show up on the client's browser.
Always a blank page. No matter what i write after of before the conversion line.

However, the strange thing is, the file is perfectly converted, even on the server side.
Which proves that ffmpeg and it's codecs are working fine.

As the display is always a blank page,
The fact is that the error is shown nowhere and that makes the page impossible to debug.

The server is running php 4.1.1.1 and IIS 6.0.

Any suggessions?


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Mon Apr 16, 2007 5:38 am
by stereofrog
try

Code: Select all

exec("your command here 2>&1", $out);
print_r($out);
also check your error_reporting and display_errors settings.