Force QP mode when capturing with software encoder and attempting to use vbr

This commit is contained in:
dec05eba
2025-10-26 21:29:18 +01:00
parent 7d4a4068ff
commit e623145de8
3 changed files with 17 additions and 6 deletions

View File

@@ -1651,7 +1651,12 @@ static bool get_supported_video_codecs_with_cpu_fallback(gsr_egl *egl, args_pars
fprintf(stderr, "gsr warning: cpu encoding is used but video codec isn't set to h264. Forcing video codec to h264\n");
args_parser->video_codec = GSR_VIDEO_CODEC_H264;
}
args_parser->video_encoder = GSR_VIDEO_ENCODER_HW_CPU;
if(args_parser->video_encoder == GSR_VIDEO_ENCODER_HW_CPU && args_parser->bitrate_mode == GSR_BITRATE_MODE_VBR) {
fprintf(stderr, "gsr warning: bitrate mode has been forcefully set to qp because software encoding option doesn't support vbr option\n");
args_parser->bitrate_mode = GSR_BITRATE_MODE_QP;
}
return true;
}