Sunday 8 January 2012

Optimising Video for Web & Mobile

Recently we've been confronted by a number of clients who haven't been used to encoding video (rather they have depended on server side encoding for their content).

Encoding is an art, not a science, and just like movies used to have graders, modern video production companies should have encoders who are skilled in optimising content for delivery over the internet to the web and mobile.

This is a field where drop downs in Final Cut Pro and a little knowledge are hugely dangerous things. The value of a well encoded video over a badly encoded one is immersurable.

And saying that 'YouTube does it well' is disengenious. YouTube encodes for a particular delivery profile, which does not necessarily optimise for mobile, set top boxes or platforms like Facebook.

But, as a broad guide, we would recommend using Handbrake, which has versions for Mac, PC and Linux.

After much recent experimenting we can barely see a difference between a 500Kbps and 2Mbps delivery using the following settings:

Container: MP4
Picture:
Width: 720
Height: 400
Cropping: none
Aspect Ratio: preserve
Anamorphic: none
Modulus: 16

Video Filters: None

Video: H.264 baseline using MPEG4 part 10 (not 2! And not Ffmpeg MPEG4 - this may result in either no video appearing in some browsers, or much lower quality)
Framerate: as source
2 pass encoding (takes more time but does make a difference of around 15% in quality we estimate)
Avg bitrate: 500Kbps

Audio: AAC (faac) Dolby II ProLogic 64Kbps 44.1 Mhz

Select web optimised or fast play or make sure Moov atom is at head, along with all metadata
Select streaming over download mode for scrubbing
Enable 5G Select No-DCT decimate for Android playback

This video will deliver HD over very poor bandwidth to most contemporary devices.