exec and shell_exec
Posted: Thu Nov 16, 2006 7:56 am
Hello,
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.
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.
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.
Thanks
Uri
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.
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.
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.
Thanks
Uri