How to Convert H.264 to H.265 or AV1: A Complete Beginner's Guide
Introduction
If your hard drive is filling up with movies, TV shows or home videos, converting H.264 videos to H.265 (HEVC) or AV1 can significantly reduce file sizes while maintaining excellent image quality. Modern video codecs are far more efficient than H.264, allowing you to store more content using less disk space and stream videos more efficiently.
I'm living in Australia and the so-called cost of living crisis has hiked the cost of hard disk drives. Ever since covid-19 and now the AI data center boom cost, the demand for disk space storage and it cost has ballooned so I am reluctant to buy more hard disk drives. Hence this article.
This guide explains the differences between H.264, H.265 and AV1, when you should convert your videos, which software to use, and the settings that deliver the best balance between quality, compression and encoding speed.
Straight to our FREE online FFmpeg Command Genereator
You don't like reading and are the practical type? Skip straight to our FFmpeg command generator tool that assists you create commands to convert your videos to h265 format using FFmpeg.
What is H.264?
H.264, also known as AVC (Advanced Video Coding), has been the world's most popular video codec for over a decade. It offers excellent compatibility with televisions, smartphones, tablets, web browsers and media players, making it the default format for Blu-ray discs, YouTube videos and countless streaming services.
Although H.264 still delivers excellent image quality, it is no longer the most storage-efficient codec available. Compared with newer codecs such as H.265 and AV1, H.264 files are generally much larger for the same visual quality.
What is H.265 (HEVC)?
H.265, also called High Efficiency Video Coding (HEVC), is the direct successor to H.264. It typically reduces video file sizes by 30–50% while maintaining similar visual quality.
H.265 has become popular for 4K Ultra HD video, HDR content and media libraries where storage efficiency is important. Many modern televisions, smartphones and media servers support H.265 hardware decoding, making playback smooth while saving valuable storage space.
For quite some time I was really opposed to converting my home videos to H.265 as I have some old PC's trucking along. However, I am finally biting the bullet as the disk spaced saved is just too good to pass up and I'll gradually move my super old computer equipment along.
My old equipment has served me well but I can easily get them to do other things than view videos, eg, games emulation. Yeah, I love my old Commodore 64 games.
What is AV1?
AV1 is a modern, open-source video codec developed by the Alliance for Open Media. It delivers even better compression than H.265 in many situations while avoiding royalty licensing fees.
Streaming providers such as YouTube, Netflix and other online platforms increasingly use AV1 because it provides excellent image quality while significantly reducing bandwidth requirements. Although encoding AV1 takes longer than H.265, the smaller file sizes make it attractive for long-term archiving.
H.264 vs H.265 vs AV1
Choosing the best codec depends on your priorities.
H.264 offers the widest compatibility and fastest encoding but produces the largest files.
H.265 provides an excellent balance between compatibility, quality and storage savings, making it the preferred choice for most home media collections.
AV1 produces the smallest files and highest compression efficiency but requires considerably more processing power to encode.
For most users, H.265 is currently the best all-round solution, while AV1 is ideal for long-term storage if encoding time is less important.
| Feature | H.264 / AVC | H.265 / HEVC | AV1 |
|---|---|---|---|
| Introduced | 2003 | 2013 | 2018 |
| Compression efficiency | Good | Very good | Excellent |
| Typical file size for similar quality | Largest of the three | Usually smaller than H.264 | Usually the smallest of the three |
| Encoding speed | Fast | Slower than H.264 | Usually slowest when software encoding |
| Decoding requirements | Low | Moderate | Higher, particularly without hardware decoding |
| Device compatibility | Excellent. Supported by almost all modern and many older devices. | Very good on modern TVs, phones, computers and streaming devices. | Good on newer hardware, but older devices may not support hardware decoding. |
| 4K video | Supported, but requires relatively high bitrates | Excellent choice for 4K video | Excellent choice for 4K video and streaming |
| HDR support | Possible, but less commonly used for modern HDR delivery | Excellent HDR support | Excellent HDR support |
| Hardware encoding | Widely supported by Intel Quick Sync, NVIDIA NVENC and AMD hardware | Widely supported by newer Intel, NVIDIA and AMD hardware | Supported by newer generations of Intel, NVIDIA and AMD hardware |
| FFmpeg software encoder |
libx264
|
libx265
|
libsvtav1 or libaom-av1
|
| Main advantage | Maximum compatibility and fast encoding | Excellent balance between file size, quality and compatibility | Very high compression efficiency and excellent quality at lower bitrates |
| Main disadvantage | Larger files for the same visual quality | More processing power required than H.264 | Encoding can be slow and older devices may not support it |
| Best suited for | Maximum compatibility, older devices, web video and fast conversion | Personal video libraries, 1080p and 4K video, storage savings and modern playback devices | Maximum compression, modern streaming, long-term storage and newer playback hardware |
| Overall | Best compatibility | Best all-round compromise | Best compression efficiency |
Why Convert H.264 Videos?
Converting existing H.264 videos offers several benefits.
- Reduce video file sizes by up to 50%
- Store more movies on the same hard drive
- Lower NAS storage costs
- Improve streaming performance
- Reduce backup times
- Save bandwidth when sharing videos
- Future-proof your media library
For users with large home video collections, the storage savings alone can justify converting your home video library.
How to convert video to H265 (hevc) format
One of the best, easiest and FREE ways to convert your home video's is to use Ffmpeg. What's more, Ffmpeg is supported on Linux, Windows and Apple so you can easily use it no matter what devices you have at home.
Ffmpeg the easy way with our online tool
Yes you can read up on all the instructions, try and find the best settings, search the internet endlessly and even use AI. And, I know you might think AI is easiest, yes, maybe for a once-off task but I'm sure you'll find our tool to create Ffmpeg commands so great that you won't bother with AI when this is even easier.
Use our fantastic Ffmpeg command generator tool here and live the easy life.
I'll show you three different ways to use Ffmpeg to convert your video files to h265 format. Two methods will use hardware accelerated encoding (dependent upon the the specifications of your own hardware), while the other will use CPU/software encoding. In simple English, I'll provide the following examples:
- Intel Quick Sync H.265
- CPU/software H.265 using libx265 at CRF 22
- NVIDIA NVENC H.265
However, before we can get that far you have to install FFmpeg. We've got complete instructions below.
Installing FFmpeg on Windows
1. Download FFmpeg
Go to the official FFmpeg download page and select a Windows build. FFmpeg itself distributes source code, and its official download page links to ready-made Windows builds such as the builds.
Download a current 64-bit Windows build in ZIP or 7z format.
2. Extract FFmpeg
Extract the downloaded archive.
For simplicity, move the extracted FFmpeg folder to:
C:\ffmpeg
You should then have something similar to:
C:\ffmpeg\bin\ffmpeg.exe
C:\ffmpeg\bin\ffprobe.exe
3. Add FFmpeg to the Windows PATH
This lets you run ffmpeg from any folder.
Press:
Windows Key
and search for:
environment variables
Choose:
Edit the system environment variables
Then:
Environment Variables → User variables → Path → Edit → New
Add:
C:\ffmpeg\bin
The Environment variable 'Ffmpeg' has been added successfully. Click OK until all windows are closed.
5. Check which H.265 encoders are available
Run:
ffmpeg -encoders | findstr /i "265 hevc qsv nvenc"
Depending on your FFmpeg build and hardware, you may see entries such as:
libx265
hevc_qsv
hevc_nvenc
Method 1 — Intel Quick Sync H.265
Use this method if your Intel CPU/GPU supports Intel Quick Sync Video.
Quick Sync Video (QSV) uses the setting -global_quality to set the video quality.
FFmpeg exposes global_quality for hevc_qsv; its QSV presets range from veryfast (51) through veryslow (1). A good general all purpose setting is -global_quality 22.
-global_quality 22
Basic command
ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i "input.mkv" -map 0:v:0 -map 0:a? -map 0:s? -c:v hevc_qsv -preset medium -global_quality 22 -c:a copy -c:s copy -map_chapters 0 -map_metadata 0 "output_h265_qsv.mkv"
For example:
ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i "My Movie.mkv" -map 0:v:0 -map 0:a? -map 0:s? -c:v hevc_qsv -preset medium -global_quality 22 -c:a copy -c:s copy -map_chapters 0 -map_metadata 0 "My Movie H265.mkv"
The important parts are:
-hwaccel qsv
uses Intel hardware acceleration for decoding where supported.
-c:v hevc_qsv
uses Intel Quick Sync to encode H.265.
-global_quality 22
sets the quality-controlled QSV encoding level.
-preset medium
provides a reasonable speed/quality balance.
-c:a copy
copies the audio without re-encoding.
-c:s copy
copies subtitles.
-map_chapters 0
-map_metadata 0
preserves chapters and container metadata.
Official FFmpeg Documentation: The official full FFmpeg documentation is available here: https://www.ffmpeg.org/documentation.html. If you are the type of personal who loves detail this is the place to go.
AV1: Speed direct to our FFmpeg Command Generator:
If you are a practical and time sensitive person then the best advice is to use our very handy online AV1: FFmpeg command generator tool.
H265: Speed direct to our FFmpeg Command Generator:
Yep, you don't like AV1. Then use our FREE H265: FFmpeg command generator tool instead and convert your files to H265 format.
Trust me if you use this once, you'll be hooked and won't go any where else.
Our tools are so simple to use, plus you help save the environment as no AI or AI data centres are used. How's that for a win-win!
Socials