Skip to content

Commit cf20aea

Browse files
committed
vcomp/lavc: libsvtav1: old FFmpeg compat
default preset doesn't with some quite old FFmpeg (4.4.6, from MacPorts)
1 parent 38fb6f9 commit cf20aea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/video_compress/libavcodec.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,11 @@ get_default_crf(const char *codec_name)
146146
if (strstr(codec_name, "libx26") == codec_name) {
147147
return 22.0;
148148
}
149+
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 0, 0)
149150
if (strcmp(codec_name, "libsvtav1") == 0) {
150151
return 35.0; // 35 is libsvtav1 default
151152
}
153+
#endif
152154
return 0;
153155
}
154156

@@ -2116,6 +2118,7 @@ configure_svt_av1(AVCodecContext *codec_ctx, struct setparam_param *param) {
21162118
check_av_opt_set<int>(codec_ctx->priv_data, val, 2,
21172119
"tile dimensions for SVT AV1");
21182120
}
2121+
check_av_opt_set<int>(codec_ctx->priv_data, "rc", 1, "RC to CBR (1)");
21192122
#endif
21202123
}
21212124

0 commit comments

Comments
 (0)