From 6b1030056e5a39241b5fe4f1cd475b29e13ab1d6 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 9 Jul 2024 14:44:50 +0200 Subject: [PATCH] Revert "vcomp/lavc libsvtav1: do not set pred_struct=1" This reverts commit fa8bb8ca8e20d013f5697c70d7909480d37831a2. Actually this worsened the behavior significantly by increasing the latency in the order of 100 frames (depending on properties). This (currently) disallows setting the bitrate, using CRF/CQP is only possible because the FFmpeg plugin isn't able to set CBR for now. --- src/video_compress/libavcodec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index d546e7531..83df22544 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1947,8 +1947,9 @@ 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 check_av_opt_set(codec_ctx->priv_data, "svtav1-params", - "fast-decode=1:tile-columns=2:tile-rows=2"); + "pred_struct=1:fast-decode=1:tile-columns=2:tile-rows=2"); #else // tile_columns and tile_rows are log2 values for (auto const &val : { "tile_columns", "tile_rows" }) {