Blog

Video Encoding & Compression: Why Storage & Quality Matter

Written by Ronan Lhostis | October 27, 2023

In today's competitive digital landscape, delivering high-quality video streaming with low latency is essential. Video encoding and video compression are key in the video delivery process. Businesses aiming to excel in video-on-demand and live streaming must understand these terms when delivering video and storing and hosting video files.

Take a moment to revisit the fundamentals of video encoding and compression, consider their advantages, and stay up to date with emerging encoding technologies.

What is video compression?

Video compression is the technique for turning large, raw video streams into more compact video files and making raw professional video streams compatible with transmission networks. If you think of your video as a collection of still images, video compression identifies and eliminates repetitive or identical frames, retaining only the essential images. For instance, if there are two nearly identical frames, compression will discard the data for one non-essential frame and replace it with a reference to the other.

There are many benefits of using video compression, including:

  • Smaller overall file sizes
  • Reduced storage demand
  • Lower transmission bandwidth needs
However, simply compressing a video doesn’t automatically produce the highest quality content for various 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 video files and video streams for the proper formats and specifications required for playback.

With encoded videos, the gigabytes of data become mere megabytes, and the content becomes compatible with a multitude of devices, platforms and networks. Although video encoding reduces file sizes, it can also influence video quality. Encoding video files without compromising video quality requires selecting the right encoding engine and the appropriate settings.

Understanding the differences between video encoding, decoding and transcoding 

Now let's delve into the distinctions between video encoding, transcoding, and decoding, which are often used interchangeably, but serve distinct roles in the video lifecycle.

Encoding

Video encoding, as we've discussed, is the process of compressing and preparing video files. With encoding, your video transforms into a more efficient format, reducing its size without compromising quality. This process ensures your content is readily consumable across various devices and platforms.

Picture encoding as a cryptic code maker. It takes your video and encases it in a unique code, a bitstream that's more compact and efficient. This coded video is sent across the internet, where it can be safely stored, easily transmitted, and promptly decoded at its destination. Encoding is like locking your video in a secure vault before sending it on its way.

Decoding

Decoding is the process of unlocking that secure vault, revealing the video's original form. It's like having the exclusive key to decipher the cryptic code created during encoding. Decoding takes place at the viewer's end, allowing them to enjoy the video in the best quality. It's the final step in the video delivery journey, ensuring the video playback is smooth, seamless, and high-quality.

Transcoding

Transcoding is like having a multilingual interpreter at the ready. It takes the encoded video and converts it into different formats, resolutions, or bitrates, catering to the preferences of your diverse audience. Transcoding steps in when you need your video to adapt to the unique tastes of each viewer, offering an array of serving options.

Understanding these distinctions between encoding, transcoding, and decoding is crucial in the realm of video technology, as each plays a unique role in ensuring your video content reaches its intended audience in the best possible form.

Now let’s explore why encoding and transcoding are key for effective video delivery.

Why are encoding and transcoding essential for video delivery?

Encoding and transcoding are fundamental components of your video delivery strategy, offering a multitude of benefits that enhance the viewer's experience and optimize your content for diverse platforms. Here’s why they are essential:

File size reduction: Encoding and transcoding enable service providers to compress video files, reducing their size efficiently. This helps you save money on storage and hosting expenses and speeds up content delivery.

Buffering improvement: Achieving a target bitrate through encoding and transcoding minimizes bandwidth requirements for content delivery. This results in smoother streaming experiences with reduced buffering, ensuring uninterrupted viewing pleasure for your audience.

Format modernization: Convert older video files into modern formats. This process lets you monetize existing content by making it compatible with contemporary devices and platforms.

Adaptation to different screens: Encoding and transcoding empower service providers to adjust video resolution and aspect ratio, ensuring the content looks its best on screens of all sizes. The videos will automatically adapt to the display capacity of each viewer's device.

Audio enhancement: Service providers can tailor audio formats and quality to comply with regional audio requirements, enhancing the audio experience for viewers worldwide.

Platform compatibility: Video files can be made compatible with various platforms, including computers, tablets, smartphones, smart TVs, connected TV devices, and legacy equipment. This broad compatibility expands your reach and allows you to monetize content across a wide range of devices.

Incorporating encoding and transcoding into your video delivery strategy guarantees that your content remains high-quality, easily accessible and optimized for viewing across different devices and locations. This comprehensive approach helps you deliver a superior over-the-top (OTT) content experience.

Furthermore, the use of tools such as video codecs plays a significant role in video compression and encoding. Let’s delve into what video codecs are and why they are crucial. 

