Converting video for Android

17 October 2013

Converting video for Android

If you want to make video playable on Android devices you are limited in your options. In the Android developers documentation, there are 4 different types of video that can be played on an android platform, one of which does not work in Android 2.2 or lower:

 

Format / Codec Encoder Decoder Details Supported File Type(s) / Container Formats
H.263   • 3GPP (.3gp)
• MPEG-4 (.mp4)
H.264 AVC
(Android 3.0+)
Baseline Profile (BP) • 3GPP (.3gp)
• MPEG-4 (.mp4)
• MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+)
MPEG-4 SP     3GPP (.3gp)
VP8  
(Android 2.3.3+)
Streamable only in Android 4.0 and above • WebM (.webm)
• Matroska (.mkv, Android 4.0+)

Some types of vide are only available on later versions of Android, so for best compatibility, you should use h263 codecs in an mp4 container. This is a bit of an issue because it means that your h263 video might not play on other devices, so you will need to convert the video to another encoding for iphones or other mobile browsers - idealy h.264 and webM formats.