View All Posts
View All Posts

Video Encoding & Compression: Why Storage & Quality Matter

August 17, 2020
7-Minute Read

Video encoding and video compression are essential for OTT video delivery. This primer explains how they work and the benefits you’ll score when they’re done right.

What is video encoding? What is video compression? And how in the world do video codecs work?

Any business operation that wants to have video on-demand (or live streaming) must understand these terms when it comes time to store and host video files. And it first begins by learning the trade-offs associated with the quality of your content:

  • High-quality videos result in larger files, longer uploads, and higher hosting costs. They also require more high-speed bandwidth from viewers.
  • Low-quality videos lead to smaller files, shorter uploads, and lower hosting costs. They also need less bandwidth during playback.

So how do you minimize your file size without jeopardizing the quality and ensure that your video playback reaches everyone in your target audience? You turn to video encoding and video compression. This winning combination allows you to shrink video files without sacrificing their high-quality during playback. Your content will look just as fantastic streaming on 4K connected TV (CTV) screens as it does on mobile phones or tablets. Now that you know why compressing and encoding videos will make your OTT content strategy a success, let’s dive into how they work.

What is video compression?

Video compression is the method for turning large, raw video streams into smaller video files. If you think of your video as a collection of still images, video compression roots out the repetitive or identical frames and keeps only those images which are essential. Let’s say there are two very similar frames. Compression will delete the data for one non-essential frame and replace it with a reference for the other.

The benefits of video compression include:

  • Smaller overall file sizes
  • Less storage demand
  • Lower transmission bandwidth needs

However, simply compressing a video doesn’t result in the highest quality content for multiple devices and platforms. That’s where video encoding, a specific type of video compression, comes into play.

What is video encoding?

Video encoding is the process of compressing and preparing your video files for the proper formats and specifications required for playback.

Although video compression shrinks files, it may also impact video quality. Video encoding, however, compresses your video files without compromising quality. With encoded videos, the gigabytes of data become mere megabytes. And your content becomes compatible with many devices and platforms. Harmonic has led the industry for video encoding, and we developed patented technology for content-aware encoding.

What is content aware encoding?

Content aware encoding leverages the power of artificial intelligence (AI) to take video compression to the next level. Since AI’s primary advantage is its capacity for highly detailed visual detection, CAE mimics the way the human eye looks at the world to compress videos for the highest quality. This optimizes encoding according to the content type, or the areas in a picture where the human eye would typically focus. So rather than just deleting identical frames, CAE encoding targets the most important and discards the rest. Harmonic was the first company to develop AI technologies for CAE. Here a super high level explanation of the process:

  • Unsupervised machine-learning algorithms find similarities in video content to leverage bandwidth economies.
  • Then machine-learning enhanced algorithms use intelligent motion estimation to anticipate the amount of capacity needed in the subsequent video frames.
  • Reinforcement learning algorithms improve the overall compression algorithm over time, so it continues to develop “autonomously” as you add more video data.

This type of AI-powered CAE reduces both the time and the cost of development. And it gives OTT content creators and distributors customized compression algorithms rather than the generic ones of today. Although video encoding has made several advances over the years, the underlying capabilities are entirely possible thanks to video codecs.



What is a video codec?

Video codecs are devices or software that compress your videos and encode them for high-quality delivery. The goal of any video codec is to shrink the file size and lower the required bit rate without jeopardizing the original source quality. Codec stands for coder (co-) and decoder (-dec). So while it will encode your video (i.e., code and compress), video codecs also support decoding (or decompressing) it for playback. Different devices and platforms support different codecs. And if your encoded video doesn’t have the right codec, video playback won’t happen.

 The most popular video codecs include:

  • H.264 (AVC)
  • H.265 (HEVC)
  • H.266 (VVC)
  • AV1
  • VP9
  • MPEG-2
  • Quicktime
  • WMV
  • DivX
  • XviD

After your video is encoded, all the components are packaged into a video container. The specific container is known as the video compression format.

What are the best video compression formats?

The container holds the audio codec, video codec, and any other metadata related to that video stream/file (think: subtitles, closed captioning, preview images, etc.). The container keeps all these components together and figures out which devices will accept the stream.

The best video compression formats include:

  • .mp4
  • .mov
  • .ts
  • .wmv
  • .F4v
  • .3GP

However, playback platforms do not have to accept all containers, codecs, or compression formats. For instance, a .mov file and a .wmv file might share the same data and codecs. But the .mov file will playback on a Mac while the .wmv file will playback on a Windows PC. This doesn’t work vice versa. That’s why multi-format encoding is so essential when streaming to a wide range of devices. And successful video compression also needs to achieve the ideal of minimizing bit rate while maximizing picture quality.

What is a video bitrate?

The video bitrate or data rate is the number of “bits” conveyed or processed in each frame of your video over time. Here, “bits” refers to the compressed data in your video frame, and the rate is usually time in seconds. So video bitrate is measured in kilobits or megabits per second (Kbps or Mbps). Higher bitrates often signal higher video quality. But they’ll also require more storage and greater bandwidth for playback. Lower bitrates are just the opposite. You’ll want to have a target bitrate in mind during your video encoding. Constant bitrate (CBR) encodes videos at a consistent bitrate for the duration of your video file or stream. But variable bitrate (VBR) or adaptive bitrate (ABR) means the video bitrate changes according to the viewing scenario.

