Wednesday, February 20, 2013

Video encoding for Web

When you wish to publish your videos on your own homepage instead of hosting them on youtube, then there are several things to consider.

There exist a lot of tutorials, howtos and faq about this subject, but most are outdated or incomplete.

One of the best we have found is this Webpage:
It explains what which browser expects and what is needed to get it working.

In short:

- Make a H.264+AAC+MP4 video for iOS and Safari
- Make a WebM video for almost all others, it's considered the future for web videos

Now you can put both files in a html5 video tag and it works almost on all devices.

One major problem is (of course, once more) IE 8 and older.
For these you have to use a flash player, which then plays the MP4 video

When you convert your videos to MP4, then make sure to use baseline encoding, otherwise many (most?) players will only play the sound, but not the video (or not even the audio part of your video)

If you wish to convert the videos automatically from the commandline, then look for the ffmpeg package.
It might be worth to take one of the 1.x releases, instead of the onse bundled with your distribution, since many things got fixed, especially when it comes to H.264 videos