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.
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
You could try the ffmpeg extension: http://ffmpeg-php.sourceforge.net/
Edit:
It turns out that the ffmpeg extension probably won't help you, but you could still use ffmpeg to do the conversion. You are probably better off having a cron job or something similar do the conversions in the background. Just let the user upload the mov file, and then add it to a queue and convert it to mp4 in another process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With