Video Format

Understanding Digital Video - Formats, Codecs, Containers

7 min read

This article will mainly discuss these three terms - Video formats, Video containers, and Video codecs. And how these terms are inter-connected.

Nitin Meena
Nitin Meena

29 August 2022

Understanding Digital Video - Formats, Codecs, Containers

Since the digital video came into existence in 1988, a myriad of video formats, containers, and codecs have been developed with the aim to provide advancements in quality, file size, and playback compatibility.

Video content is currently booming, with the online audience streaming video on varying devices and platforms every single day. This has also made effortless video streaming a mammoth task for the businesses.

However, there is still rampant confusion among people with regard to video formats, video containers, and video codecs.

Whether you are looking to convert or transcode video files for playback on different browsers or devices, or you are a video distributor looking to build your knowledge base, here's learning about the basics of video formats, codecs, and containers.

Let's first understand what a video format is.

Video Formats

In practice, file extensions are used synonymously with video formats. For instance, MP4 in "Videofile.mp4''. However, this isn’t entirely correct.

Most file formats comprise a combination of files, folders, and playlists (TS, M3U8, etc)—which are necessary to play a video properly.

It is important to understand that Video Formats are different from Video File formats/File extensions, i.e: MOV (QuickTime Movie), WMV (Windows Media Viewer), AVI (Audio Video Interleave), MP4 (MPEG-4 Part 14), etc.

Some of the most popular video streaming formats today are MP4, MPEG-DASH, and HLS.

Before we dive deep into video formats, let's understand what containers and codecs are.

Video File Formats

Video Containers

File extensions for video files actually represent Containers—which contain the entire gamut of files required to play a video. This information includes the metadata and video & audio stream.

  • The video stream is to instruct the video player as to what should be displayed on the screen, whereas—
  • The audio stream ensures the right sound is played for the specific video.
  • The metadata, or “data about data”, comprises a slew of information on the video file, for instance, its resolution, date of creation or modification, bit-rate type, subtitles, and so on.

The most important piece of information the metadata carries is, however, the codec.

Video Codecs

As is evident, the codec is a combination words resulting from the coder and decoder. Codecs encode video or audio streams to create more manageable and streamable sizes of video and audio files.

The video player or platform on which the video is played then decodes it depending on the information contained in that codec and plays back the video while maintaining the quality of the original.

Similar to containers, there is a slew of different codecs in existence today to be used with different audio and video files—some of which include H.264, H.265, VP9, AAC, MP3, and so on.

Companies like Gumlet help you convert video files to all the popular codecs.

Here's covering the most commonly used video and audio codecs.

Most Important Video codecs

H.264 (AVC)

  • H.264 or AVC is without a doubt the most popularly used video codec.
  • Better bitrate than H263: It delivers a significantly better bitrate for the same file size when compared to its predecessors.
  • Widely supported: H.264 is the most widely supported codec with users hardly ever running into any support issues.

H.265

  • H.264's successor is H.265—also referred to as HEVC which stands for High Efficiency Video Coding.
  • Half the bitrate of H.264: Its video compression rate is almost twice as much as H.264. This essentially implies that if you encode a file using HEVC, it will be roughly 50% smaller in size as compared to a file encoded in AVC. This is an excellent advantage if you are streaming resolutions above 2k.
  • Requires triple the resources: The downside of HEVC is that it’s much harder to encode and demands almost triple the resources for video preparation.
  • Proprietary codec: It should be noted that H.265 is not a royalty-free codec like its predecessor H264.
  • Not widely supported: Although HEVC adoption has been significant, it is yet to reach the level of popularity its predecessor enjoyed. Apple recently announced that it would provide support for HEVC video, however considering the new codecs emerging (like VP9), only time will tell if HEVC will prove to be a dominant codec in the coming years.

VP9

  • Better bitrate than VP8: VP9 is Google's royalty-free creation which is open source and was initially used by YouTube—since it effectively decreased bitrate by at least 50% more than VP8.
  • Suitable for high resolutions and live streaming: Like H.265, VP9 works wonderfully for high resolutions and live streaming, however, it is relatively more difficult to decode and is also not as widely supported as H.264 is.

VP9 vs HEVC

It should be noted though that the technology that backs VP9 is designed to produce more stable and seamless streams, whereas H.265 is concerned with delivering a better image quality.

AV1

  • A new royalty-free codec, AV1, was released in 2018 to facilitate video transmissions over the Internet and compete with its predecessor HEVC/H.265.
  • While AV1 is poised to ensure massive data efficiency savings while maintaining video quality, it is yet to undergo widespread adoption.
  • Not to mention, it's significantly more complicated and time-consuming to encode videos in AV1.

Audio Codecs

Here's taking a look at the most popular audio codecs to help you understand which best suits your needs:

