Skip to content

Commit

Permalink
vcomp/lavc: add cmdline doc for libsvtav1
Browse files Browse the repository at this point in the history
examples + remarks for svtav1-param option
  • Loading branch information
MartinPulec committed Jul 11, 2024
1 parent 52b9b38 commit 60befe0
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/video_compress/libavcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ void usage(bool full) {
col() << "\t" << SBOLD(get_codec_name(param.first)) << " - " << avail << "\n";

}
col() << "\nUse '" << SBOLD("-c libavcodec:encoder=<enc>:help") << "' to display encoder specific options, works on decoders as well (also use keyword \"encoder\").\n";
col() << "\nUse '" << SBOLD("-c lavc:enc=<enc>:help")
<< "' to display encoder specific options/examples; works\nfor "
"decoders as well (use the keyword \"enc[oder]\", anyways).\n";
col() << "\n";
col() << "Libavcodec version (linked): " << SBOLD(LIBAVCODEC_IDENT) << "\n";
const char *swscale = "no";
Expand Down Expand Up @@ -2113,6 +2115,24 @@ void show_encoder_help(string const &name) {
if (name == "hevc_qsv" || name == "h264_qsv") {
col() << "\n\t- " << SBOLD("rc") << " - [UltraGrid specific] rate control mode: " << SBOLD("cbr") << ", " << SBOLD("cqp") << ", " << SBOLD("icq") << ", " << SBOLD("qvbr") << " or " << SBOLD("vbr") << "\n";
}
if (name == "libsvtav1") {
color_printf("\nIf using " TBOLD("svtav1-params") ", the option "
"separator (':') must be replaced with '\\:'.\n"
"It is also recommended to consult its default value "
"(see UG output for the encoder).\n");
color_printf("\nExamples:\n");
color_printf(TBOLD("\tuv -c lavc:enc=libsvtav1")
"\n\t - use SVT AV1 with default RC CRF 35\n");
color_printf(TBOLD("\tuv -c lavc:enc=libsvtav1:crf=30")
"\n\t - use SVT AV1 with CRF=30\n");
color_printf(TBOLD("\tuv -c lavc:enc=libsvtav1:cqp=30")
"\n\t - use SVT AV1 with QP=30\n");
color_printf(TBOLD("\tuv -c lavc:enc=libsvtav1:crf=35:bitr=3M")
"\n\t - use SVT AV1 with QP=35 and Maximum Bitrate 3 Mbps\n");
color_printf(TBOLD("\tuv -c lavc:enc=libsvtav1:bitr=3M")
"\n\t - use SVT AV1 in VBR mode with 3 Mbps (not "
"recommended at the moment, increases latency)\n");
}
}

static void setparam_vp8_vp9(AVCodecContext *codec_ctx, struct setparam_param *param)
Expand Down

0 comments on commit 60befe0

Please sign in to comment.