Lately I’ve been trying to get Video on to mobile devices and it’s a maze of techniques, settings, programs and codecs for every device and device model so below I’ll try to clear up some missunderstandings and include codecs, settings and techniques for delivering web video on to some of the most popular devices of the moment:
Some misunderstandings about Codecs.
First off, MPEG-4 isn’t actually a codec, it’s a group of codecs.
Secondly, the file extension ‘.mp4′ or ‘.3gp’ is indicative only of the files ‘container’ that holds the audio & video data and not the codec that was used to encode the file contents (and thus determines the codec needed to decode and play the file!)
HTML5 is only supported by some of the latest phones, (android, Apple).
Flash only works on some handheld devices. Apple is a no. Nokia and BB implement a lite version that doesn’t playback video.
The rest of the handsets will allow a file to be downloaded and played but only if it is of the right format.
The JW Player is a good help as it tries to offer flash video and then falls back to HTML5 if flash is not available in the browser – this works for desktops and iOS/Android devices if the right file formats are offered. You need a 3rd option, to offer a download link and an image placeholder for other devices. To do this you need to identify the ‘user agent’ of the browser that has asked for the web page. If it’s bb, offer a mp4 mpeg-4 part 2 file, if it’s Nokia, then you may have to offer a 3gp file instead (the bb file type might work though). See below for more info on encoding in these formats.
iOS devices supports MPEG4 part 10, encoded to h.264 video and AAC audio in the mp4 container. Use x264 and CoreAudio codecs respectively in Handbrake (a free program) to achieve this. You can encode at 720p and iOS devices will deal with it.
They support HTML5 streaming – tick the ‘web-optimized’ box to let the file play whilst the file loads (this shifts some critical data needed to play the video to the beginning of the file).
New blackberry devices support MPEG4 Part 2, that is h.263 and AAC Audio in an mp4 container. Use ffmpeg and faac codecs respectively to encode this in handbrake (free program).
I’m not sure about older Blackberry devices. It’s best to resize to a width of 480.
Blackberry does not support html5, you need to offer a download link which the browser will open and play (you don’t need to save and then open the file in the multimedia browser).
Do I care? Not at the moment.
Newer nokia phones support MPEG4 part-10 (h.264) which is used in most apple kit (see above)
Older Nokia Phones support MPEG-4 part 2, which is h.263 – the ffmpeg codec can be used to encode this in handbrake (free program).
I’m not sure if older phones support the mp4 container it might just be 3gp. Handbrake doesn’t do 3gp, but Quicktime 7 Pro does.
I assume this is HTML5 and will work similarly to Chrome – Google are removing MP4 / h.264 support and switching only to Ogg Theora (Joy!) I don’t know as much about this, but you can get a plugin for Quicktime 7 to export to the OGM format here: Ogg OGM Quicktime Component.