[RESOLVED] VBVChecker on X264/gpac files - problem understanding

Support forum for DGDecNV
Post Reply
DAE avatar
picturebuffer
Posts: 3
Joined: Thu Dec 06, 2012 5:01 am

[RESOLVED] VBVChecker on X264/gpac files - problem understanding

Post by picturebuffer »

Hello,

I recently used vbvchecker 1.7 in order to test x264 files that were created with ffmpeg commandline and muxed into mp4. My understanding of controlling the maximum bitrate and the results from vbvchecker do not match.

I used 1- and 2-pass cbr modes and set maximum profile/level vbv settings. As Inputfile I used a 40Mbits/s H264 file, so the encoder could always use the bitrate I requested. Then I checked with vbvchecker in order to see the real maximum bitrate of the file, since mediainfo or so does not take buffer settings into account.

I end up with this 23.976fps 1080p file:

Writing library : x264 core 118 r2085M 8a62835
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x3 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=72 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=0 / rc=2pass / mbtree=0 / bitrate=25000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=25000 / vbv_bufsize=25000 / nal_hrd=none / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00

And vbvchecker (after demuxing with mp4box) tells me with these vbvsettings and bitrate=0 search mode that the maximum is 26MBit/s.

Playing with rc-lookahead and ratetol I could get 23MBits/s as per vbvchecker, but never 25MBit/s as I expected.
What am I doing wrong? Or what am I missing?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: VBVChecker on X264/gpac files - problem understanding

Post by admin »

VBVChecker does not report any maximum bitrate, nor does such a value make any sense. So I cannot understand your issue. Would you be able to clarify it?

For any given stream there may be a range of bitrates that still satisfy the VBV model. Which one is reported by VBVChecker in its search mode is implementation dependent. I forget immediately whether it searches up or down but the actual value settled on will be close to but not necessarily exactly the "real" bitrate. Also, your initial buffer occupancy may not be set correctly, and that may affect the result as well.
DAE avatar
Nick007
Posts: 38
Joined: Wed Sep 29, 2010 12:20 pm

Re: VBVChecker on X264/gpac files - problem understanding

Post by Nick007 »

You can also check max bitrate in Bitrate Viewer:
http://www.winhoros.de/docs/bitrate-viewer/
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: VBVChecker on X264/gpac files - problem understanding

Post by admin »

The bitrate parameter to x264 does not specify a maximum bitrate, and the concept itself is dubious.

Yes, I know there is a "max bitrate" field in DGIndex. That is a misnomer. It reports the largest rate seen over a fixed time period. The value changes depending on the size of that time period.
DAE avatar
picturebuffer
Posts: 3
Joined: Thu Dec 06, 2012 5:01 am

Re: VBVChecker on X264/gpac files - problem understanding

Post by picturebuffer »

Thank you all for looking into this. I conclude that using vbvchecker to search for a maximum bitrate in a stream is of no help.

Initially I wanted to create a profile&level conforming bitstream that actually uses and reaches specified maximums. In my case I wanted to know if the specified level-limitation of 25MBit/s is matched (I redid the encode&test with correct settings: vbv-bufsize=31250000, vbv-maxrate=28125000, bitrate 25000000 ).
I was under the impression that this can be enforced by using vbv- and bitrate-settings in x264, so that max bitrate in fact can be limited by applying those. I mean per sliding window of a second and vbv information, shouldn`t it be possible to get a max value, that everybody agrees on?

Bitrateviewer in comparison tells me a different max bitrate as vbvchecker, but I thought that it would work more accurately since also interpreting vbv settings. But as I now understand vbvchecker should not be used for this? Assuring Annex C compliancy is solely guaranteed by relying on settings rather than looking at a"HRD" check?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: VBVChecker on X264/gpac files - problem understanding

Post by admin »

This might be a question better posed to the x264 developers.
DAE avatar
picturebuffer
Posts: 3
Joined: Thu Dec 06, 2012 5:01 am

Re: VBVChecker on X264/gpac files - problem understanding

Post by picturebuffer »

Okay thanks. For the interested audience, I continued here: http://forum.doom9.org/showthread.php?p ... ost1605427
Post Reply