can't get output of exec ('nice -n 19 ffmpeg -i "file"')
| From: | Rene Veerman | Date: | Mon, 29 Sep 2008 18:53:40 +0000 |
| Subject: | can't get output of exec ('nice -n 19 ffmpeg -i "file"') | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-281129@lists.php.net to get a copy of this message | ||
Hi, i have the following php statements;
I'm wondering why exec()'s $output remains empty..
Any help is greatly appreciated..
<?php
$cmd = 'nice -n 19 ffmpeg -i "'.$sourcePath.'"';
exec ($cmd, $output, $result);
return array (
'cmd' => $cmd,
'output' => $output,
'result' => $result
);
which when executed returns
["cmd"]=>string(128) "nice -n 19 ffmpeg -i "/data/web/secret/20080929 201651/work/MVI_1993.avi""
["output"]=>array(0) {
}
["result"]=>int(1)
}
if i run the same "cmd" on the commandline, it nicely returns:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-gpl --enable-pp --enable-pthreads --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm --enable-mp3lame --enable-faad --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
libavutil version: 0d.49.0.0
libavcodec version: 0d.51.11.0
libavformat version: 0d.50.5.0
built on Sep 29 2008 18:43:44, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Input #0, avi, from '/data/web/LIVE_WEBSITES/www/veerman.name/mediaBeez_content/media/upload/20080929 201651/work/MVI_1993.avi':
Duration: 00:01:45.6, start: 0.000000, bitrate: 1746 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 15.00 fps(r)
Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, 88 kb/s
Must supply at least one output file