From 73aa2570bc88e06f7b9c3e20eb8058eecb25f25f Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Fri, 10 Nov 2023 23:48:23 +0100 Subject: [PATCH] Use p1/ll and hq/p7 nvenc depending on situation. --- video/ffmpeg_encode.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/video/ffmpeg_encode.cpp b/video/ffmpeg_encode.cpp index eac2ba2d..23abc1d3 100644 --- a/video/ffmpeg_encode.cpp +++ b/video/ffmpeg_encode.cpp @@ -1025,8 +1025,15 @@ bool VideoEncoder::Impl::init_video_codec() if (options.low_latency) { av_dict_set_int(&opts, "zerolatency", 1, 0); - av_dict_set(&opts, "tune", "ull", 0); av_dict_set(&opts, "rc", "cbr", 0); + av_dict_set(&opts, "preset", "p1", 0); + av_dict_set(&opts, "tune", "ll", 0); + } + else + { + av_dict_set(&opts, "rc", "vbr", 0); + av_dict_set(&opts, "tune", "hq", 0); + av_dict_set(&opts, "preset", "p7", 0); } }