Executing ffmpeg from php exec function

software development

#1

Is there a way to execute the ffmpeg using php’s exec function?

Does anyone have a tutorial on how this works? according to dreamhost, the ffmpeg-php alternative they have in their wiki is out of date and will not work without a custom installation of php.


#2

ffmpeg is available as dream host have installed across the board.

all you nned to do is exec(ffmepg …);

that shoudl do the trick


#3

I attempted:

$cmd = ‘/usr/bin/ffmpeg -i /path/to/video/video.mpg -ab 90 -ar 22050 -b 500 -r 15 -s 640x480 /path/to/video/video.flv’;
exec($cmd);

and it creates the the .flv file, however, the .flv contains no data. It’s 0KB in size.