H.264 vs H.265: Which Video Codec Should You Use?
H.264 and H.265 are the two dominant video codecs of the last decade. Most video you see (YouTube, Netflix, phone videos) uses one or the other. Knowing the difference helps you pick the right one for your purposes.
The one-line comparison
H.264 plays everywhere. H.265 is half the size at the same quality but has compatibility limitations.
What each is
H.264 (also called AVC — Advanced Video Coding): standardized in 2003. The dominant video codec for over a decade. Powers Blu-ray, most YouTube uploads, the original iPhone video, and most existing video content.
H.265 (also called HEVC — High Efficiency Video Coding): standardized in 2013. About 50% more efficient than H.264 at the same visual quality. Used by Apple devices, 4K streaming services, and modern cameras.
File size comparison
For the same visual quality:
- 1080p 5-minute video, H.264: ~150 MB
- 1080p 5-minute video, H.265: ~75 MB
For 4K content, the difference is even more dramatic — H.265 makes 4K practical for streaming and storage.
Quality at low bitrates
At very compressed bitrates, H.265 holds quality better than H.264:
- H.264 at 2 Mbps for 1080p: noticeable artifacts
- H.265 at 1 Mbps for 1080p: similar quality
For bandwidth-constrained streaming, H.265 enables higher quality.
Compatibility
H.264: universal. Every device made in the last 15 years plays H.264.
H.265:
- Modern Apple devices (iPhone 6 and later, recent iPads, modern Macs): full support
- Modern Android phones: most support
- Windows 10/11: requires HEVC Video Extensions ($0.99 from Microsoft Store, or free with Apple Extensions)
- Modern smart TVs: most support
- Browsers: Safari supports; Chrome/Firefox/Edge added support more recently
- Older devices: limited or no support
For sharing widely or with older recipients: stick to H.264.
Patent licensing
A key difference:
H.264: well-established licensing through MPEG-LA, with patent pools and royalty structures. Most devices have already paid for H.264 capability.
H.265: more complex patent pool, with multiple licensing entities and unclear royalty structures. Some companies (Mozilla in Firefox) initially avoided HEVC due to licensing complexity.
This is why AV1 (a newer royalty-free alternative) has gained traction.
When to use H.264
- Sharing widely: when recipients might have older devices
- Web uploads: most platforms transcode anyway, but uploading H.264 avoids any compatibility issues
- Emails and casual sharing: universal compatibility wins
- Editing pipelines: H.264 is easier to decode for editing
- Backward compatibility with old devices
When to use H.265
- Saving storage on your own devices (especially 4K video)
- Streaming high-resolution content: 4K, HDR
- Apple ecosystem: HEVC is the default and works well
- Mobile data savings: 50% less data for same quality
- Modern target audiences only: where compatibility isn’t a concern
What’s actually in your files
How to check:
Mac: right-click video → Get Info → look at Format. Or open in VLC → Tools → Codec Information.
Windows: right-click → Properties → Details tab → look for “Video format” or “Codec”.
FFmpeg: ffprobe video.mp4 shows codec info.
iPhone videos since iOS 11: typically H.265 (HEVC) by default. Change to H.264 in Settings → Camera → Formats → Most Compatible if needed.
Converting between
H.265 → H.264 (for compatibility):
ffmpeg -i input_hevc.mp4 -c:v libx264 -c:a copy output_h264.mp4
Or in HandBrake: choose H.264 preset.
H.264 → H.265 (for size savings):
ffmpeg -i input_h264.mp4 -c:v libx265 -c:a copy output_hevc.mp4
HandBrake similarly supports HEVC presets.
Re-encoding is computationally expensive (especially H.265). Plan for some encoding time.
The next generation: AV1
AV1 (AOMedia Video 1): released 2018. About 30% more efficient than H.265. Royalty-free.
Support:
- Modern browsers (Chrome, Firefox, Edge — Safari more recent)
- YouTube, Netflix using it
- Streaming services adopting
The catch: AV1 encoding is currently slow. Decoding works fine on modern hardware. Slowly replacing H.265 in some pipelines.
For most casual uses today, choose H.264 (compatibility) or H.265 (efficiency). AV1 is the future but not yet ubiquitous.
When format doesn’t matter
For most casual users:
- Phone defaults are fine (H.265 on modern iPhones; H.264 on older devices)
- Social media transcodes anyway — your upload format is replaced by the platform’s
- File size is usually acceptable at default settings
The format conversation matters more for:
- Storage-conscious archives (use H.265 for size)
- Wide distribution (use H.264 for compatibility)
- Streaming infrastructure (technical optimization)
- Specific compatibility issues
TL;DR
- H.264 = universal compatibility, well-established, larger files
- H.265 / HEVC = ~50% smaller files at same quality, less universal, especially on older devices
- For sharing widely: H.264
- For storage: H.265
- iPhone: defaults to H.265 since iOS 11 (configurable to H.264)
- Convert with: HandBrake (GUI) or FFmpeg (command-line)
- AV1 is the future royalty-free successor; adoption growing