HTML5 Video Support
HTML5 specifies a new tag, <video>,
that allows developers to place video directly in an HTML page. With a few
simple options, you can autoplay, loop, and add playback controls to the
embedded video.
First, let’s talk about video format support, which is a very complicated issue. Some video formats are free, and others are licensed. Some formats look better than others, some make smaller file sizes, and some are supported in one browser while others are supported in a different browser. In this chapter, we will concentrate on three formats that either have broad support now or promise to have broad support in the future: .ogg, .mp4, and .webm.
We will discuss these video formats in terms of video codecs. Each format uses one or more codecs to compress and decompress video. Codecs are usually the secret sauce of a video format because compression is the key to making video that, in the wild, can convert very large files into file sizes that can be easily transported on the Internet.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access