Skip to content

Commit

Permalink
vcompress/lavc: suggest preset opt for libsvt_hevc
Browse files Browse the repository at this point in the history
in case of insufficient performance
  • Loading branch information
MartinPulec committed Apr 15, 2024
1 parent 4facf0e commit 0725294
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/video_compress/libavcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,11 +1176,18 @@ static void check_duration(struct state_video_compress_libav *s, time_ns_t dur_p
if (s->lavc_opts.find("delay") == s->lavc_opts.end()) {
hint = "\"delay=<frames>\" option to NVENC compression (2 suggested)";
}
} if (strcmp(s->codec_ctx->codec->name, "libaom-av1") == 0) {
} else if (strcmp(s->codec_ctx->codec->name, "libaom-av1") == 0) {
if (s->lavc_opts.find("cpu-used") == s->lavc_opts.end()) {
hint = "\"cpu-used=8\" option for quality/speed trade-off to AOM AV1 compression (values 0-8 allowed)";
quality_hurt = "quality";
}
} else if (strcmp(s->codec_ctx->codec->name, "libsvt_hevc") == 0) {
if (s->lavc_opts.find("preset") == s->lavc_opts.end()) {
hint =
"\"preset=12\" option for quality/speed trade-off "
"to libsvt_hevc compression (values 0-12 allowed)";
quality_hurt = "quality";
}
} else if ((s->codec_ctx->thread_type & FF_THREAD_SLICE) == 0 && (s->codec_ctx->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) != 0) {
hint = "\"threads=<n>FS\" option with small <n> or 0 (nr of logical cores) to compression";
} else if (s->codec_ctx->thread_count == 1 && (s->codec_ctx->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) != 0) {
Expand Down

0 comments on commit 0725294

Please sign in to comment.