Convert video to and from HEVC
Converting your videos to HEVC frees up space; converting HEVC to H.264 makes it play on older devices. Both are free with HandBrake or FFmpeg.
Key points
- HandBrake (free, graphical) and FFmpeg (command line) convert to and from HEVC on Windows, Mac and Linux.
- With x265, CRF 20-24 and preset "slow" is a good starting point for archiving; CRF 28 is the default.
- Remuxing MKV to MP4 or changing
hev1tohvc1needs no re-encode:-c copy. - GPU encoders (NVENC, Quick Sync, VideoToolbox, AMF) are far faster, with slightly lower quality per megabyte.
With HandBrake, step by step
- Download HandBrakeFrom handbrake.fr (never from other sites).
- Open the videoDrag it into the window or use "Open Source".
- Pick a presetFor example "H.265 MKV 1080p30" or "H.265 Apple VideoToolbox 2160p 4K" on Mac. To go to H.264, "Fast 1080p30".
- Set the qualityVideo tab: encoder "H.265 10-bit (x265)", constant quality RF 22, preset "slow".
- Check audio and subtitlesIf audio is already AAC, AC-3 or E-AC-3, choose "Passthru" to copy it losslessly.
- Click "Start"1080p with x265 slow runs at a few frames per second on a typical PC; on the GPU, hundreds.
With FFmpeg: the most useful commands
# To 10-bit HEVC with x265 (high quality, audio copied)
ffmpeg -i input.mp4 -c:v libx265 -preset slow -crf 22 -pix_fmt yuv420p10le -tag:v hvc1 -c:a copy output.mp4
# To HEVC on the GPU (NVIDIA / Intel / AMD / Mac)
ffmpeg -i input.mp4 -c:v hevc_nvenc -preset p6 -cq 24 -c:a copy output.mp4
ffmpeg -i input.mp4 -c:v hevc_qsv -global_quality 24 -c:a copy output.mp4
ffmpeg -i input.mp4 -c:v hevc_amf -quality quality -qp_i 22 -qp_p 24 -c:a copy output.mp4
ffmpeg -i input.mp4 -c:v hevc_videotoolbox -q:v 60 -tag:v hvc1 -c:a copy output.mp4
# HEVC to H.264 for an older device
ffmpeg -i input.mkv -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -c:a aac -b:a 192k output.mp4
# Change container without re-encoding (MKV → MP4 for iPhone or QuickTime)
ffmpeg -i input.mkv -map 0:v -map 0:a -c copy -tag:v hvc1 output.mp4
CRF sets constant quality: file size varies with the scene. Every 6 CRF points roughly doubles or halves the size. The preset trades time for efficiency: "slow" takes about twice as long as "medium" and saves around 5-10 % more.
How much you save moving from H.264 (H.264 = 100)
Recommended settings
| Use | Encoder | Setting |
|---|---|---|
| Archiving films or family videos | x265 10-bit | CRF 20-22, preset slow |
| Plex/Jellyfin library | x265 10-bit | CRF 22-24, preset medium or slow |
| Shrinking phone videos | x265 or GPU | CRF 24-26 / CQ 26 |
| Recording or streaming games | NVENC / AMF / QSV | Constant bitrate per platform |
| For an old TV or car | x264 | CRF 20, High profile, level 4.1 |
Good practice
- Always convert from the original.
- Use 10-bit even with 8-bit sources: less banding.
- Test one minute before converting a whole film.
Avoid
- Re-encoding a file that is already HEVC.
- "Online" converters for private videos.
- Deleting the original before checking the result.
Frequently asked questions
What CRF should I use with x265?
The default is 28, which looks similar to CRF 23 in x264. For high-quality archiving, 20 to 24. Lower means more quality and bigger files.
Do I lose quality when converting?
Yes, every lossy re-encode discards information. Always convert from the best original and keep it if you can. Changing only the container (MKV to MP4) with FFmpeg "-c copy" loses nothing.
Is GPU encoding better?
NVENC, Quick Sync or VideoToolbox encode ten times faster but give slightly lower quality than software x265 at the same size. For streaming or quick tests, GPU; for archiving, x265 preset slow.