1126 |
1126 |
if (t->t_props.tp_vbitrate < 64) {
|
1127 |
1127 |
// encode with specified quality and optimize for low latency
|
1128 |
1128 |
// valid values for quality are 1-63, smaller means better quality, use 15 as default
|
1129 |
|
av_dict_set_int(&opts, "crf", (t->t_props.tp_vbitrate == 0 ? 15 : t->t_props.tp_vbitrate), 0);
|
|
1129 |
char valuestr[3];
|
|
1130 |
snprintf(valuestr, sizeof (valuestr), "%d", t->t_props.tp_vbitrate == 0 ? 15 : t->t_props.tp_vbitrate);
|
|
1131 |
av_dict_set(&opts, "crf", valuestr, 0);
|
1130 |
1132 |
// bitrate setting is still required, as it's used as max rate in CQ mode
|
1131 |
1133 |
// and set to a very low value by default
|
1132 |
1134 |
octx->bit_rate = 25000000;
|
... | ... | |
1154 |
1156 |
if (t->t_props.tp_vbitrate < 64) {
|
1155 |
1157 |
// encode with specified quality and optimize for low latency
|
1156 |
1158 |
// valid values for quality are 1-51, smaller means better quality, use 15 as default
|
1157 |
|
av_dict_set_int(&opts, "crf", (t->t_props.tp_vbitrate == 0 ? 15 : MIN(51, t->t_props.tp_vbitrate)), 0);
|
|
1159 |
char valuestr[3];
|
|
1160 |
snprintf(valuestr, sizeof (valuestr), "%d", t->t_props.tp_vbitrate == 0 ? 15 : MIN(51, t->t_props.tp_vbitrate));
|
|
1161 |
av_dict_set(&opts, "crf", valuestr, 0);
|
1158 |
1162 |
// tune "zerolatency" removes as much encoder latency as possible
|
1159 |
1163 |
av_dict_set(&opts, "tune", "zerolatency", 0);
|
1160 |
1164 |
} else {
|
1161 |
|
-
|