MP3

  • Widely supported: MP3 is one of the most popular audio codecs we have today which was developed by the Moving Pictures Experts Group back in the year 1993.
  • Saves space without evident quality loss: It is a lossy codec that leverages the shortcomings of human hearing (also termed auditory masking). For instance, MP3 is typically compressed to 128 kbps, which is at par with how an original CD might sound despite being only 9% in size.
  • Limited functionality: Even today, MP3 still enjoys widespread popularity for sharing and playing back audio content. However, it is also associated with limited functionality for the video which other audio codecs effectively overcome.

AAC

  • Advanced Audio Coding (AAC) is becoming increasingly popular today among video distributors.
  • Widely supported: Developed after MP3, it is a proprietary audio codec with support for a wide range of video formats.
  • More efficient than MP3: It also provides better and more clarified sound for the same bitrate.
  • Limited audio channels: AAC is associated with a few support issues and also carries a limit on audio channels—impressing the need for other codecs to ensure more robust and seamless video experiences.

AC-3

  • If you need surround sound or backward compatibility with Dolby products, AC-3 may be an excellent codec option, considering its support for a range of channels and compatibility with Dolby products.
  • 5.1 surround sound: It offers surround sound and lets you fully preserve it as well using surround sound settings.
  • Not widely supported: However, with the exception of DVD players and digital television, you'll find that AC3 doesn't really support as many devices as AAC does.

Let's now move to video file formats—

File formats represent standardized rules for how containers and codecs will be stored. They even store metadata and oftentimes, a video file's folder structure—which makes it compatible across a large number of different devices and players.

Since digital video formats came to being, a host of new formats have been developed with the aim to foster innovations in image quality, video playback compatibility, and more.

A video format gains popularity when a major platform chooses to support content in that format in its product. Such adoption is typically propelled by a massive technological breakthrough or a fitting use case—which further initiates a self-perpetuating adoption cycle whereby content creators start producing copious content in that format to ensure compatibility with the large platform.

So, what are the most widely used video formats in existence today? How do you know which formats are best to use for online video distribution?

Here's diving deeper into some of the most popular formats—beginning with MP4, more specifically MPEG-4.

MP4

The name MPEG-4 can be confusing to people since it can be used to refer to

  • MP4 Container (MPEG-4 Part 14)
  • ISO Base Media File (MPEG-4 Part 12)
  • H.264 Codec ((MPEG-4 Part 10)

We'll be talking about the MP4 video format, which is synonymous with the MP4 Container.

MP4 is an excellent container for delivering videos to the web, mostly because it exists in a single container and enjoys extensive support across platforms, players, and operating systems.

HLS

  • Another notable video format is HLS (or HTTP live streaming)—which was developed by Apple and is currently the most popular format built on the adaptive bitrate.
  • This is due to its ability to leverage HTTP and deliver streams that are compatible with a huge range of platforms, devices, and firewalls.
  • In contrast to MP4, HLS carries a key file or manifest called the M3U8 which brings every other file under a common roof.

MPEG-DASH

  • MPEG-DASH is yet another ABR format launched by Motion Pictures Experts Group, which shares similarities with HLS (both use HTTP protocol).
  • However, a key difference is that MPEG-DASH is open-source and became globally standardized in 2012—making it the first International Standard for adaptive streaming.
  • Therefore, despite HLS being the most popular video format today, there is a good chance that MPEG-DASH will surpass its usage in the coming years. However, HLS still remains an excellent format to explore.

Conclusion

We hope this article provides you with a comprehensive understanding of video formats, containers, and codecs and cleared any confusion you may have had wrt to the terms. Which combination of formats, containers, and codecs would you prefer to use in online video distribution?

Subscribe to Latest Post

Don't miss out on latest article and more related posts.


Related Readings

LCP - What is Largest Contentful Paint?

LCP - What is Largest Contentful Paint?

Largest Contentful Paint is crucial in measuring page load performance. This blog aims to educate readers about LCP and related improvement measures.
Divyesh Patel
Divyesh Patel

9 Oct 2021 - 3 min read

How Page Speed and Image Optimization Affects Website SEO

How Page Speed and Image Optimization Affects Website SEO

Page speed and image optimization directly affect website SEO. Learn how Page Speed Affects SEO Rank and why images affect page speed. Discover the best practices to improve website page speed and how to optimize images for SEO.
Nitin Meena
Nitin Meena

8 Oct 2021 - 4 min read

15 Tips to Boost Your WordPress Framework for Increased Website Traffic

15 Tips to Boost Your WordPress Framework for Increased Website Traffic

Did your viral content create an enormous surge of traffic? Continue reading to learn WordPress scalability tips that’ll help you tackle the situation.
Karan Singh
Karan Singh

28 Sep 2021 - 8 min read

Ready to get started?

Sign up and start optimizing your videos and images by up to 68% with Gumlet. No credit card is required. No credit card is required. You can also reach out to get a custom pricing estimate or to schedule a demo

Optimizing videos is hard, but
our pricing is not

Simple per-minute pricing with no hidden fees.
Pricing details

Effortlessly integrate Gumlet into your existing stack

Upload with API and set webhooks for output in minutes.
Integration guide