PDA

View Full Version : CBR vs VBR max bitrate question


KronKyrios
7th May 2005, 07:03
I need to verify my understanding of CBR vs VBR encoding. I am in the understanding that the max birate in VBR cannot produce a better frame or GOP than a CBR bitrate of the same size.

In other words, if I use CBR at 8000K and encode the same video at VBR (n-pass) min 8000K, max 8000k, avg 8000k - the result will be identical, correct?

Or does the motion detection in VBR actually help improve distribution of quality within a particular frame or GOP compared to CBR at identical bitrates?

Kenneth

Mug Funky
7th May 2005, 07:20
hehe... the hardware encoder cards at work don't even do CBR exactly. when encoding 8.5 mbps CBR, bitrateview shows spikes up to 9.2 mbps. usually it doesn't matter though.

and yes, if min = average = max, then you have CBR on your hands. that's simple maths. i doubt there'd be any difference, but i haven't tested.

Encoder Master
7th May 2005, 13:00
I've tested it for a long time and there isn't a difference.

KronKyrios
7th May 2005, 18:34
Originally posted by Encoder Master
I've tested it for a long time and there isn't a difference.

Thank you... both of you.

I was trying to back up an argument I was making that the ONLY reason to use VBR is to save space. This does it.

Kenneth

Mug Funky
8th May 2005, 16:37
hmm.. wouldn't say the only reason.

in a bandwidth-limited situation (1x DVD reading), then it could be said that this is so.

but when max bitrate is not limited, if you did VBR and CBR to the same size, the VBR one would be far better.

likewise, if you're not maxing out the bitrate on a DVD (if your feature is longer than 80 mins or so), then VBR will win as opposed to CBR.

the bitrate needs to "breathe" so to speak. that is, complex scenes need more bits than flat, static scenes.

one could flip the argument and say that the ONLY use for CBR is when there's plenty of space but not bandwidth, like with multiangle encodings, or when there's too many audio tracks (like the 2 DTS, 2 5.1 and 4 2.0 tracks in the r1 GitS remaster).

KronKyrios
8th May 2005, 20:30
Originally posted by Mug Funky
hmm.. wouldn't say the only reason.
in a bandwidth-limited situation (1x DVD reading), then it could be said that this is so.
but when max bitrate is not limited, if you did VBR and CBR to the same size, the VBR one would be far better. same size?? Please clarify. I am not sure if you are referring to file size, average bitrate, max bitrate...?

If you do CBR to the max allowed by the standard format: 9200K (with AC-3 at 448K), then CBR and VBR should be the same quality because the VBR will not go above the 9200K in any case... true?

This is actually the settings I am using for the projects that spawned the thread. The 8000K example I gave was to get multiple answers in the same question.

It's true that 9200K CBR gives bigger files than max=9200K VBR, but that only makes my point.
likewise, if you're not maxing out the bitrate on a DVD (if your feature is longer than 80 mins or so), then VBR will win as opposed to CBR. Yes, this is true, but if you are concerned about a 4.7 or 8.5 Gig (DVD) limitation, then you are necessarily concerned about saving space. Therefore, my argument still stands.
the bitrate needs to "breathe" so to speak. that is, complex scenes need more bits than flat, static scenes.
Again, using less bits in any scene is a matter of saving space.
one could flip the argument and say that the ONLY use for CBR is when there's plenty of space but not bandwidth, like with multiangle encodings, or when there's too many audio tracks (like the 2 DTS, 2 5.1 and 4 2.0 tracks in the r1 GitS remaster).
This part I have not delved into. Doesn't the playback of a file only consider the streams being used at the time of playback to determine the bandwidth? Anyway, I don't know why there would be a difference between this kind of file and any other kind of file in considering CBR vs VBR encoding. Please elaborate.

Kenneth

mpucoder
8th May 2005, 21:14
One thing you might want to consider is how bitrate is measured. Maximum bitrate is for what period of time? If you think one frame, you are wrong. It is measured over the VBV delay period, which is variable in DVD useage. So in effect it is a short term average. This means in VBR a single picture can exceed the maximum bitrate (that is the bits to encode the picture divided by the display duration), wheareas in CBR it cannot. That gives VBR an advantage for high detail scenes.

CBR is not required for multi-angle, but with some encoders that is the only practical way to meet DVD tolerances.

