Video trends · 6 min read

h.264 vs h.265

What is the difference between H.264 vs. H.265?

In the never-ending debate of H.264 vs. H.265, let's see how each of these of the two codecs are different from each other.

Arushi Gupta

October 16, 2023

With video playback technology witnessing quite an evolution because of the increasing popularity of videos, we have the codec comparison of H.264 vs. H.265 coming up quite frequently. You might be wondering, in the battle of H264 vs. H265, what reigns supreme?

H.264 vs. H.265: What do they mean?

Let’s start from the basics and understand what the two terms – H.264 vs. H.265 – mean.

What is H.264?

H.264, also referred to as Advanced Video Coding (AVC), operates by using advanced algorithms, inter-prediction and spatial intra-prediction. These units, termed macroblocks, consist of 16x16 pixel samples which can be further subdivided into sub macroblocks. The H.264 codec is known to achieve significantly reduced bitrate compared to its forerunner and remains in use across various streaming sources.

What is H.265?

H.265 represents the advanced iteration of H.264, alternatively also known as High Efficiency Video Coding (HEVC). Diverging from H.264's macroblock approach, H.265 utilizes Coding Tree Units (CTUs) for information processing. While blocks in H.264 were confined to 16x16 sizes to 4x4 sizes, H.265 can use a complete range of blocks from 64x64 pixels all the way to 4x4, resulting in notably more efficient compression. HEVC also demands higher computational power for effective data compression.

Difference between H.264 vs. H.265: Let’s get into the details

Both H.264 and H.265 can provide high quality and small file size but there is a slight difference between them.

Macroblocks in H.264 vs. CTUs in H.265

Macroblocks in H.264 vs. CTUs in H.265

1. Video Quality

H.264 and H.265 codecs exhibit significant disparities in video quality at equivalent bitrates. In the case of H.264, the borders of the blocks are likely to be distorted because each macroblock is fixed, and each macroblock’s data is independent of another. In contrast, H.265 delivers sharper, more detailed images with fewer artifacts. This enhancement arises from its ability to determine CTU (Coding Tree Unit) sizes based on contextual information, making H.265 superior to H.264 in terms of compression and image quality.

2. Compression and File Size

The degree to which a codec compresses digital videos directly influences the resulting file size for transmission or streaming. Smaller file sizes equate to lower bandwidth at a certain quality. Since H.265 uses a smaller bitrate to transmit the same quality as H.264, we can conclude that H.265 can export smaller files. Consequently, H.265 takes the lead in scenarios where limited storage capacity or constrained bandwidth is necessary for smaller file sizes.

A corollary of this is that, H.265 also achieves a higher coding efficiency as compared to H.264 at the same quality.

3. Compatibility

In the realm of compatibility, H.265 surpasses H.264 but it lags behind it in popularity. While H.264 enjoys support from a larger number of devices and browsers, support for H.265 is limited to a lesser number of devices and browsers. This is mainly due to H.265’s patent issues that are preventing its easy adoption.

4. Patent and licensing

The AVC or the H.264 codec has just one patent licensing. On the other hand, HEVC has four: HEVC Advance, MPEG LA, Velos Media, and Technicolor. This fact complicates the adoption of H.265 and makes it more expensive for companies to afford.

Tabular comparison between H.264 and H.265

It’s no fun for technology-geeks until we talk numbers in the ‘Is H.265 better than H.264’ debate.

Metrics H.265 H.264
Supported Containers mxf, ps, ts, 3gp , mkv, mp4, qtff, asf, avi m2ts, evo, 3gp, f4v, mkv, mp4, qtff, asf, avi, mxf, ps, ts
Storage Requirements Requires lesser space than H264 Requires more space
Patent Complicated adoption due to 4 patent licensing Easy adoption due to single patent licensing
Use cases - Blu-ray disks.
- Streaming digital videos from YouTube, Vimeo, etc.
- HDTV broadcasts over cable, terrestrial, and satellite.
- High definition videos - resolutions like 4K, 8K.
- Next-generation HDTV and satellite TVs
Supported by browsers - Supported by Safari (on Apple devices)
- Supported by all major browsers except Firefox (may require hardware support)
- Supported by all major browsers

AV1: The game-changer in video technology

AV1 is a royalty-free, open-source video compression standard developed by the Alliance for Open Media (AOMedia), a consortium of technology companies including Google, Mozilla, Netflix, and Amazon. AV1 was designed to provide even better compression efficiency than H.265, and it also addresses the patent and licensing issues associated with it.

 

Recently, Apple also announced hardware-accelerated decoder for AV1 as part of an upgraded video engine in the A17 Pro chip for iPhone 15 Pro and iPhone 15 Pro Max.

H.264 vs. H.265: Which codec is better?

In a nutshell, the H.264 and H.265 codecs are different in terms of video compression efficiency. Each of them have their advantages and disadvantages, and it depends on your video needs as to what you decide to choose.

 

If you intend to stream a large amount of videos (like Netflix or Amazon), H.265 may be better for you. If your video needs are limited, H.264 may be your best bet. So, it's worth noting that despite its advancements, HEVC has its share of drawbacks, and so does H.264. Make sure you consider both for a comprehensive perspective.

 

So, which codec are you going to choose?

H.264 vs H.265

Frequently Asked Questions (FAQs)

Does using H.265 (HEVC) require specialized hardware or software?

While some older hardware and software may not support H.265 natively, most modern devices and software platforms have built-in support for this codec. However, encoding H.265 videos may require specialized hardware or software for optimal performance.

What are the implications of using H.265 (HEVC) for live streaming?

H.265 can significantly improve the quality of live streaming by reducing bandwidth requirements and delivering higher-quality video at lower bitrates. Make sure that your streaming platform and devices support H.265 to avoid compatibility issues, before you choose to opt for it.

Are there any licensing fees associated with using H.265 (HEVC)?

Yes, H.265 is subject to patent licensing by various organizations, which may entail licensing fees for certain use cases. But many software and hardware manufacturers have negotiated licensing agreements, so end-users may not directly encounter these fees. Do review the licensing terms for your specific use case to ensure compliance.

Can I convert H.265 (HEVC) videos to H.264 (AVC) format?

Yes, it is possible to convert H.265 videos to H.264 format using video conversion software or online converters. Keep in mind that the conversion process may result in some loss of quality, as H.264 is not as efficient at compression as H.265.

 

api.video enables you to quickly and securely deliver on-demand and live-stream videos directly from your website, software, or app. Sign-up for a free sandbox account to try out api.video’s video API, or talk to our team to get a demo.

Try out more than 80 features for free

Access all the features for as long as you need.
No commitment or credit card required

Video API, simplified

Fully customizable API to manage everything video. From encoding to delivery, in minutes.

Built for Speed

The fastest video encoding platform. Serve your users globally with 140+ points of presence. 

Let end-users upload videos

Finally, an API that allows your end-users to upload videos and start live streams in a few clicks.

Affordable

Volume discounts and usage-based pricing to ensure you don’t exceed your budget.