What Is A Codec? Video Codecs and Encoding Explained

A large-screen monitor with an icon representing the process of video encoding applying a codec algorithm to compress content.
 

A codec is software or hardware that compresses digital video for storage and transmission, and then decompresses it for playback. The term combines “coder” and “decoder.” The most common video codecs today include H.264/AVC, H.265/HEVC, AV1, and VP9.

Without video codecs, “Netflix and chill” would never have come about. These two-part compression tools allow distributors to condense a video file for delivery across the internet via a process called video encoding. Codecs are the reason we can so easily conduct business meetings over Zoom and binge TV shows on our phones, even with limited bandwidth.

Thanks to codecs, Netflix manages to stream more than 360,000 hours of content every minute. And in order to get those streams to the various devices that end-users are tuning in from, Netflix must use both new and tried-and-true codecs.

What does video encoding involve? How do video codecs work? Dig deeper below and check out our list of the best video codecs for streaming.

What Is Video Encoding?

Video encoding refers to the process of converting raw video into a digital format that’s compatible with many devices. When it comes to streaming, videos are often compressed from gigabytes of data down to megabytes of data. Video encoding is essential to live streaming, helping to ensure quick delivery and playback.

Encoding can occur within a browser or mobile app, on an IP camera, using software, or via a stand-alone appliance. Popular software options include Vmix, Wirecast, and the free-to-use OBS Studio.

In order to compress the raw video into a more manageable size, encoders use video and audio codecs, which apply algorithms to shrink the bulky video for delivery. To put it more simply: encoding is the process of compression, and codecs describe how that compression is done.

What Is a Codec?

A codec, short for “coder-decoder,” is technology used to compress and decompress video data, making it smaller for efficient streaming and storage. Codecs ensure smooth playback across various devices by reducing file size without significantly compromising visual quality.

Put simply, a codec has two jobs. The encoder side shrinks raw video into a compressed bitstream, and the decoder side rebuilds the frames on the viewer’s device. An encoder, which is the hardware or software (such as OBS Studio), runs a codec. A container, such as MP4, packages the compressed audio and video into one file.

The Purpose of Codecs

Codecs are particularly significant for internet streaming. Without effective compression, delivering high-quality video content online would require impractically high bandwidth. That would cause buffering issues and degraded user experiences. Codecs mitigate this by compressing video files to a fraction of their original size, enabling smooth transmission over networks with limited bandwidth. Upon reaching the end-user’s device, the codec decompresses the data, reconstructing the video for playback with minimal quality loss.

How Do Codecs Work?

Literally ‘coder-decoder’ or ‘compressor-decompressor,’ codecs apply algorithms to the video and create a miniature version of it. For that reason, these video compression standards facilitate both the encoding/compression and the decoding/decompressing aspect of video streaming.

Lossy vs. Lossless Video Encoding

Lossless compression involves compacting data without discarding any information. Lossy compression, on the other hand, gets rid of data to optimize file sizes further. When you use the .jpeg codec, for example, you’re using lossy compression. Lossy codecs discard unnecessary data and reduce quality where possible. As a result, an image converted to .jpeg will always be lower quality, but easier to store and share, than the raw original.

In video streaming, lossy compression is the default. Lossy video codecs compress content for storage and transmission, and later decompress the video for viewing. The final video should appear the same, but it will be missing any data that was deemed undetectable by the human eye.

Lossy compression is a lot like Wonkavision in Charlie and the Chocolate Factory. It makes a large collection of data smaller for transport to your screen:

 
 

Video Container Format

Once compressed, the components of a stream are packaged into a wrapper or file format. These files contain the audio codec, video codec, closed captioning, and any associated metadata. Common containers include .mp4, .mov, .ts, and .wmv.

Containers can often ingest multiple types of codecs. That said, not all playback platforms accept all containers and codecs. That’s why multi-format encoding is crucial when streaming to a wide range of devices.

For example, a .mov file and a .wmv file might have the same data and codecs inside. But the .mov file would be used for playback on MacBook’s QuickTime player, while the .wmv file would be used for playback on a PC’s Windows Media Player.