Mug Funky
15th May 2005, 06:29
my point is that with no constraints, with two encodes of the same filesize (avg bitrate works in this case too, as they're two expressions of the same thing) the VBR one will always look better.

the fact that DVD has a maximum bitrate is what makes things complicated - basically it becomes a matter of finding a max bitrate that works for your equipment (both your encoder and playback equipment), and run with that.

for instance, at work if there's a feature that's going on a DVD-9 and is only 80 minutes with no extras but a clean opening and closing and some trailers, then it makes sense to go 1-pass CBR at max bitrate (8.5 mbps is what works best for us). however, if you were to put 300 mins on the same disc, it'd be stupid to do it at CBR 3.5 mbps (in this case it should really be a 2-disc set...), but you might get away with average 3.5 and max 8.5. clearly this would be better quality - though this example would break most mpeg-2 encoders...

i put it to you that the only reason to use CBR at all is when there's plenty of room on the disc. this isn't a luxury that comes up all that often though - especially with today's vain and pompous directors who insist on including everything they shot on the DVD...

[edit]

This part I have not delved into. Doesn't the playback of a file only consider the streams being used at the time of playback to determine the bandwidth? Anyway, I don't know why there would be a difference between this kind of file and any other kind of file in considering CBR vs VBR encoding. Please elaborate.

playback considers 1 video stream and all audio/subtitle streams combined. so a good way to determine theoretical max bitrate (not considering playback equipment and disc quality which will lower it slightly) is to take 9.8 and subtract all your audio and subtitle streams from it. but be prepared to go lower if you're not going to be using glass-mastered discs (hell, even they can give substantial read errors depending on who pressed them and how they were packed).

KronKyrios
15th May 2005, 20:31
Originally posted by mpucoder
One thing you might want to consider is how bitrate is measured. Maximum bitrate is for what period of time? If you think one frame, you are wrong. It is measured over the VBV delay period, which is variable in DVD useage. So in effect it is a short term average. This means in VBR a single picture can exceed the maximum bitrate (that is the bits to encode the picture divided by the display duration), wheareas in CBR it cannot.

I am not well versed in this area, but my reading tells me that *vbv_delay is a 16 bit unsigned integer representing the number of 90kHz clock periods between entering a picture's start code into the buffer and removing and decoding the entire picture.* This says that the vbv delay period is DIRECTLY related to one picture. It does appear to me, that in CBR, the vbv delay is constant.

For VBR, considering that there is an upper limit for the maximum vbv delay, I still don't see how any given picture can exceed the maximum bitrate allowed by the standard. If a single picture did exceed the maximum delay allowed by that parameter, then it would be considered a buffer overflow. That is, unless a variable audio bitrate is used, and the video uses some of the space left by the current sample(s) of audio which happens to be more greatly compressed. I did not find any information as to whether the vbv delay considers the audio stream.

Or, unless you are using an example that uses a max bitrate that is lower than 9200K. Then, I can also see where this may be possible, but then it would not address my argument as using anything less than the maximums is never necessary when space is not an issue.

KronKyrios
15th May 2005, 20:45
Originally posted by Mug Funky
my point is that with no constraints, with two encodes of the same filesize (avg bitrate works in this case too, as they're two expressions of the same thing) the VBR one will *always* look better.

I understand your statement and I agree with it. But, my argument hinges upon the notion that filesize is not considered. I don't care if a show spans five DVDs because I am really looking to the not-so-distant future, where 10+ Terabyte Hard Drives are commonplace, and removable media will likely include things like 200GB-1.6TB DVDs (http://brian.carnell.com/archives/years/2005/01/000036.html), MODS (http://www.freerepublic.com/focus/f-chat/1231799/posts), or something better.

the fact that DVD has a maximum bitrate is what makes things complicated - basically it becomes a matter of finding a max bitrate that works for your equipment (both your encoder and playback equipment), and run with that.

I chose to use the MPEG-2 format because my content was originally designed for TV usage. I do not ever plan on playing it in a standalone DVD player for my personal use (I don't even own one). But when I make copies for other people, they may find the need to do so. In that case, it is best that the files are compliant with DVD-standards so all they have to do is author it and burn the files to Disc.

Frankly, I am strongly considering keeping everything backed up in a lossless format, and then possibly even storing them uncompressed when the technology allows for it. The only reason I even want to make these videos DVD compliant is for distribution.

...but you might get away with average 3.5 and max 8.5. clearly this would be better quality - though this example would break most mpeg-2 encoders...

Break the encoder???

playback considers 1 video stream and all audio/subtitle streams combined. so a good way to determine theoretical max bitrate (not considering playback equipment and disc quality which will lower it slightly) is to take 9.8 and subtract all your audio and subtitle streams from it. but be prepared to go lower if you're not going to be using glass-mastered discs (hell, even they can give substantial read errors depending on who pressed them and how they were packed).

Thanks for the info. This poses another problem. I was working under the knowledge that all DVD players are required to decode at 9800K indefinitely. I had not considered the problems associated with the media itself. Since my distribution is very small (less than 30) it does not make sense to invest in anything more than standard DVD+/-R's.

Kenneth

kolak
25th May 2005, 12:02
In other words, if I use CBR at 8000K and encode the same video at VBR (n-pass) min 8000K, max 8000k, avg 8000k - the result will be identical, correct?

You can find information in CCE manual that it's not the same
Read manual for CCE.

KronKyrios
29th May 2005, 17:14
Originally posted by kolak
You can find information in CCE manual that it's not the same
Read manual for CCE.

I don't want this thread to die on this post.

I don't mean to be impolite, but that is not much of a response. It does not clarify any kind of retort. Is the CCE manual authoritative on this matter? Where can I find the CCE manual? What page(s) am I looking for? Maybe you could quote the manual, and give some kind of interpretation to your reading.

Kenneth

kolak
30th May 2005, 19:20
If you have short clips use 8.5 Mbit CBR (or less if audio+video+subtitles bitrate is higher then 9.8Mbit).
If you have full lenth movie use VBR and calculate correct average bitrate and max bitrate set as 9.8 - (audio tracks bitrate+subtitles tracks bitrate)- 0,4Mbit for overhead).
If you do this for PC players especially with old dvd-roms then use lower max. bitrate. Don't go above 8,5Mbit for all streams.

CCE 2.67 manual pages from 73. This manual was accessible with CCE 2.67 trial version, but there is new version of CCE, now and manual is different.

CinemaCraft is the one of the best company which makes Mpeg encoders and they could be called as authority.

BTW... if you're looking information about DVD-Video specification go there:
http://www.dvddemystified.com/dvdfaq.html