Merge pull request #33 from cfajardo/psyke83-bufsize-fix
video: use a better vbv-bufsize & correct software bitrate calculation
This commit is contained in:
commit
de9136c61e
1 changed files with 2 additions and 2 deletions
|
|
@ -930,9 +930,9 @@ std::optional<session_t> make_session(const encoder_t &encoder, const config_t &
|
||||||
}
|
}
|
||||||
|
|
||||||
if(video_format[encoder_t::CBR]) {
|
if(video_format[encoder_t::CBR]) {
|
||||||
auto bitrate = config.bitrate * 1000;
|
auto bitrate = config.bitrate * (hardware ? 1000 : 800); // software bitrate overshoots by ~20%
|
||||||
ctx->rc_max_rate = bitrate;
|
ctx->rc_max_rate = bitrate;
|
||||||
ctx->rc_buffer_size = bitrate / config.framerate;
|
ctx->rc_buffer_size = bitrate / 10;
|
||||||
ctx->bit_rate = bitrate;
|
ctx->bit_rate = bitrate;
|
||||||
ctx->rc_min_rate = bitrate;
|
ctx->rc_min_rate = bitrate;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue