How to convert video to mp4, webM, ogv at boot time?

I use videojs to play videos on my website (this is an HTML5 website), so for better support I need to make 3 formats of each video mp4, webM, ogv.

But on my site, the user can also upload videos.

So, please tell me how I can automatically convert the video after / during the download to these formats.

I am using PHP5 + JS for development.

+4
source share
2 answers

Since the conversion has to happen on the server side, you can only do this after the download is complete. HTML5 works fine, but does not support video transcoding.

I would suggest taking a look at ffmpeg, it is an extremely powerful command line utility that allows you to transcode your video with maximum accuracy, because youtube uses this to convert your video.

This is a free tool, and there is more than enough documentation to get you started http://ffmpeg.org/

+8
source

We have a system configured for PHP where the download takes place, then the conversion takes place and the videos appear to the clients after the conversion is completed. However, one note ... I've always had problems with ffmpeg conversions for iPhone, iPad, iPod, iOS, etc.

0
source

All Articles