If I execute a Ffmpeg command from terminal, I get the desired result:
ffmpeg -i src.mp4 -ar 22050 -ab 32 -f flv -s 320x240 video.flv
Terminal's output:
...
video:3404kB audio:1038kB global headers:0kB muxing overhead 2.966904%
And video.flv
is created correctly.
Then, if called via PHP exec:
exec("ffmpeg -i src.mp4 -ar 22050 -ab 32 -f flv -s 320x240 video.flv", $o, $v);
var_dump($o);
var_dump($v);
The output is this:
array(0) { } int(1)
And no file is created. Any thoughts on how to approach this?
I can exec('whoami')
with no problems and I have used the FFmpeg full path as well: /usr/local/bin/ffmpeg
output
, not stderr.