The 50% codec
H.265 (HEVC) is the successor to H.264 and gives roughly the same visual quality at ~50% of the bitrate. Apple adopted it for Photos, FaceTime, and as the default for iPhone video capture. Most modern devices can decode it. The catch: encoding is 2–10x slower than libx264 in CPU mode, and licensing pushed it out of browsers (Safari yes, Chrome only on hardware).
When to use it
Archival masters where storage matters, Apple-ecosystem distribution, 4K HDR content (Dolby Vision rides on top of HEVC). Avoid for web uploads where the audience is browser-mixed — H.264 still wins on universal compatibility, and YouTube re-encodes everything anyway.
CRF scale shifts
libx265 CRF is roughly 'libx264 CRF + 6 for the same perceptual quality'. So libx264 -crf 18 ≈ libx265 -crf 24. Don't carry over the CRF number from H.264 muscle memory.
The hvc1 tag
By default, libx265 writes the hev1 codec tag in MP4. QuickTime and Apple TV refuse to play hev1 (same bytes, different label) — you must add -tag:v hvc1 for Apple-friendly output.