Keep Up With All the Latest Trends

Subscribe to stay in the know about all things live streaming.

Subscribe Now

Video Codecs vs. Containers

A codec acts upon the video, both at the source to compress it and at the destination before playback to decompress it. This is done through lossy compression, during which any unnecessary data is discarded.

On the other hand, a video container format stores the video codec, audio codec, and metadata such as subtitles or preview images. The container holds all the components together and determines which programs can accept the stream.

Encoding Profiles

Each of the codecs described below is more accurately thought of as an umbrella for closely related encoding profiles. Newer technologies, like Essential Video Coding (EVC), only have two profiles. Whereas older technologies, like H.264, have enough profiles to fill this entire table.

Table 1. The many profiles of the H.264 codec (source: Wikipedia)

Our discussion of the best video codecs will look at each codec in a general sense. That said, it’s worth noting that there are some differences among encoding software and hardware due to this variation.

A Brief History of Video Codecs

Data and video compression go back decades, but the International Telecommunication Union (ITU) developed the first commercially successful video codec, H.261, in 1988. The organization designed it for use in video conferencing. The maximum resolution it provides is 352×288 pixels, at a frame rate of 30 frames per second. The ITU also standardized G.711, an early digital codec, in 1972. G.711 was designed for use in telephony networks and had a bitrate of 64 kbps.

In the 1990s, the Motion Picture Experts Group (MPEG) developed a series of video coding standards that became the most widely used codecs in the world. The first MPEG standard, MPEG-1, was developed in 1993 and was created for use in CD (VCD) players. It had a resolution of 352×240 pixels at a frame rate of 30 frames per second. Later, the organization developed MPEG-2 for use in DVD players with a similar frame rate, but a higher resolution of 720×480 pixels. The most widely used video codec since 2016 is H.264/MPEG-4 AVC, which is used in a variety of applications that record or transmit video.

Best Video Codecs for Streaming

Codecs vary widely based on their application, compatibility, and efficiency in compressing video data. Choosing the right codec depends significantly on your streaming needs, whether you’re aiming for low-latency real-time interactions, broad device compatibility, or high-resolution streaming. Below, we’ll explore the types of codecs commonly used in video streaming and highlight their key characteristics.

Delivering video over the internet to a variety of devices starts with encoding across a variety of codecs. Next-generation codecs improve encoding efficiency and quality, while legacy codecs enable playback on outdated machines.

Take it from the largest distributor of video streaming around: Netflix.

“Netflix says it utilizes a deep toolbox of codecs, which can be called upon to stream compatible formats to display devices. Although Netflix continually adds new and improved codecs, it has never abandoned one — it continues to support the VC1 codec it started with in the first Netflix streaming device, a 10-year-old LG Blu-ray player.”

Our video codec list below includes both the old and the new. While industry leaders continue to refine and develop the latest compression tools, they also employ older codecs like H.264/AVC for delivery to legacy devices. In essence, we live in a multi-codec world, with the landscape trending toward fragmentation rather than consolidation.

 
 

H.264/AVC

The majority of encoding output today takes the form of H.264 files, also referred to as AVC (Advanced Video Coding). This widely supported codec was developed by the International Telecommunications Union and the International Organization for Standardization/International Electrotechnical Commission (ISO/IEC) Moving Picture Experts Group.

H.264 also has significant penetration into markets outside of streaming, such as Blu-ray disks and cable broadcasting. It is often incorporated with the AAC audio codec and can be packaged into .mp4, .mov, .F4v, .3GP, and .ts containers.

H.264 plays on virtually any device, delivers quality video streams, and comes with the least concerns surrounding royalties. That’s not to say that it isn’t royalty-bearing, only that content publishers know what to expect in terms of royalties (which isn’t always the case). Because of its widespread device support, H.264 remains the most used option.

Is H.264 best for low latency or high resolution streaming?

H.264 works great across all the primary markets for video consumption (browser, mobile, Smart TVs). However, it isn’t suitable for 4K video or high dynamic range (HDR) content. As the speediest codec detailed in this blog, H.264 is better for low-latency streaming than 8K video delivery. Streaming Media’s Jan Ozer explains:

