Blender 2.79 added the ability to encode video using ffmpeg's CRF (constant rate factor) technique.

I assume this is controlled by the Output quality setting in the Encoding subpanel. Unfortunately, all my previous workflow has been using numbers for CRF (like 20 or 25 or 30) with ffmpeg in a makefile. It is not obvious which of the qualities in blender's UI maps to these values.

For each of the Output qualities, what is the corresponding CRF value? (Although I bet the lossless and CBR options don't correspond to CRF operation)

up vote 1 down vote accepted

These are defined in DNA_scene_types.h, in the eFFMpegCrf struct:

typedef enum eFFMpegCrf {
  FFM_CRF_NONE = -1,
  FFM_CRF_LOSSLESS = 0,
  FFM_CRF_PERC_LOSSLESS = 17,
  FFM_CRF_HIGH = 20,
  FFM_CRF_MEDIUM = 23,
  FFM_CRF_LOW = 26,
  FFM_CRF_VERYLOW = 29,
  FFM_CRF_LOWEST = 32,
} eFFMpegCrf;

We use a slightly wider than "subjectively sane range" according to the FFMpeg wiki.

A suggestion from a person on IRC led me to examine the encoded streams which conveniently contain a SEI NAL with the encoding options. Based on encoding streams with varying output qualities it seems

CRF
32   lowest
29   very low
26   low
23   medium
20   high
17   perceptually lossless

and the lossless option is a different mode with qp=0 which activates the lossless mode of H.264 (which probably uses a PCM mode according to what little I have read). I did not bother to study the CBR mode.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.