Log in

View Full Version : Determining video bitrates - Latest Koepi


tanned55
23rd April 2006, 15:23
Hi,
I'm confused determining bitrates. I use Target Bitrate as I do not understand Target Quantizer.

The formula given from one source I've been using is:
H x W x (fps) x (0.1, 0.2, 0.3 etc for quality) /1024 or 1000 = target bitrate (kbps); that i type in at "target bitrate"

I've downloaded some links that stipulate a formula for the uncompressed video: fps x H x W x (yvy2@"16" or rgb@ "24")x seconds (lngth of video); which is the first step of a four step procedure.

The source of my original is DV-avi. Can someone provide basic detai for determining target bitrates? In advance, thanks for your time and support)

sysKin
23rd April 2006, 16:03
What are you trying to achieve?

Just use target filesize instead....

Your formula is completely nuts, someone was probably trying to say something completely different than you think.

foxyshadis
23rd April 2006, 16:20
The only perfect way to come up with a target bitrate is to do a fast full first pass quantizer encode at a desired quality (q2 for max, q4 for good, q10 or so for min unless you want really bad video), and use the average bitrate given that way for your second pass. Every formula is just trying to approximate doing that, and most do it very badly because videos can differ so much.

Bits per pixel isn't entirely worthless, but it fluxuates madly with resolution and framerate so it practically is unless all you do is dvd rips. Also, they mean output BPF, not input (unless you want a video with the same size as a lossless capture :p).

You can use the settings given in teeg's profiles (http://forum.doom9.org/showthread.php?t=107897) to enforce certain quality/speed levels too. Eventually using them should be as easy as selecting from a drop-down, but not yet.

tanned55
23rd April 2006, 19:10
Just use target filesize instead....

How do I do this? I use Virtualdub.. thanks

tanned55
23rd April 2006, 19:12
The only perfect way to come up with a target bitrate is to do a fast full first pass quantizer encode at a desired quality (q2 for max, q4 for good, q10 or so for min unless you want really bad video), and use the average bitrate given that way for your second pass. Every formula is just trying to approximate doing that, and most do it very badly because videos can differ so much.

Ok, how do I determine the average bitrate with this method? I use Virtualdub. Thanks

foxyshadis
23rd April 2006, 20:29
Load the video back into vdub and look at the info. Tada, average bitrate.

To use target filesize, just click on "target bitrate" when in second pass. (On single pass it'll take you to "quantizer" instead.)

tanned55
23rd April 2006, 21:01
Load the video back into vdub and look at the info. Tada, average bitrate.
To use target filesize, just click on "target bitrate" when in second pass. (On single pass it'll take you to "quantizer" instead.)
Ok, even though average bitrate's constantly more or less I choose an approximation of the given? I think I've got the gist.. :thanks:

During this 1st pass estimation is audio figured in the equation?

Since I'm doing DV-Avi encodes is 2 pass recommended? If I want to do single pass do I select target bitrate using the same method.. or do you recommend Quantizer? Thanks for your time and support; I'm almost there!

sysKin
24th April 2006, 00:03
The only perfect way to come up with a target bitrate is to do a fast full first pass quantizer encode at a desired quality (q2 for max, q4 for good, q10 or so for min unless you want really bad video), and use the average bitrate given that way for your second pass.

You could just encode at that target quantizer, and not only it would be faster (no dummy 1st pass), but quality will be better.

Don't forget that two-pass is trying to achieve constant quantizer, only it's not really good enough to do that reliably.

tanned55
24th April 2006, 04:40
You could just encode at that target quantizer, and not only it would be faster (no dummy 1st pass), but quality will be better.

Don't forget that two-pass is trying to achieve constant quantizer, only it's not really good enough to do that reliably.
Thanks much, I'm learning alot. I've never encoded using target quantizer but since posting here have come to learn that lower #s are better? What quantizer's good for DV-AVI (not the best video). If encoding/ripping an original dvd, what quantizer # is best quality? Thanks much for your time/support. :thanks:

sysKin
24th April 2006, 10:06
Thanks much, I'm learning alot. I've never encoded using target quantizer but since posting here have come to learn that lower #s are better? What quantizer's good for DV-AVI (not the best video). If encoding/ripping an original dvd, what quantizer # is best quality? Thanks much for your time/support. :thanks:
Best quality is quantizer 1. It's usually considered very unreasonable though, because it gives you much larger file than quantizer 2, while looking virtually the same.

Usual DVD rips aim for quantizers 3..4, because these still look good, with no obvious compression artifacts.

It all simply depends on how small you want the file to be. If it completely doesn't matter, use 2. If doesn't matter but must be reasonable, use 3 or maybe 4.

If you need specific filesize, use two-pass encoding with target filesize. This is how DVD rips are usually made, because they need to fill specific media (such as CD or quarter-DVD or something like that).

tanned55
24th April 2006, 14:54
Best quality is quantizer 1. It's usually considered very unreasonable though, because it gives you much larger file than quantizer 2, while looking virtually the same.

Usual DVD rips aim for quantizers 3..4, because these still look good, with no obvious compression artifacts.

It all simply depends on how small you want the file to be. If it completely doesn't matter, use 2. If doesn't matter but must be reasonable, use 3 or maybe 4.

If you need specific filesize, use two-pass encoding with target filesize. This is how DVD rips are usually made, because they need to fill specific media (such as CD or quarter-DVD or something like that).
I was doing a dummy 1-pass on a DV-AVI recording [target bitrate estimate (IMO, only acceptable quality)] and it was 6xxx+ kbps; is this normal? Others I've done were in the 3xxx kbps range.

You've raised an issue RE: 2-pass. 2-pass is basically for target filesize? Encoding at 1-pass/target quantizier or target bitrate will have same quality as 2-pass/target filesize? Thanks again for helping me. :thanks:

weaver4
24th April 2006, 16:28
You might want to use this BitRate Calcualtor to help you. You put in your resolution, frame rate, and select the quality you want and it will give you the bit-rate and file size that you should use. I use it with AutoGK and it give me great results.

http://forum.doom9.org/showthread.php?t=109307&highlight=calculator

Look at the bottom of the thread for the latest version (V3).

tanned55
24th April 2006, 20:53
You might want to use this BitRate Calcualtor to help you. You put in your resolution, frame rate, and select the quality you want and it will give you the bit-rate and file size that you should use. I use it with AutoGK and it give me great results.

http://forum.doom9.org/showthread.php?t=109307&highlight=calculator
Thank you for the URL. I've used the older version and find that with either version the bitrate does not change when additional minutes are added/subtratcted to the equation; only filesize increases/decreases.

I don't know if you've followed the whole link but another point about using this calculator is that the bitrate(s) are far lower than those acquired using Xvids Quantizer 2,3 .... or the 1st pass dummy file for average bitrate(s).

weaver4
25th April 2006, 00:42
Thank you for the URL. I've used the older version and find that with either version the bitrate does not change when additional minutes are added/subtracted to the equation; only filesize increases/decreases.

I don't know if you've followed the whole link but another point about using this calculator is that the bitrate(s) are far lower than those acquired using Xvids Quantizer 2,3 .... or the 1st pass dummy file for average bitrate(s).

The bitrate is kb/s (1000 bits/sec) and should not change with the length of the movie. To get a particular quality the bitrate should not change depending on the length (time) of the movie, but the size of the movie should change as the movie gets longer.

The filesizes are very, very close to the sizes that are calculated by avi.net and Fair Use Wizard so I feel very certain the calculation is correct. Secondly when you use a quantizer it is "generally" a single pass encode so to get good quality the bit rate must be much higher. My calculation are for a two pass DivX or XviD encode.