“H.264 excels in live origination and transcode because of encoding speed; all other codecs need hardware support for both functions. Understandably, H.264 has received the lion’s share of attention in low-latency applications, whether HTTP-based or WebRTC.”

 
Table 2: Video Codec Comparison: Suitability
Codec SuitabilityLive OriginationLive TranscodeLow Latency4KHDR
H.264ExcellentExcellentExcellentPoorPoor
VP9PoorPoorWebRTCExcellentPoor
HEVCGoodGoodNascentExcellentExcellent
AV1NascentNascentWebRTCExcellentNascent
 

It’s also worth nothing that H.264 is the oldest video encoding format on this list. H.264 shipped in 2003, making it more than 20 years old.

While many predicted it would be obsolete by now, it persists today. Due to its processing power and cost, H.264 maintains its allure. Plus, the number of devices that can encode and decode H.264 can’t be beat, including IP cameras, set-top boxes, mobile devices, and low-power devices.

TL;DR

H.264 is an efficient and widely adopted video compression technology used to contribute, distribute, and deliver streams, and it remains unparalleled in device reach. Consequently, it lends especially well to low-latency workflows.

   

H.265/HEVC

The ITU-T Video Coding Experts Group (VCEG) and the ISO/IEC Moving Picture Experts Group (MPEG) jointly developed H.265 as the successor to H.264. Also called HEVC (High Efficiency Video Coding), this codec aims to improve compression efficiency and support 8K resolution. It generates smaller files than H.264. Thus, H.265 decreases the bandwidth required to view streams. This makes it ideal for high-resolution streaming.

That said, H.265 adoption trailed H.264 for years, stifled by uncertainties about royalties. Specifically, content distributors are frustrated with the unpredictable costs when using this codec. This, along with a lack of compatibility for browser-based playback, directly resulted in AV1’s development. Industry leaders like Google, Microsoft, and Mozilla had no interest in supporting the costly codec in Chrome, Edge, and Firefox. Accordingly, only ~18.08% of browsers accepted H.265-encoded video up until recently.

Is H.265 widely used?

H.265 remains a better option than VP9 or H.264 for 4K and HDR video delivery to living room devices because it’s almost universally supported on Smart TVs.

 
Table 3: Video Codec Comparison: Royalty Status
Codec Royalty StatusEncoderDecoderPaid ContentFree Internet Content
H.264YesYesYesNo
VP9NoConsumer deviceNoNo
HEVCYesYesSomeUnclear
AV1NoConsumer DeviceNoNo
 

Google added H.265 support in Chrome, making it viable for browser-based video consumption. With this change, 84% of browsers should be able to play video encoded with H.265 (assuming that the devices accessing those browsers have underlying support).

 

TL;DR

If you’re delivering premium OTT content to living room devices, H.265 is your best bet. And with Google’s added support for HEVC in Chrome, it’s poised to become more commonplace for browser-based video streaming.

   

AOMedia Video 1 (AV1)

Frustrated about the royalties associated with H.265, Amazon, Netflix, Google, Microsoft, Cisco, and Mozilla formed the Alliance for Open Media. The goal? Create an open-source, royalty-free alternative called AV1.

This initiative to democratize high-quality video delivery and playback has been a long time coming. Since AV1’s release in 2018, adoption has spread across major streaming services, browsers, and devices.

 
Source: AnandTech

According to Jonathan Rosenberg, then CTO of the Collaboration Technology Group at Cisco, “The creation of an advanced, royalty-free video codec is paramount to the ongoing success of collaboration products and services. This is why Cisco joined AOMedia as a founding member, and why Cisco has invested in making AV1 both efficient and accessible to the internet community.”

AV1 touts itself as being 30% more efficient than H.265. However, it has taken some time for AV1 hardware decoding capabilities to be integrated on a mass scale. A lack of living room devices (a.k.a. Smart TVs) capable of decoding AV1 streams has long hampered adoption. That said, Fire TV sticks have added support. And, leaders at Netflix, YouTube, and Amazon are following Amazon’s lead. What’s more, AV1 is finding its way into real-time encoding with WebRTC. Cisco, Google, and even Wowza’s Real-Time Streaming at Scale feature can encode AV1.