What is a video codec?

Video codecs, short for "coder" (co-) and decoder (-dec), are essential tools in the world of video technology. They can be either hardware devices or software algorithms designed to compress video files while maintaining high-quality playback. The primary goal of any video codec is to reduce file sizes and lower the required bit rate without compromising the source quality.

In addition to encoding (compressing), video codecs support decoding (decompressing) to ensure seamless playback. Compatibility with different devices and platforms is a crucial consideration, as the codec choice can impact whether a video plays correctly or not.

Lossless vs. lossy codecs

Video codecs can be categorized into two main types:

Lossless codecs: These codecs preserve the entire video quality without losing information, making them suitable for situations where maintaining fidelity to the source material is essential, such as in video editing or archival purposes. However, they result in larger file sizes compared to lossy codecs.

Lossy codecs: Lossy codecs achieve higher compression ratios by selectively discarding some visual data. This results in smaller file sizes but comes with a trade-off in a slight reduction in quality. Lossy codecs are commonly used for streaming and distribution as they effectively balance file size and visual quality.

Live streaming applications exchanging content between stadiums and studios can also use a specific range of codecs: visually lossless codecs. These codecs are designed to deliver absolute fidelity to the source with a 1:10 compression ratio while the compression ratio for lossy codecs is around 1:800. 

Popular video codecs for video streaming

Choosing the right video codecs is essential for successful video streaming, and utilizing a variety of codecs is often the best practice to ensure compatibility across a wide range of devices and displays. Even streaming giant Netflix adheres to this strategy, using multiple codecs, including the original VC1 codec.

Now, let's explore some key video codecs commonly used in streaming:

H.264 (advanced video coding or AVC)

H.264 is one of the most widely used video codecs for streaming. It is over a decade of development ensures compatibility with virtually any device, maintains video quality and has minimal concerns regarding royalties.

H.265 (high-efficiency video coding or HEVC)

As the successor to H.264, H.265 offers improved compression and supports resolutions up to 8K. While it results in smaller files, uncertainties about royalties and costs have limited its adoption to less than 10% of videos.

H.266 (versatile video coding or VVC)

This is the potential future codec to replace H.265. H.266 promises additional compression gains compared to HEVC up to 50% for the highest resolutions (4K) but at a price of a higher computation.

H.266 is very recent (2020) and it has been today adopted as the standard of the future Brazilian Terrestrial market. The decoding chipset supporting H.266 goes into production. It will probably be several years before we see widespread adoption.

AV1 (Alliance for Open Media 1)

Developed by an alliance including Amazon, Netflix, Google, Microsoft, Cisco, and Mozilla, AV1 is an open-source, royalty-free alternative to H.265. It claims to be 30% more efficient than H.265, but its adoption remains limited due to the lack of support on most devices.

VP9

Google developed VP9 as a royalty-free alternative to H.265. It is supported by Android devices, the Chrome browser and YouTube, offering better video quality than H.265 at the same bit rate.

Adopting a multi-codec approach is vital for your video delivery strategy, ensuring compatibility across various platforms and devices. There are new forms of encoding that emerging that are supported by advanced technology. Let’s explore a few of them. 

Emerging ways of encoding

Content-aware encoding

Content-aware encoding (CAE) is a revolutionary advancement in video compression technology that harnesses the power of artificial intelligence (AI) to optimize video quality and reduce file sizes. Unlike traditional compression methods that treat all frames equally, CAE mimics the human eye's perception of the world to compress videos intelligently. It focuses on preserving the most critical visual elements while discarding less important ones, resulting in superior compression efficiency.

With content-aware encoding, AI can determine what kind of content is being streamed and then optimize the bitrate, latency, and protocols. This process elevates image quality while reducing data storage and transfer costs. The revolutionary AI-driven real-time video compression significantly reduces bit rates for live video channels, all the while ensuring an exceptional quality of experience (QoE).

Harmonic stands as a pioneer in the field of AI technologies for content-aware encoding (CAE), having introduced groundbreaking innovations in this domain.

Here's a high-level overview of the CAE process:

Unsupervised machine learning: CAE employs unsupervised machine-learning algorithms to identify similarities in video content, enabling efficient bandwidth utilization.

Intelligent motion estimation: Machine-learning algorithms use intelligent motion estimation to predict the required capacity for upcoming video frames. This anticipatory approach reduces redundant data, further optimizing compression.

Reinforcement learning: CAE continuously enhances its compression algorithm through reinforcement learning. As more video data is processed, the algorithm evolves autonomously, leading to continuous improvements in compression efficiency.

