View Full Version : exec and shell_exec

11-16-2006, 03:09 PM

I'm new to running exec commands on php.
I've had ffmpeg installed on my server, at /usr/local/bin/ffmpeg (a cmd line video decoder). It's a linux server, running php5.
From looking around the internet, I came up with this code to run it:

shell_exec("/usr/local/bin/ffmpeg -i /home/urieilam/www/work/video/subbed.mov -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 /home/urieilam/www/work/video/test.fla");

It's not working, no error message.
I'm running the code from within /home/urieilam/www/work/video/, is that the mistake? Do I have to add some code to move back to the root directory? If so, what is it?
I've also tried "exec" instead of "shell_exec", hasn't worked either.

Unfortunately, I don't have direct Shell/SSH access, so placing the php code in the root would be a problem (i think).

Anyone know about this stuff? The documentation I've been able to find is pretty lacking.


11-16-2006, 03:31 PM
can ffmpeg make flas? I thought it was flvs?
There is an $output parameter that you can use with exec() to store the response from the command - this might help you in debugging.

11-16-2006, 03:39 PM
sorry, mistyped the code.
it was "...flv" (in the acutal script)