TL; DR

AV1 is a leading open-source video codec, with adoption growing across OTT and real-time applications.

   

VP9

Google developed VP9 as a royalty-free, open-source alternative to H.265. YouTube and Chrome support VP9, as well as every Android phone, Mozilla’s Firefox, Apple’s Safari, and all new iOS devices. This codec also appears in many WebRTC workflows, with more than 90% of Chrome-encoded WebRTC video using VP9 or its predecessor VP8.

VP9 was released in 2013, and it’s a better option than most for several reasons. For one, VP9 performs about the same as H.265/HEVC. This makes it well suited for 4K video, especially when publishing to YouTube. Beyond that, VP9 ranks second only to H.264/AVC in terms of compatibility across browsers and devices. Samsung, Sony, LG, Roku, and many other household names support it. Plus, Google’s and Netflix’s adoption will continue to drive this trend.

 
Table 4: Video Codec Comparison: Compatibility
Codec CompatibilityBrowserMobileSmart TV/OTT
H.264Virtually allAllAll
VP9Virtually allAndroid, iOSMost
HEVCMost (hardware-dependent)Android, iOSAll
AV1Edge, Firefox, Chrome, OperaAndroidNascent
 

Think of VP9 as an earlier version of AV1. Both are open-source, and both claim to be royalty-free (although there is some doubt surrounding this). VP9 adoption has slowed as hardware manufacturers focus on AV1.

 

TL; DR

VP9 is a more advanced and higher-quality compression technology than H.264/AVC. Also, it has wider compatibility than many of its alternatives. Plus, it works well for 4K streaming. That said, the industry’s focus on AV1 has slowed new VP9 deployments.

   

H.266/VVC

The H.266/VVC (Versatile Video Coding) specification was finalized in 2020, making it the newest ITU-T and ISO/IEC video coding standard. While intended to usurp H.265 and H.264, it has the same royalty issues as its predecessors.

Back in 2018, Beamr’s chief technology officer Dror Gill explained, “It’s okay to pay royalties as long as you know how much you need to pay and when. With H.264, it was very clear how much you need to pay. There was one body collecting all the royalties, and this became the world’s most prominent video codec. The same can happen with VVC, if they get their act together before releasing the standard.”

And yet, the H.266/VVC royalty rate remains a mystery at this time. Unforeseen licensing challenges leave its fate up in the air as we wait to see how adoption pans out. As codec expert Jan Ozer put it:

“Overall, the individual H.266/VVC codec developers have made great strides in delivering the promised bandwidth savings, though final performance won’t be known until the royalty policies are set and we know which tools are in which profiles. Beyond that, given the diverse range of other factors in play, it’s impossible to know at this time whether VVC will ever reach critical mass.”

TL; DR

H.266/VVC remains a niche choice for most content publishers, with licensing, device support, and adoption still taking shape.

   

What Are Best Practices For Encoding?

Encoding best practices go way beyond what codec you select. You’ll want to consider frame rate, keyframe interval, and bitrate.

Luckily, a live stream can always be transcoded into another format once it reaches the server. This can be done using streaming software deployed on your own servers, or in the cloud for managed delivery.

Shop Smarter, Not Harder

Download our Buyer’s Guide to Video Streaming Platforms to start building video into your business.

Get PDF
 

Encoding vs. Transcoding

What Is Transcoding?

Transcoding involves taking an encoded file and decoding it to alter it in some way. This can take the form of re-encoding the data into a more common codec, resizing the video into a lower resolution, transrating the file into a different bitrate, or transmuxing it into a more scalable protocol.

Once the process is complete, the media server recompresses the manipulated file for delivery. 

Transcoding gives you the freedom to change an H.264-encoded video into a VP9- or H.265-encoded video. As a result, your content is optimized for 4K streaming to end users, but you also benefit from speedy video contribution.

