码率控制
- 命令行码率控制选项:可以看到码率控制包括丢帧、resize、超分、码控模式、目标码率、目标上限下限(类似 x264、x265 中的 VBV)、码控偏置、GOP 码率等。
Rate Control Options:--drop-frame=<arg> Temporal resampling threshold (buf %)--resize-mode=<arg> Frame resize mode (0: off (default), 1: fixed, 2: random, 3: dynamic)--resize-denominator=<arg> Frame resize denominator--resize-kf-denominator=<arg>Frame resize keyframe denominator--superres-mode=<arg> Frame super-resolution mode (0: disabled (default), 1: fixed, 2: random, 3: qthresh, 4: auto)--superres-denominator=<arg>Frame super-resolution denominator--superres-kf-denominator=<arg>Frame super-resolution keyframe denominator--superres-qthresh=<arg> Frame super-resolution qindex threshold--superres-kf-qthresh=<arg> Frame super-resolution keyframe qindex threshold--end-usage=<arg> Rate control modevbr, cbr, cq, q--target-bitrate=<arg> Bitrate (kbps)--min-q=<arg> Minimum (best) quantizer--max-q=<arg> Maximum (worst) quantizer--undershoot-pct=<arg> Datarate undershoot (min) target (%)--overshoot-pct=<arg> Datarate overshoot (max) target (%)--buf-sz=<arg> Client buffer size (ms)--buf-initial-sz=<arg> Client initial buffer size (ms)--buf-optimal-sz=<arg> Client optimal buffer size (ms)--bias-pct=<arg> CBR/VBR bias (0=CBR, 100=VBR)--minsection-pct=<arg> GOP min bitrate (% of target)--maxsection-pct=<arg> GOP max bitrate (% of target)
- 命令行对应到 demo 中代码变量:
static const arg_def_t *const rc_args[] = {&g_av1_codec_arg_defs.dropframe_thresh,&g_av1_codec_arg_defs.resize_mode,&g_av1_codec_arg_defs.resize_denominator,&g_av1_codec_arg_defs.resize_kf_denominator,&g_av1_codec_arg_defs.superres_mode,&g_av1_codec_arg_defs.superres_denominator,