AI-powered content-aware encoding reduces development time and costs and provides OTT content creators and distributors with customized compression algorithms tailored to their content.

Variable bitrate encoding 

To understand variable bitrate (VBR) encoding, you’ll need to first know about video bitrate. Data rate or video bitrate 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; 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 remember a target bitrate during your video encoding.

Variable Bitrate (VBR) encoding is a technique that intelligently distributes "bits" within your video content. Instead of using a fixed bitrate, VBR dynamically allocates more bits to complex scenes, such as action sequences and fewer bits to simpler ones, like static shots. This approach ensures optimal video quality for viewers based on the strength and speed of their internet connections.

When network conditions are favorable, VBR encoding provides higher video quality, enhancing the overall viewing experience. Conversely, when signals weaken, it automatically switches viewers to lower video quality to prevent buffering delays. Offering multiple bitrates ensures that your viewers receive the best version of your video content, making VBR-encoded videos superior to constant bitrate (CBR)-encoded ones.

Cloud encoding

Cloud encoding has become an increasingly popular method for video compression and delivery. It involves using cloud-based services and infrastructure to perform video encoding tasks. Cloud encoding offers scalability, flexibility, and the ability to handle large-scale video processing. It can significantly reduce the load on local resources and expedite encoding tasks.

Choosing the best video encoding software

Now, when it comes to selecting the best video encoding software, several key considerations come into play:

Output quality: Ensure the software supports your desired video quality and resolution. Look for options to customize encoding settings to match your specific requirements.

Speed and efficiency: Evaluate the software's encoding speed, which can significantly impact your workflow. Some software offers support for hardware acceleration, utilizing the power of the graphics processing unit (GPU) to expedite encoding processes. This can be a significant advantage for faster encoding.

Compatibility: Check for compatibility with various video codecs, containers, and formats. The software should support the codecs you intend to use and provide flexibility for multi-format encoding.

User-friendliness: A user-friendly interface and intuitive controls can simplify the encoding process, making it accessible even to those with limited technical expertise.

Customization: Look for software that allows you to fine-tune encoding parameters. Customization options are crucial for achieving the best balance between file size and video quality.

Platform and OS support: Ensure the software is compatible with your operating system (OS), whether it's Windows, macOS, or Linux.

Audio and metadata: Keep a check on audio and metadata capabilities. Without these, video value is impacted. Subtitles and audio encoding formats must also be adapted to receiver capabilities.

Cost: Consider your budget when choosing encoding software. While some options may be free, others offer advanced features and support at a premium price.

Customer support: Check for available customer support and resources. Good customer support can be invaluable when troubleshooting issues or optimizing your encoding workflow.

Reviews and recommendations: Seek feedback from other users and explore expert reviews to gauge the software's performance, reliability, and user satisfaction.

Choosing the right video encoding software is critical as it significantly impacts the quality and efficiency of your video encoding process.

Let's find out how Harmonic can assist with video encoding.

How can Harmonic help with video encoding?

When it comes to video encoding and processing, Harmonic offers solutions to deliver top-quality video with minimal bandwidth usage. Our products are designed to meet tight deadlines and deliver a diverse channel lineup to all screens. Here's how Harmonic can assist:

Market-leading video quality: Harmonic's video processors and encoding products are equipped with the PURE Compression Engine™, an advanced encoding technology that supports SD and HD formats and codecs like MPEG-2, MPEG-4 AVC, and HEVC for broadcast and over-the-top multiscreen delivery. This ensures superior video quality at minimal bandwidth, whether you're working with IPTV or OTT delivery networks.

Superior AI-based technology: Harmonic offers the optional EyeQ™ real-time video optimization technology, which leverages the human visual system's functionality to reduce bandwidth consumption by up to 50%. This optimization enhances video quality, reduces buffering and improves viewers' overall quality of experience.

World-class service and support: harmonic's global network of responsive support professionals ensures outstanding customer experiences on any device. Harmonic's service commitment guarantees the support you need to succeed in the competitive video streaming landscape.

Take the next step to offer better video quality

For those who are seeking top-tier video encoding and processing technologies for broadcast and OTT, Harmonic offers solutions such as the XOS Advanced Media Processor that empower you to process your media efficiently from encoding to processing. 

Unlock new possibilities by launching new channels, achieving low-latency live sports streaming, or delivering pristine UHD HDR video. Created with innovation and adaptability in mind, our range of video streaming platforms and products, leveraging cutting-edge AI technology, lets you deliver immersive viewing experiences for your audience around the clock.

Ready to take video streaming to the next level? Connect with us today.