![]() |
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:
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.flvRegards, Michael |
exec will only return the last line which in this case might be a blank line.
Is safemode on? If safemode is on, exec will not work. You could also try PHP: shell_exec - Manual I believe shell_exec returns all output as a string. |
Also, after reading the manual, exec can return values, you just need to specify it;
PHP Code:
|
ok i changed the script to do this:
PHP Code:
PHP Code:
I then tried this: PHP Code:
Thanks for your help! PS: safe mode is not turned on. |
Hmm, not sure.
Does the PHP user have access to run ffmpeg? There may be a potential permissions problem. That does tell me that nothing is being returned from the command line though; What happens when you do just exec 'whoami'? See if that returns any information in the array. |
| All times are GMT. The time now is 09:42 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0