Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
15th November 2013, 12:32 | #1 | Link |
Registered User
Join Date: Sep 2013
Posts: 38
|
What is the exactly CBR in x264?
Today I read some material from Internet about rate control of x264 and I learned what is the ABR mode. When only the param --bitrate is set, ABR mode is used. But I am confused about the CBR mode.
At first I think when the params --vbv-maxrate and --vbv-bufsize are set together with --bitrate , the CBR mode is used. Then I see these codes from x264: Code:
s += sprintf( s, " rc=%s mbtree=%d", p->rc.i_rc_method == X264_RC_ABR ? ( p->rc.b_stat_read ? "2pass" : p->rc.i_vbv_max_bitrate == p->rc.i_bitrate ? "cbr" : "abr" ) : p->rc.i_rc_method == X264_RC_CRF ? "crf" : "cqp", p->rc.b_mb_tree ); |
16th November 2013, 23:04 | #2 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
|
If you just set --bitrate then the encoder will operate in unconstrained VBR.
If you set --vbv-maxrate and --vbv-bufsize to something basic like the H.264 High Profile @ Level 4.1 limitations, the encoder will still operate in ABR mode, but will constrain itself to not go outside these specifications. If you set --vbv-maxrate to the same value as --bitrate, then the encoder will operate in CBR mode. Note, this is not hard CBR where every picture is the same size. That's a terrible idea, and is basically never necessary. --vbv-bufsize controls the size of the buffer - which allows for bitrate variance while still staying inside the CBR limitations. Also note, this is how every other encoder does CBR, so don't be frightened
__________________
These are all my personal statements, not those of my employer :) |
17th November 2013, 11:39 | #3 | Link |
Registered User
Join Date: Sep 2013
Posts: 38
|
@Blue_MiSfit
In my experience, if --bitrate is set , the ABR mode is on. And the final real bitrate will be towards the target, which is the value set by --bitrate. However, when --vbv-maxrate and --vbv-bufsize are included, the value of --bitrate is no longer the target. The final real bitrate will exceeds the --bitrate a lot and will not greateer than --vbv-maxrate. |
17th November 2013, 11:52 | #4 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
|
|
18th November 2013, 07:12 | #6 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
If you really need to get closer to the target with ABR, you could use a lower --ratetol, such as 0.1. This will reduce quality though. |
|
Tags |
rate control, x264 |
|
|