ffmpeg works on terminal not with PHP exec
- by goliatone
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%
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:
array(0) { } int(1)
Any thoughts on how to approach this?