How can I convert a movie into .MP4 from .MOV using a PHP upload script?

willpots picture willpots · Jun 24, 2011 · Viewed 7.9k times · Source

I am trying to upload a movie onto a site and then automatically convert it into .mp4 format from the .mov iPhone format. Is there a php conversion library or tool that would help me do this?

Thanks.

Answer

Phill Pafford picture Phill Pafford · Jun 24, 2011

Well I know this is an alternative solution:

PHP:

$cmd = './HandBrakeCLI -i /path/to/source.MOV -o movie.mp4 --preset="iPhone & iPod Touch"';
echo exec($cmd);

Note: You will need to install Handbrake on your server