What is adaptive bitrate of variable bitrate encoding?

VBR or ABR spreads the “bits” around so more get used for complex parts of your video (such as action scenes) and less get used for simple ones (like static shots). Though you can set a bitrate for your video, adaptive streaming gives the viewer the best bitrate based on the strength and speed of their internet connection. So when signals are great, video quality is also high. Low signal strengths automatically switch viewers to lower video quality so they don’t deal with buffering delays. Multi-bitrates give your viewers the best version of your video content to watch . And that’s why VBR-encoded videos look and perform better than CBR-encoded videos.

Best video codecs for video streaming

What’s the best video codec for streaming your content? What codec does Netflix use? You actually will want to use a variety of codecs. In their effort to “leave no codec or customer behind,” Netflix uses many different codecs, and yet, has never abandoned the original VC1 codec it started with 10 years ago. So when you encode video using a plethora of codecs, older codecs will ensure playback on legacy devices while next-generation codecs will work well for modern devices. Employing a host of codecs makes your video content compatible across many devices and displays. So you may be wondering, What video codec should I use? Or, What’s the best video compression codec?

H.264: the most widely used video codec for streaming

Out of the hundreds of codecs in existence, the most commonly used video codec is H.264 (also known as AVC, or Advanced Video Coding). With over 10 years of developing and improving, the H.264 codec allows your video to play on virtually any device, doesn’t skimp on quality, and has minimal concerns surrounding royalties.

H.265 (High Efficiency video coding, or HEVC)

Developed as the successor to the popular H.264, H.265 improves compression and supports 8K resolution. Smaller files but uncertainties regarding royalties/costs mean less than 10% of videos are encoded with H.265.


This open-source, royalty-free alternative to H.265 was created by Amazon, Netflix, Google, Microsoft, Cisco, and Mozilla under the Alliance for Open Media.

Unverified claims say AV1 is 30% more efficient than H.265. However, most devices simply lack support for the codec, so it hasn’t been adopted or integrated on a grand scale yet.


Google developed VP9 as a royalty-free alternative to H.265. So Android phones, the Chrome browser, and YouTube support the VP9 codec. This provides better video quality than H.265 at the same bit rate. However, although more devices support VP9 than AV1, VP9 is not supported by Apple devices. With all these options available now, and with future possibilities being so close at hand, a multi-codec approach is vital to your video delivery strategy. In some cases, you may also  need to transcode.

Video encoding vs transcoding: what's the difference?

People often interchange video encoding with video transcoding, but they’re not exactly the same. Video encoding is the process of compressing videos for smaller sizes and playback delivery. Transcoding is the process of re-encoding video files into different formats. So, transcoding is encoding, but encoding isn’t always transcoding.

Why is encoding and transcoding essential for video delivery?

Transcoding and encoding are essential parts of your video delivery strategy because they allow you to:

  • Reduce video file size to help you save money on storage/hosting expenses.
  • Improve buffering for streaming. Achieving a target bitrate will help you reduce bandwidth requirements (for delivery) and improve viewing quality (less buffering).
  • Convert older files into modern formats so you can monetize existing content.
  • Change the resolution of aspect ratio to deliver the highest quality content to any screen. Videos will adapt to the device’s display capacity for best viewing.
  • Alter the audio format or audio quality to deliver content that complies with regional audio requirements.
  • Make video files compatible with certain platforms so they’re optimized for playback on computers, tablets, smartphones, smart TVs and CTVs, and legacy devices. You’ll also be able to deliver content to affiliates and monetize even more.

Each of these important points will help to ensure your video quality remains high and easily accessible to viewers no matter where they watch your OTT content.



Take the next step to reduce storage and offer better video quality

If you want high performance with the latest video encoding and processing technologies for broadcast and OTT, consider having  Harmonic in your corner. Our video streaming solutions allow you to accelerate time to market for live streaming and next-gen TV delivery. You can launch new channels, stream live sports with low latency, or deliver pristine UHD HDR video. Created with innovation and versatility in mind, our line of video streaming platforms and products that leverage  advanced AI technology lets you deliver the immersive viewing experiences your customers want 24/7. 

Working with Harmonic can offer you:

  • Optimized video quality no matter the density
  • 50% bandwidth savings using our EyeQTM
  • Market leading video compression from MPEG-2 to H.264 and HEVC
  • Support for a wide range of premium codecs and resolutions from uncompressed video over IP to UHD high dynamic range (HDR).

Click here to learn more about what the Harmonic VOS360 platforms can do for you!

Kirby Grines is an entrepreneur, advisor, and the founder of 43Twenty, a strategic advisory and marketing firm that accelerates growth for companies in technology, media, and entertainment. He’s also the creator of “The Streaming Wars,” which is a free, weekly newsletter that curates the latest developments in the OTT video industry. Previously, Kirby was a co-founder of Float Left, an application development company, where he designed and built some of the first apps on Connected TV.
By David Whitehead
By Alain Pellen
By Juan Chareun
By Robert Gambino
By Robert Gambino

Subscribe to our blog

Don't miss out! Keep up to date with the latest by subscribing to email notifications.
No thanks, I am not interested