Reduce video size with H.265 (HEVC)
H.265 (HEVC) compresses about 30 to 40% better than H.264 at equal quality: it's the ideal choice for archiving videos or freeing up disk space. The trade-off is that not every device can play it, and encoding is slower.
Updated on
An x265 CRF of 28 gives roughly the same quality as an x264 CRF of 23.
How to use it
- Install ffmpeg if you haven't already.
- Open a terminal in the folder containing your file.
- Copy the generated command, adjust the file names if needed, then run it.
- Open the resulting file to check the result.
When should you choose H.265 over H.264?
For archiving and storage: a video collection can lose a third of its size with no visible degradation. For sharing, stick with H.264, which plays everywhere. For 4K, the advantage of H.265 is even clearer.
Re-encode an entire folder
To process several files at once, use the folder script generator, which accepts the same settings.
Convert all the files in a folder
Frequently asked questions
Why the -tag:v hvc1 option?
It enables playback on iPhone, iPad, Mac and in QuickTime. Without it, ffmpeg tags the video "hev1", which Apple devices refuse to play.
Where does H.265 video not work?
Not all browsers support it, and some older software, TVs or players can't play it. WhatsApp, Discord or email work better with H.264: use the dedicated pages.
The resulting file is bigger than the original, why?
If the source is already heavily compressed (messaging-app video, low-quality download), re-encoding can't do any better. Try a higher CRF, or keep the original file.
How long does encoding take?
Expect 2 to 5 times as long as H.264 with the same preset. H.265 takes patience: run it on a batch of files overnight.