Log in

View Full Version : vbv max rate and final average bitrate


Atak_Snajpera
13th July 2010, 21:06
Quick question. Is this normal that despite --vbv-maxrate 25000 final average bitrate is 27283?
C:\>"D:\RipBot264\tools\avs2yuv\pipebuf.exe" "D:\RipBot264\tools\avs2yuv\avs2yuv.exe" "C:\Temp\RipBot264temp\job10\job10.avs" - : "D:\RipBot264\tools\x264\x264_x64.exe" --pass 2 --bitrate 28732 --stats "C:\Temp\RipBot264temp\job10\job10.stats" --fps 24000/1001 --min-keyint 24 --keyint 240 --frames 133294 --sar 1:1 --level 4.0 --aud --nal-hrd vbr --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --bframes 3 --b-adapt 1 --b-pyramid none --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh --stdin y4m --output "C:\Temp\RipBot264temp\video.264" - : 2

y4m [info]: 1920x1080p 1:1 @ 10000000/417083 fps (cfr)

x264 [warning]: max bitrate less than average bitrate, assuming CBR

x264 [info]: using SAR=1/1

x264 [warning]: VBV bitrate (28732) > level limit (25000)

x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT

x264 [warning]: target: 28732.00 kbit/s, expected: 27386.50 kbit/s, avg QP: 19.3056

x264 [info]: profile High, level 4.0
C:\Temp\RipBot264temp\job10\job10.avs: 1920x1080, 10000000/417083 fps, 133294 frames

x264 [info]: frame I:2239 Avg QP:14.21 size:221196

x264 [info]: frame P:88948 Avg QP:16.54 size:160510

x264 [info]: frame B:42107 Avg QP:17.85 size: 99456

x264 [info]: consecutive B-frames: 44.0% 37.9% 4.9% 13.2%

x264 [info]: mb I I16..4: 38.7% 56.4% 5.0%

x264 [info]: mb P I16..4: 18.4% 28.2% 2.9% P16..4: 15.7% 8.2% 1.8% 0.1% 0.1% skip:24.6%

x264 [info]: mb B I16..4: 7.7% 7.9% 1.1% B16..8: 26.5% 7.0% 1.8% direct:12.1% skip:35.9% L0:34.2% L1:25.3% BI:40.5%

x264 [info]: 8x8 transform intra:55.6% inter:53.8%

x264 [info]: coded y,uvDC,uvAC intra: 96.5% 96.1% 93.1% inter: 40.2% 42.3% 26.8%

x264 [info]: i16 v,h,dc,p: 7% 4% 68% 20%

x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 13% 36% 5% 6% 6% 6% 6% 7%

x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 16% 43% 5% 5% 4% 4% 4% 4%

x264 [info]: i8c dc,h,v,p: 71% 10% 12% 7%

x264 [info]: Weighted P-Frames: Y:0.7%

x264 [info]: ref P L0: 60.2% 12.9% 16.3% 10.5% 0.0%

x264 [info]: ref B L0: 85.3% 14.7%

x264 [info]: kb/s:27283.31



encoded 133294 frames, 3.75 fps, 27283.31 kb/s

Sharktooth
13th July 2010, 21:11
x264 [warning]: VBV bitrate (28732) > level limit (25000)...
due to "--bitrate 28732"..
if you specify a bitrate HIGHER than the VBV max-bitrate it's not x264's fault...

Atak_Snajpera
13th July 2010, 21:16
What would you say if x264 automatically reduced --bitrate to max rate value?

Sharktooth
13th July 2010, 21:17
dunno... you're assuming --bitrate is less inportant than --vbv-maxrate...

Atak_Snajpera
13th July 2010, 21:20
I think that max rate is more important because it is a part of AVC level. In this case max rate for HP4.0 is 25000. So final file will still be in correct range.

Sharktooth
13th July 2010, 21:25
but you asked x264 to produce a higher bitrate (28732kbps)...
i think x264 should respect the bitrate and never change what you set for no reasons.
a warning is there just to tell you that you forced x264 to reach a bitrate but constrained it to a lower one.

nurbs
13th July 2010, 21:33
Just because you put --level 4.0 in the command line doesn't mean your encode will be that level. You can still choose too high VBV, too many refs, too high resolution and/or framerate so it shouldn't be surprising that the same happens when you choose too high bitrate. You'll be warned though.

Atak_Snajpera
13th July 2010, 21:41
I know that level is just a label but --vbv-maxrate 25000 is something different. For me it means "Do not go above limit"

nurbs
13th July 2010, 21:45
Why did you set the bitrate higher than the maxrate in first place?
Also I guess your quote is missing a "not".

Atak_Snajpera
13th July 2010, 21:53
Also I guess your quote is missing a "not".
edited :)

Why did you set the bitrate higher than the maxrate in first place?
It was one of my users who did this. Nevertheless the question remains. Should max-rate automatically reduce bitrate? Personally I think yes but I won't be surprised if experts disagree with me. :)

Sharktooth
13th July 2010, 22:04
id say you could add some code in the GUI but x264 should not do that automatically.
users must know what they're doing.

Blue_MiSfit
14th July 2010, 02:50
Correct. One should not set VBV at all unless they know what they're doing. The situation you described can be explained by either

A) The user didn't know what he/she was doing
B) The user did know what he/she was doing, but typed in the wrong numbers

In this case, I also think the best solution is to have your GUI adjust the user's settings to make them sane.

Derek

Selur
17th July 2010, 12:40
agreed ... and if x264 would check this, it should abort (on violation) and not lower the bitrate specified by the user ...

popper
19th July 2010, 07:07
dunno... you're assuming --bitrate is less inportant than --vbv-maxrate...

it/--bitrate IS less important in the logical order of things, especially when your actually going to the trouble of setting a MaxVBV and VBV buffer size for streaming use on any restricted device/connection, even DS says so, "<Dark_Shikari> you should ALWAYS use max rate when streaming over a connection with limited bandwidth"

Sharktooth
19th July 2010, 14:50
uhm... that's not the case. maybe you should read the whole thread and pay attention to the commandline used to encode