Think of encoding and transcoding as the steps involved when packing for a vacation. Initially, you compress (encode) your clothing into a bag for easy transportation to wherever you’re headed. Then, once you arrive at your destination, you unpack, discard items that you no longer need, add trinkets gathered during your travels, and repack your bag for the next step of your journey. This is transcoding.

   

Multi-Codec Video Delivery

Video codecs are what allow us to take the boundless world, capture a slice of it through the lens of our camera, and compress it down for delivery over the internet. Because proprietary codecs and video containers exist, it’s essential to deliver multiple different versions of your live streams to viewers.

Video Codec FAQs

What codec does HLS support?

HLS primarily supports H.264 for video and AAC for audio. But, newer standards like HEVC/H.265 are increasingly being adopted for high-resolution streaming.

What does codec stand for?

Codec stands for “coder-decoder,” and some sources expand it as “compressor-decompressor.” The encoder compresses raw video for storage or transmission, and the decoder decompresses it for playback on the viewer’s device.

Why do you need a codec?

Codecs compress video files for easier streaming and storage, allowing high-quality videos to be played efficiently across various devices.

Why are codecs important?

Without codecs, streaming videos online would be difficult or impossible due to large file sizes, leading to slow buffering, increased bandwidth usage, and poor user experiences.

Which codec is best for video?

The best codec for video depends on the streaming use case, target audience devices, and quality requirements. H.264/AVC remains the most widely deployed option thanks to near-universal device compatibility and strong performance in low-latency workflows. H.265/HEVC offers roughly 30%-40% better compression efficiency than H.264, which makes it the preferred choice for 4K and HDR delivery to Smart TVs and OTT devices. AV1 provides a royalty-free alternative with up to 30% efficiency gains over HEVC and now powers VOD and real-time delivery at YouTube, Netflix, and Amazon. VP9 remains relevant as a royalty-free option with broad browser support, though AV1 is largely being chosen for new deployments. For workflows that must reach a fragmented device ecosystem, a multi-codec delivery strategy combining H.264 for reach with HEVC or AV1 for efficiency produces the strongest results.

Which codec is better, H265 or H264?

H.265/HEVC delivers better compression efficiency than H.264, while H.264 offers broader device compatibility and faster encoding performance. HEVC yields roughly 30%-40% bitrate savings at the same visual quality, which makes it the stronger choice for 4K, HDR, and bandwidth-constrained delivery. H.264 still wins on encoding speed, low-latency contribution, and reach across legacy hardware, IP cameras, and browsers without native HEVC support. Hardware HEVC decoding has improved H.265 viability on the web, though H.264 still holds the compatibility edge across the broadest range of devices.

What are the different types of video codecs?

Video codecs fall into two broad categories: lossy and lossless codecs. Lossy codecs discard perceptually redundant data to achieve high compression ratios and dominate streaming workflows, while lossless codecs preserve the source data and serve archival or post-production needs without quality loss. The most common codec families today include H.264/AVC and H.265/HEVC, along with emerging codecs like H.266/VVC from the ITU and MPEG, along with AV1 from the Alliance for Open Media and VP9 from Google. Each family includes multiple encoding profiles that tune compression behavior for specific use cases such as low-latency contribution, 4K HDR delivery, or real-time WebRTC communication.

How do video codecs work?

Video codecs work by applying spatial and temporal compression algorithms that remove redundant or imperceptible information from raw video at the source, then reversing the process at the playback device. The encoder analyzes consecutive frames, stores only the differences between them through inter-frame prediction, and discards visual data that human vision cannot easily detect using techniques like quantization and entropy coding. The compressed bitstream travels across the network as a fraction of its original size, and the decoder reconstructs the frames for playback. Lossy compression powers most streaming workflows because it strikes a practical balance between file size and visual quality.

What are the limitations of video codecs?

Video codecs carry several practical limitations, including:

  • Quality degradation from lossy compression
  • Licensing complexity
  • Hardware decoding requirements that affect battery life
  • Tradeoffs between encoding speed and compression efficiency

