ffmpeg works on terminal not with PHP exec
Posted
by
goliatone
on Super User
See other posts from Super User
or by goliatone
Published on 2012-03-24T17:15:12Z
Indexed on
2012/03/24
17:32 UTC
Read the original article
Hit count: 261
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?
© Super User or respective owner