H.265 (HEVC) compresses much better than H.264, but the errors you can hit during encoding are equally varied. This article walks through the most common ones and how to fix them.
Tested with ffmpeg 6.1
Error 1: libx265 not found
Error message
Unknown encoder 'libx265'
or
Encoder libx265 not found.
Cause
Your FFmpeg build doesn’t include libx265. Ubuntu’s default package and some minimal builds exclude it.
How to check
ffmpeg -buildconf | grep x265
If you see --enable-libx265, you’re good. If not, the codec isn’t in your build.
How to fix
Ubuntu/Debian — install a full build:
# Enable the universe repository
sudo add-apt-repository universe
sudo apt update && sudo apt install ffmpeg
If that still doesn’t work, use a static build:
# Static build (john van sickle)
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar -xf ffmpeg-release-amd64-static.tar.xz
macOS:
brew install ffmpeg
Use an alternative codec:
# NVENC (NVIDIA hardware encoding)
ffmpeg -i input.mp4 -c:v hevc_nvenc output.mp4
# VideoToolbox (macOS)
ffmpeg -i input.mp4 -c:v hevc_videotoolbox output.mp4
# QSV (Intel Quick Sync)
ffmpeg -i input.mp4 -c:v hevc_qsv output.mp4
Error 2: HEVC won’t play on iPhone or Apple devices
Symptom
An HEVC file produced by FFmpeg won’t play on iPhone or macOS, or the thumbnail doesn’t show up.
Cause
Apple devices expect the HEVC tag hvc1, but FFmpeg’s default output is hev1.
How to fix
Add -tag:v hvc1:
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -tag:v hvc1 output.mp4
Error 3: Profile or level issues
Error message
x265 [error]: Main10 supported only on 10-bit compilations
or
x265 [error]: Rate control is not possible with QP 0 and ABR 0
How to fix
Specify the profile explicitly:
# Main profile (8-bit, best compatibility)
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -profile:v main output.mp4
# Main10 profile (10-bit, for HDR)
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -profile:v main10 output.mp4
Common level settings:
# Specify an explicit level (improves device compatibility)
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -level:v 4.1 output.mp4
Error 4: File size is larger than expected
If H.265 produces a larger file than H.264, your CRF value is probably too low.
Recommended CRF values
| Use case | CRF | Notes |
|---|---|---|
| High-quality archive | 18–22 | Equivalent to H.264 CRF 18 |
| Balanced (recommended) | 24–28 | Equivalent to H.264 CRF 23 |
| Small-size priority | 30–34 | Slight quality loss |
# Balanced setup
ffmpeg -i input.mp4 -c:v libx265 -crf 26 -preset medium -c:a aac output.mp4
Error 5: Encoding is extremely slow
How to fix
Change preset to fast or faster:
ffmpeg -i input.mp4 -c:v libx265 -crf 26 -preset fast output.mp4
preset trade-offs (speed vs. quality):
ultrafast > superfast > veryfast > faster > fast > medium > slow > slower > veryslow
← faster, larger files slower, smaller files →
Error 6: x265 log spam makes it look frozen
How to fix
x265 writes progress logs to stderr. Suppress FFmpeg’s log with -v quiet and keep progress via -stats:
ffmpeg -v quiet -stats -i input.mp4 -c:v libx265 -crf 26 output.mp4
Baseline H.265 Encoding Commands
# Basic (quality-first)
ffmpeg -i input.mp4 -c:v libx265 -crf 26 -c:a aac output.mp4
# Apple compatibility
ffmpeg -i input.mp4 -c:v libx265 -crf 26 -tag:v hvc1 -c:a aac output.mp4
# Speed-first
ffmpeg -i input.mp4 -c:v libx265 -crf 26 -preset fast -c:a aac output.mp4
Frequently Asked Questions
Why does HEVC fail in browsers?
Most browsers still don’t decode HEVC due to licensing. Safari 11+ supports it, Chrome and Firefox don’t. For browser delivery, transcode to H.264 or AV1.
My HEVC plays in VLC but not in Premiere — why?
Premiere on Windows needs the paid HEVC extension from the Microsoft Store, or a recent CC version that includes Apple’s decoder. VLC ships its own HEVC decoder.
How do I quickly convert HEVC to H.264?
ffmpeg -i in.mp4 -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k out.mp4. CRF 23 keeps file size close to the HEVC original.
What is the difference between HEVC and H.265?
They are the same standard — H.265 is the ITU name and HEVC is the MPEG name. File extensions don’t change either.
Will I lose quality re-encoding HEVC to H.264?
A small amount — H.264 needs 30–50% more bitrate for the same visual quality. CRF 20 in H.264 typically matches CRF 23 HEVC.
Related Articles
- H.265/HEVC Encoding Commands in Detail
- Video Compression Tool (Browser-based)
- Common FFmpeg Errors and Fixes
Tested with ffmpeg 6.1.1 / Ubuntu 24.04 & macOS 14
Primary source: trac.ffmpeg.org/wiki/Encode/H.265