05-13-2008, 09:46 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
|
ffmpeg converting using a cronjob
Hi,
I'm making some progress with ffmpeg but need some help working out why i cant run the same code using php as when i run in ssh.
Here is the php:
PHP Code:
$dir_root = "../../var/www/html/uploads/media/";
$temp_new = substr($o_newname, 0, strripos($o_newname, '.'));
$output = exec ("ffmpeg -i ".$dir_root.'o_'.$o_newname." -s qvga -y ".$dir_root.'n_'.$temp_new.".flv");
echo($output);
its a bit of a mess but its basically getting the input video, setting the size to 320x240 (qvga) and then outputting it as a .flv. When i use that output in ssh it works fine but when i run the above script it doesnt seem to do anything.
ffmpeg is located: /usr/bin/ffmpeg
website is location: /var/www/html/
Here is an example of what i paste into ssh:
Code:
ffmpeg -i ../../var/www/html/uploads/media/o_l2mWwMYOmDhuieDpNnb.avi -s qvga -y ../../var/www/html/uploads/media/n_l2mWwMYOmDhuieDpNnb.flv
is there any way to get some error checking in there or get an output back from the exec/ffmpeg command?
Regards,
Michael
|
|
|