Skip to content
video-codecs-extensions
Nathaniel CooperNov 22, 2019 12:10:30 PM9 min read

Video Codecs, File Formats, Containers & Extensions Explained

 

video-codecs-extensions

To understand the difference among the codecs, containers, and then the format is pretty tricky as the line between them gets blurred pretty quick. When you find out codecs aren’t exclusive of the compression technologies they utilize to achieve intended results. Things get entirely obscure when you ponder on formats like MPEG-4, which could be classified as a bit of codec and a bit of a container. Each codec and format have its advantages and disadvantages with no silver bullet video content for streaming on the web.

The video encoding or transcoding process export digital video into a specification and format that is suitable for playback at the user end. Every video file comprises of two components: a codec algorithm that compresses the video file, and a format, the type of file it is compressed to. For example, picture a container crammed with many kinds of packages, here the container is the format while the codec algorithms create the packages and place them in the container.

Whether you are preparing your video file to be uploaded on platforms like YouTube or projecting it on a big screen, you’ll want to create the best quality and format for the specific purpose. Here we’ll dive deeper into exploring the standard video file codecs, formats, containers, and extensions.

What is a Codec?

A codec is a compression standard. The term codec comes from the connection of the two terms, encoding, and decoding. So, a codec is any software or hardware that compresses or decompresses a compressed digital file. The software or equipment that only compresses an analog file is known as an encoder, while the device/software that only decompresses is known a decoder. A well-designed codec can reduce the size while still preserving the quality of the video. 

The way codec works are, it needs to compress frames. There are two ways to frame compression – inter-frame and intra-frame compression.

Inter-frame compression identifies redundancies across frames to compress the videos. While the intra-frame compression is essentially image compression as it compresses each frame independently. That’s why inter-frame compression is more efficient and used by most codecs.

Codec is a compression technique, and there are two types of compressions: lossy or lossless. A lossy compression leaves out some of the data to create a smaller size file – lower quality video quality, especially in case of repeated compressions. Lossless compression keeps all the data from the original file and retains the high-quality encoded video with larger file size. The most commonly used video codecs today are H.264, HEVC, AV1, VP8/VP9.

Which is better, H.264 or HEVC (H.265)?

H.264 codec is also known as AVC. Though it’s a bit dated is widely used, and H.264 compression technology is available for almost every platform and device out there today. The standard is being upgraded with the High-Efficiency Video Coding (HEVC), or the H.265 is overtaking the previous version with the explosion of 4K video content. The H.265 has much higher efficiency in compressing the videos and makes streaming the ultra-high-definition 4K or 8K videos easier.

Its algorithms compress video using varied processing techniques that retain a very high level of detail and so, is famous for yielding top-quality videos. Though H.265 is a licensed codec and you’ll have to pay the license fee to be able to use it. It is compatible with the MP4 container and widely deployed in many mobile devices, and virtually all web browsers can play it either natively or through a Flash plugin.

So to stay on top of today’s video standards, H.265 is better.

MPEG-4

The widespread streaming format has many parts, and only the MPEG-4 part II is employed for video coding. Which uses the DivX or such encoder to encode the video file while newer versions use H.264 for encoding, and an audio MP3 format is used.

DivX

DivX is a commercial codec and can compress large video files into small sizes while preserving the high-quality video quality. DivX generally uses the AVI file format and Div or DivX extension. XviD is the open-source version of the codec as an alternative. DivX is an older codec designed to retain the video quality at the expense of large file sizes. 

What is VP9?

Developed by Google is an open-source codec offering superior performance over the H.264 but doesn’t support live streaming as of yet. It produces more reliable and consistent streams with a much smaller file size that is easy to stream over the internet.

The Many Extensions and Formats

A format is a file container that holds one or more codecs such as audio, video, or even data. The format container holds information about the video, audio, the file metadata that it contains, and how the data is structured. Container format is referred to as ‘the format’ and indicated by the file extension.

The standard formats cover MKV, MP4, WebM, HEVC and AVCHD. Some video formats are open source, so the code is available to everyone, can be studied, altered, and distributed such as WebM and MKV are open-source formats developed by non-profit organizations.

Video formats are more than just a file extension and have a whole package of files, comprising the audio stream, a video stream, and metadata. Put together all of the data, with streams and metadata, and a video player reads the stream of video content for playback. The file’s video stream contains the required data for video playback, and the audio stream carries the sound-related data. Metadata defines the bitrate, subtitles, resolution, date of creation, and device type.

