Browse Source

ffmpeg: fix "cqp" mode for libaom

change from global_quality to setting crf via priv_data, as
global_quality does not get respect. There is no cqp param in
ffmpeg 5.0.1
Chris 3 years ago
parent
commit
777a8f8c47
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/obs-ffmpeg/obs-ffmpeg-av1.c

+ 1 - 1
plugins/obs-ffmpeg/obs-ffmpeg-av1.c

@@ -105,7 +105,7 @@ static bool av1_update(struct av1_encoder *enc, obs_data_t *settings)
 
 	if (astrcmpi(rc, "cqp") == 0) {
 		bitrate = 0;
-		enc->ffve.context->global_quality = cqp;
+		av_opt_set_int(enc->ffve.context->priv_data, "crf", cqp, 0);
 
 		if (enc->svtav1) {
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 37, 100)