<p>considering that in ffmpeg every +6 in crf means half the bitrate
and considering that hevc is 50% more efficient than avc
a crf of 23-24 will lead to visually-lossless compression in ffmpeg with libx265.</p>

CC BY-SA 4.0
2023-06-01T18:54:56.437Z
2023-06-01T18:54:56.437Z
basel Qt
<p>I am trying to shrink some videos from 1920x1080 to 1280x720 and to achieve a reasonable compromise between video quality and file size. I have decided to give FFMPEG's H.265 encoder a try, and now would like to know which CRF value I should use to get &quot;visually lossless&quot; results.</p>
<p>I know that this term may be misleading, but I have taken it from <a href="https://trac.ffmpeg.org/wiki/Encode/H.264" rel="nofollow noreferrer">FFMPEG's H.264 documentation</a>. In the section about the CRF value:</p>
<blockquote>
<p>Consider 17 or 18 to be visually lossless or nearly so; it should look the same or nearly the same as the input but it isn't technically lossless.</p>
</blockquote>
<p>Furthermore, in <a href="https://trac.ffmpeg.org/wiki/Encode/H.265" rel="nofollow noreferrer">FFMPEG's H.265 documentation</a>, in the section about the CRF value:</p>
<blockquote>
<p>The default is 28, and it should visually correspond to libx264 video at CRF 23, but result in about half the file size.</p>
</blockquote>
<p>So I have learned that a H.265 CRF 28 should produce roughly the same visual results as a H.264 CRF 23.</p>
<p><strong>Question:</strong></p>
<p>Does that mean that a H.265 CRF 22 should produce roughly the same visual results as a H.264 CRF 17?</p>
<p>In other words, is the following statement correct: If I encode a video with H.264 with a CRF of <code>N</code>, do I get the same visual result if I encode the same video with H.265 with a CRF of <code>N+5</code>, independent of <code>N</code>? Or does that formula only apply for <code>N=28</code> and <code>N=23</code>, respectively, since this is the example the FFMPEG H.265 documentation gives?</p>

CC BY-SA 4.0
2023-04-05T13:01:54.887Z
The suggestion provided by @Gyan is approx 21 here - https://video.stackexchange.com/questions/16664/what-crf-or-settings-i-should-choose-for-h265-in-order-to-achieve-a-similiar-qua
moi
<ffmpeg><video-quality><h.264><h.265>
In FFMPEG's H.265 encoder, which CRF value leads to "visually lossless" results?
Binarus
# In FFMPEG's H.265 encoder, which CRF value leads to "visually lossless" results?

(Asked by: username_0 on 2023-01-08)

I am trying to shrink some videos from 1920x1080 to 1280x720 and to achieve a reasonable compromise between video quality and file size. I have decided to give FFMPEG's H.265 encoder a try, and now would like to know which CRF value I should use to get "visually lossless" results.

I know that this term may be misleading, but I have taken it from [FFMPEG's H.264 documentation](https://trac.ffmpeg.org/wiki/Encode/H.264). In the section about the CRF value:

> Consider 17 or 18 to be visually lossless or nearly so; it should look the same or nearly the same as the input but it isn't technically lossless.

Furthermore, in [FFMPEG's H.265 documentation](https://trac.ffmpeg.org/wiki/Encode/H.265), in the section about the CRF value:

> The default is 28, and it should visually correspond to libx264 video at CRF 23, but result in about half the file size.

So I have learned that a H.265 CRF 28 should produce roughly the same visual results as a H.264 CRF 23.

**Question:**

Does that mean that a H.265 CRF 22 should produce roughly the same visual results as a H.264 CRF 17?

In other words, is the following statement correct: If I encode a video with H.264 with a CRF of `N`, do I get the same visual result if I encode the same video with H.265 with a CRF of `N+5`, independent of `N`? Or does that formula only apply for `N=28` and `N=23`, respectively, since this is the example the FFMPEG H.265 documentation gives?

**Tags:** ffmpeg, video-quality, h.264, h.265

> **Comments:**
> **username_1**: The suggestion provided by @Gyan is approx 21 here - https://video.stackexchange.com/questions/16664/what-crf-or-settings-i-should-choose-for-h265-in-order-to-achieve-a-similiar-qua  

---

## 1 answers

### Answer by username_2 on 2023-06-01. Score: 0

considering that in ffmpeg every +6 in crf means half the bitrate
and considering that hevc is 50% more efficient than avc
a crf of 23-24 will lead to visually-lossless compression in ffmpeg with libx265.


---