Bitrate is the rate at which the bits are computed over time. Higher bitrate means more data, and the higher the video file’s quality, based on this, it is crucial to decide the bitrate in consideration of the intended playing device. As higher bitrate video streams need a speedy internet connection and more processing power to encode the video for playback.

At present, H.265 is one of the most efficient codecs available and is employed to compress 8K ultra-high-definition videos. Though not widely used because to use the codec, you have to pay a licensing fee, so not supported by browsers or devices. On the world wide web, WebM and its proportional VP9 codec is an accessible and generally compatible way to make video files compact. Although size is an essential factor, others like the required quality of the video or where the files will be played, i.e., the media device, should be considered.

We’ll take on each of the most popular container formats to comprehend the tradeoffs.

.WebM

Created by Google is an efficient algorithm to reduce large media files and broadcast to a broader range of audiences. The technique, while reducing the file size, also shreds some of the quality of the video file, used by HTML5 video streaming websites like YouTube.

.MP4

MP4 is an abbreviation for Moving Pictures Expert Group 4, developed by Motion Pictures. The format uses distinct compression techniques for video and audio tracks, where audio is compressed using AAC and video using either H.264 or MPEG-4 compression. They are famous for retaining the high quality of the video, even in small size files. It has gained popularity for online sharing of content as it is supported by HTML5 and compatible with both online and mobile browsers. Played at a constant bit rate (CBR), which means regardless of bandwidth fluctuations, the quality of the video stream will remain the same.

HTTP Live Streaming (HLS)

HLS uses adaptive bitrate (ABR) technology to ensure high-quality video streaming by employing small HTTP file segments. Its reputation can be credited to HTTP use as it is the universal protocol for the internet, and augments greater reach, low infrastructure costs, and straightforward HTML5 player implementation. It uses the M3U8 file descriptor, which facilitates the user device, automatically selects the best quality stream according to the bandwidth and device power available.

.AVI

Introduced in 1992 by Microsoft as part of video technology for Windows. It has a simple architecture, and resultantly can run on different systems and browsers. AVI can store files encoded in a range of codecs, like DivX or M-JPEG, which means on the inside, the AVI files may differ from one another.

.FLV

Encoded by Adobe Flash generally uses codecs like VP6 or Sorenson Spark and can be played using the Adobe Flash Player, web plugins, or third-party software. The latest browsers come preinstalled with the player, so the format has become a standard online video viewing platform on the web. Videos in FLV format retain their high quality even after compression, that is why some prominent platforms like Yahoo, VEVO, Hulu, and YouTube use the Flash video format.

.AVCHD

Advanced Video Coding High Definition is the file format associated with many of the camcorder videos and use the H.254 or MPEG-4 codec and is somewhat similar to MPG file format.

Container

Containers as evident by its name bundle and stock all the elements of a video package. The components generally are video and audio streams, metadata like subtitles, date, and size, and codec. Every container has specific codecs compatible with the video container. A typical container runs like an executable file by running a .bat command to tell the operating system there is executable code to be run.

MP4

It is the most favored format for uploading videos on the internet, services like YouTube and Vimeo prefer MP4. The MP4 container uses the H.264 or MPEG-4 encoding technique for video and AC3 or AAC for audio. It’s used all around with support for most of the modern consumer devices.

MKV

MKV was designed to be future proof, and the container supports most of the video and audio formats out there, which makes the format efficient, flexible, and an amazing one for storing video and audio files. The container also supports multiple video, audio, subtitle files even if encoded in diverse formats. It has incredible error recovery and can play corrupted files, offers versatile options making it one of the best containers available.

Flash Video

Introduced by Macromedia, which was later acquired by Adobe in 2005. The container is aging and has certain limitations in its implementation technology.

No matter the format you're using, you'll never want to worry about taking up too much space in your environment. Ask ProMAX about how to get virtually unlimited data storage space at a price that really makes sense with ProMAX Platform. That's right, I said virtually UNLIMITED. Call (800) 977-6629 or contact us here  🔥 🔥 🔥 

 

 

avatar

Nathaniel Cooper

As Chief Operating Officer of ProMAX Systems, Nathaniel Cooper, runs ProMAX Systems day to day operations. Cooper has been working with Storage, Backup and Media Management for video and creative professionals since 2001. Cooper has lead the design and deployment of some of the largest media systems in the world including a range of customers from NFL, MLB & NBA teams, US Military operations, and many of the worlds largest PR agencies and consumer brands. Cooper has spent the last 9 years as part of the ProMAX team and specializes in translating complex technical issues and options into easily understandable concepts.

RELATED ARTICLES