From fa8bb8ca8e20d013f5697c70d7909480d37831a2 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 2 Jul 2024 09:47:37 +0200 Subject: [PATCH] vcomp/lavc libsvtav1: do not set pred_struct=1 currently it causes following error: ``` Svt[error]: VBR Rate control is currently not supported for SVT_AV1_PRED_LOW_DELAY_B, use CBR mode ``` Setting the CBR mode is currently not possible with current FFmpeg patch - only possibility is to set rc_max_rate=bit_rate ([1] but this triggers another error: ``` Svt[error]: Instance 1: Max Bitrate only supported with CRF mode Svt[error]: CBR Rate control is currently not supported for SVT_AV1_PRED_RANDOM_ACCESS, use VBR mode ``` It is also not clear if the pred-struct set to SVT_AV1_PRED_LOW_DELAY_B has some impact in situation when UG does not use B frames. [1]: https://github.com/FFmpeg/FFmpeg/blob/5d54a25eea693daf389a7821c422f61ec6f42007/libavcodec/libsvtav1.c#L224 --- src/video_compress/libavcodec.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 0d09c83b9..310b28982 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1947,8 +1947,7 @@ static void configure_svt(AVCodecContext *codec_ctx, struct setparam_param *para check_av_opt_set(codec_ctx->priv_data, "preset", preset); #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(59, 21, 100) - //pred-struct=1 is low-latency mode - if (int ret = av_opt_set(codec_ctx->priv_data, "svtav1-params", "pred-struct=1:tile-columns=2:tile-rows=2", 0)) { + if (int ret = av_opt_set(codec_ctx->priv_data, "svtav1-params", "tile-columns=2:tile-rows=2", 0)) { print_libav_error(LOG_LEVEL_WARNING, MOD_NAME "Unable to set svtav1-params for SVT", ret); } #else