Today I tried to find out which difference in file size the preset slow makes compared to the preset ultrafast when encoding a video (if all other parameters are the same). I took a video with approximately 10 GB and encoded the first two minutes using the following command line:
"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i input.mkv -c:v libx265 -preset slow -crf 22 -c:a copy output.mkv
To encode only the first two minutes, I watched the console after I had issued that command, and hit Ctrl-C when FFMPEG had encoded the first two minutes.
Then output.mkv was about 70 MB in size.
When I replaced -preset slow by -preset ultrafast in the command line above and let it encode the first two minutes again, output.mkv was about 40 MB in size.
Now I am totally baffled. I must have seriously misunderstood something.
From the documentation (in the section about the preset) (omission mine):
A slower preset will provide better compression (compression is quality per filesize). [...] Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.
As I understand my command line and the documentation, I am using constant quality encoding, so slower presets should mean better compression, and that in turn should mean smaller file sizes. So why does the output file increase in size when I use a slower preset, given that the preset is the only parameter that changes?
Side note: I am aware that the citation above is from the FFMPEG H.264 documentation, while I am using the H.265 encoder. However, FFMPEG's documentation for the latter states that both encoders behave the same with respect to the preset.
EDIT
@harrymc has drawn my attention to this question, which I have to admit is the same as mine, and which I had missed during my research. However, the answer there -as long as it is- is not sufficient (at least to me), because it contradicts FFMPEG's documentation without giving an understandable (again, for me) explanation or explaining the errors in FFMPEG's documentation.
Therefore: My question is a duplicate (sorry, no intention), but the answer(s) to the other question didn't solve my problem.