

Set SEI to include (default identifier+timing+recovery_point) Entropy coder type (from 0 to 1) (default cabac) Set encode quality (trades off against speed, higher is faster) (from -1 to INT_MAX) (default -1) This would allow both the regular crf option in autoProcess as well as crf-profiles to work with VAAPI Then when producing the ffmpeg command line I would instead set -qp and optionally still include maxrate and bufsize, though not sure if these have any impact on vaapi specifically Remove bitrate if qp is present and within bounds since the normal crf behavior is to do this anyway. Intercept any crf option at the parse phase for VAAPI codecs and redirect that option to qp. It can always be set to 25 in crf-profiles (quality-profiles?) by the user.ĭef _codec_specific_parse_options(self, safe, stream=0):ĭef _codec_specific_produce_ffmpeg_list(self, safe, stream=0):

I understand that CRF and QP is not exactly the same, but it's the best approximation and since QP is used with a default of 25 I think it's no loss to set it externally. Then for x265 -crf ** could be passed and for hevc_vaapi -qp ** "quality" and "quality-profiles" instead. I wonder if it's possible to make the "crf" / "crf-profiles" option more general, e.g.

The documentation says default is 0, but the actual ffmpeg logging says it is 25, which is much more reasonable, so I think the documentation is wrong there. Constant QP (for P-frames scaled by qfactor/qoffset for I/B) (from 0 to 52) (default 0). The corresponding parameter seems to be -qp E.V. Include HDR metadata for mastering display colour volume and content light level information Set level (general_level_idc) (from -99 to 255) (default -99) Set tier (general_tier_flag) (from 0 to 1) (default main) Set profile (general_profile_idc) (from -99 to 255) (default -99) Constant QP (for P-frames scaled by qfactor/qoffset for I/B) (from 0 to 52) (default 0) Quality-defined variable-bitrateĪVBR 6 E.V. Choose mode automatically based on other parameters Set rate control mode (from 0 to 6) (default auto)Īuto 0 E.V. Maximum B-frame reference depth (from 1 to INT_MAX) (default 1) Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0) Use low-power encoding mode (only available on some platforms may not support all encoding features) (default false)