Newer codecs deliver better compression but demand significantly more processing power to encode, which often requires dedicated hardware or ASIC silicon for large-scale workflows. Device compatibility also constrains codec selection because not every browser, mobile device, or Smart TV supports every codec, which is why multi-codec delivery strategies remain essential for reaching a broad audience.

What does it mean to encode a video?

Encoding a video means converting raw camera or screen capture data into a compressed digital format suitable for storage, transmission, and playback. The process applies a codec algorithm that shrinks gigabytes of source data down to megabytes by removing redundancy between frames and visual information that human vision cannot easily detect. Encoding can occur on a camera, in software like OBS Studio, on a hardware appliance, or in the cloud through a platform like Wowza Streaming Engine. The packager then wraps the output in a container format such as fMP4, CMAF, or Transport Stream (TS) and delivers it through a streaming protocol like HLS, DASH, or WebRTC.

Is MP4 an encoding?

MP4 is not an encoding, MP4 is a container that holds compressed video data, audio data, subtitles, and metadata together in a single file. A codec such as H.264, H.265, or AV1 handles the actual video encoding inside the MP4 file, with AAC typically handling the audio. Two MP4 files can contain entirely different codecs, and not every device or player supports every codec a container can hold.

Is h264 still relevant today?

H.264 remains highly relevant today and still accounts for the majority of encoded video output worldwide. Near-universal compatibility across browsers, mobile devices, Smart TVs, IP cameras, set-top boxes, and low-power hardware gives content distributors a reliable fallback option that newer codecs have not yet matched. H.264 also excels in live origination, transcoding, and low-latency workflows, including WebRTC, thanks to fast encoding performance and a predictable royalty structure. While AV1 and HEVC continue to gain ground for 4K and HDR delivery, multi-codec strategies still include H.264 to guarantee playback on legacy devices.

Is VP9 or AVC better?

VP9 delivers significantly better compression efficiency than AVC/H.264, while AVC offers broader device compatibility and faster encoding performance. VP9 achieves roughly the same quality as H.265 at lower bitrates than H.264, which makes it well suited for 4K streaming on YouTube and WebRTC workflows in Chrome. AVC remains the safer choice for reaching the widest range of devices, including older Smart TVs, set-top boxes, and embedded hardware where VP9 decoding may be unavailable. For workflows targeting modern browsers and Android devices, VP9 is a strong option, while AVC continues to anchor multi-codec strategies focused on universal reach.

Conclusion

Understanding video codecs and encoding is crucial in today’s content-driven world. By leveraging the right codecs, you can optimize your video streaming workflow, ensuring efficient delivery, superior quality, and broad device compatibility.

Wowza Streaming Engine makes it easy to implement multi-codec delivery solutions, providing the flexibility and control needed for customized streaming experiences. Whether you’re delivering real-time interactive video or high-quality on-demand content, Wowza Streaming Engine supports your workflow seamlessly.

Ready to optimize your video streaming? Reach out today to get a demo of Wowza Streaming Engine and elevate your online video delivery.

About Don Kianian

Don Kianian is a seasoned marketing professional and content strategist with deep expertise in video production technology and media workflows. He has spent more than 10 years building content, fostering awareness, and driving demand for complex technology and media solutions. He holds a Master of Science in Marketing from Santa Clara University and a Professional Certificate in Data Analytics from Google. Prior to Wowza, Don led Marketing efforts for Sherpa Digital Media, which was later acquired by Telestream. As a thought leader in the media production and video streaming space, Don hosted and produced "The Wirecast Show" in 2022-2023, joined as a featured guest in interviews to secure prominent industry analyst coverage, and has helped secure numerous awards at NAB, IBC, and Streaming Media events.
View More

FREE TRIAL

Live stream and Video On Demand for the web, apps, and onto any device. Get started in minutes.

START STREAMING!
  • Stream with WebRTC, HLS and MPEG-DASH
  • Fully customizable with REST and Java APIs
  • Integrate and embed into your apps

Search Wowza Resources


Subscribe


Follow Us


Categories

Blog

Back to All Posts