HTML and CSS Reference
Surrounding the compressed/uncompressed video and audio is a container. The
container will usually provide details on the multiple tracks for video. One track
will be used for the video itself, and the second track will be used for the video's
audio. A container will not necessarily describe how a video or audio file has
been encoded, but may define a certain standard as to how a video should be
encoded for that specific container.
When picking a container, it's important to pick one that supports a limited
number of codecs. This will make encoding much simpler, as you will not have
to research which codecs are supported on current and newer devices. For
example, the Matroska (MKV) container supports almost any video and audio
codec available today, so it's a much bigger task to choose which codecs to
use within the container; whereas WebM will only support the VP8 video codec
and Vorbis audio codec. This makes it a simpler task when encoding for a
device that supports the WebM container.
To avoid confusion, Table 3-5 shows the most popular codecs and containers
that you should provide support for when embedding video for mobile.
Table 3-5. HTML5 Video Suggested Containers and Codec Combinations
H.264 AVC (Baseline)AAC
The Android documentation also suggests the following resolutions, shown in
Table 3-6, based on quality.
Table 3-6. HTML5 Video Suggested Resolutions
Frames Per Second (FPS)
SD (low quality)
176 × 144px
SD (high quality)
480 × 360px
HD (not for all devices) 1280 × 720px
Table 3-7 shows the recommended supported containers and codecs for audio