2
$\begingroup$

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)

$\endgroup$

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .