VideoHelp Forum




+ Reply to Thread
Results 1 to 17 of 17
  1. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Hello,

    I would like to know if anyone has the formulas used to calculate the bitrate, video size, etc. for any videos.

    For example, in Gordian Knot you can enter the final file size to calculate the bitrate that will be used for that file so that it will fit onto 1 or more CD's.

    Now, I find that for general purpose uses, ie. DVD backups, this is fine. But, I'm using it to encode 1000+ music videos and want to use some kind of common/target "Bits/(Pixel*Frame)" (at least that's what it says near the bottom of the application) for these videos. Obviously, using the 1 DVD compressed to 1, 2, or 3 CD scenario doesn't work.

    So far I've been using the guessing game to enter file size numbers to achieve the target "Bits/(Pixel*Frame)".

    The formulas, or even a good calculator, would be great where I could just enter the length of the video, FPS, resolution, Bits/(Pixel*Frame), etc. and it would give me the final file size so I could simply enter that number into the box in Gordian Knot.

    Thanx for now,
    Cheers,
    ziggy1971
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    The formula is very simple

    Size = bitrate X running time.

    Resolution, framerates, etc. play not part in the calculation.

    If you are working with multiple files then you add up the combined running time and use that int he formula.

    There are plenty of bitrate calculators around. I like VideoCalc, as it is simple and small.
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Hello,

    An application like VideoCalc does the same thing as Gordian Knot. You enter your desired file size and it tells you what bitrate to use.

    I want to enter the bitrate I want to use and let the application determine how big the file gets. Just like MPEG-2 encoding, you enter the details of what bitrates to use for the encoding process and the application just creates the file.

    Maybe I didn't explain enough earlier, sorry. hopefully this helps,
    Cheers,
    ziggy1971 8)
    Quote Quote  
  4. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Read my blog here.
    Quote Quote  
  5. I want to enter the bitrate I want to use and let the application determine how big the file gets.
    Maybe you just didn't look closely enough in the main GKnot screen. The default setting is for you to fill in the file size and you then get the bitrate. However, by ticking the "Calculate Avi File Size" box instead, you can fill in the bitrate, and it gives you the file size.

    The Bits/(Pixel*Frame) figure doesn't mean a whole lot, and has next to nothing to do with the quality of the AVI since different movies compress differently. At best it's merely a guideline, and at worst it's completely misleading. A much better way to figure the resolution/filesize/quality is with the GKnot Compression Test.

    Other solutions might include doing one-pass quality based encodes using AutoGK, perhaps with the width filled in, or one-pass constant quant encodes manually in VDubMod. You can't do that in GKnot as it always does 2 passes for a given filesize or bitrate.
    Quote Quote  
  6. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    I want to enter the bitrate I want to use and let the application determine how big the file gets.
    Actually, I do that all the time with the VH Bitrate calculator. Go to the 'Advanced Mode' and enter the bitrate in the 'Calculated Bitrate' box and the 'Custom Size' will change.

    Quote Quote  
  7. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Hello all,

    Thanx for all the replies.

    Boy do I feel like a complete newbie idiot now.

    So much for following a tutorial to the tee. http://www.doom9.org/index.html?/xvid.htm

    I didn't even check some of the other options available because the tutorial didn't say so. Nooobs!!!

    Oh well, now I know.
    Thanx guys,
    Cheers,
    ziggy1971 8)
    Quote Quote  
  8. As Manono suggested, if you don't care exactly how big the files turn out use constant quality encoding (called Target Quantizer in Xvid). Pick the visual quality you want (the quantizer value) and encode in a single pass. The file comes out whatever size (bitrate) is necessary to maintain that quality. You always get the quality you want. You don't have to worry about frame rates, frame sizes, the nature of the video, etc.
    Quote Quote  
  9. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Hello,

    Could someone explain some of this to me?

    What is the purpose of multipass video encoding? I don't get it!!!

    If you can use the Quantizer to create a video with a certain level of quality, why would anyone want to encode a video 2 or more times? (ie. 1st pass, 2nd pass, etc.)

    I've heard of people using the Quantizer to encode a video once, then use an application such as GSpot to find the bitrate the codec used for encoding, then reencode the video in multipass mode with the bitrate values from GSpot. Wouldn't that encode the entire video with that constant bitrate, therefore making the final file size larger than necessary?

    To me it sounds like way more work than what is required. Or am I missing something here?

    Also, with the price of recordable DVD's these days, why not just create backups directly instead of compressing the heck out of a video and then trying to sqeeze every last bit of quality out of it? (By the way, here in Canada you can buy DVD-R's for about $0.30 each so I don't know how much they are in other countries.)

    Don't get me wrong as I'm trying to backup my music video collection, which for an average MPEG-2 video, takes up about 170MB of space and I have 1000+ videos and adding new ones almost every day. I think is worth the trouble, but for retail DVD's I just don't see the point.

    Anyway, thanx again guys,
    Cheers,
    ziggy1971
    Quote Quote  
  10. Originally Posted by ziggy1971
    What is the purpose of multipass video encoding? I don't get it!!!
    To get the best quality for a particular file size. For example, you want to put 90 minute movie on a 700 MB CD as an Xvid AVI file.

    Originally Posted by ziggy1971
    I've heard of people using the Quantizer to encode a video once, then use an application such as GSpot to find the bitrate the codec used for encoding, then reencode the video in multipass mode with the bitrate values from GSpot.
    There's no way of knowing what bitrate is required to achieve the quality you want. Every video is different. A 2 hour still frame will require very little bitrate. A 2 hour video full of noise and high action will require a lot of bitrate. Encoding the 2 hour still frame at 700 kbps will be a waste of bitrate. Encoding the 2 hour action video at 700 kbps will give a low quality result.

    People perform the constant quantizer encode first to determine what bitrate is needed to achieve the required quality. Then they perform a 2-pass VBR encode because that may get them slightly higher overall quality for the same file size (the encoder can be a little smarter about allocating bitrate throughout the video). This is especially true at lower qualities/bitrates. At higher qualities/bitrates the difference is minimal.

    Originally Posted by ziggy1971
    Also, with the price of recordable DVD's these days, why not just create backups directly instead of compressing the heck out of a video
    It's faseter to upload/download a 700MB Xvid file than a 9GB ISO image.
    Quote Quote  
  11. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Dual layer discs are still expensive compared to single layer discs in many countries, so compressing discs to fit is often necessary. When you encode, you have three basic choices

    1. Constant BitRate : guarantees file size and bitrate, but at lower bitrates can give poorer quality.

    2. Constant Quality : guarantees (within reason) a fixed quality, but no control over file size.

    3. Variable BitRate : guarantees best allocation of available bitrate based on data need. Single pass cannot guarantee file size. Multi=pass (two or more passes) will meet file size targets.

    If you are using full-d1 resolution and your bitrate is going to be under around 7800 kbps, then I believe that you are asking for poor quality if you use CBR encoding, unless you have static images or very little movement. VBR encoding means that static or low movement scenes get less data, as they need less, and high motion scenes get higher bitrates, as required. Using a two (or more) pass method means the bitrate allocation is refined, and the results will fit a target output size (i.e. will fit on your disc).
    Read my blog here.
    Quote Quote  
  12. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Hi guys,

    So let me get this straight. The general recommendation would be to do a "Compressibility Check" first and then try to match the resulting "Bits/(Pixel*Frame)" number.

    For example, if I do the "Compressibility Check" and get a resulting value of 0.685, I should increase the bitrate/filesize until the "Bits/(Pixel*Frame)" closely matches that number.

    I see that when I do the "Compressibility Check" first, then I get a "xx.x%" number before that resulting value. Does that mean that if I set it to be ~75% I should only expect a video with about 75% of the original video quality?

    I've seen some videos that are simply amazing in quality without the annoying interlace "artifacts" you get with MPEG-2 video on the computer screen and that's one of the main reasons why I want to convert to a different format and Xvid seems to do a very good to excellent job of removing those artifacts.

    So, for the "Field Operations", what is the recommended de-interlace method, or does that also depend on the quality of the source video? I read somewhere that when you select "Save & Encode", Gordian Knot automatically selects the best "recommended" de-interlace method. Is this true?

    Once again, many thanx goes out to the people of the forums that try to help out, you have no idea how much it is appreciated. Especially for some of us newbies!!!
    Cheers,
    ziggy1971 8)
    Quote Quote  
  13. So let me get this straight. The general recommendation would be to do a "Compressibility Check" first and then try to match the resulting "Bits/(Pixel*Frame)" number.
    No, do the Compress Test and then ignore the B/(P*F). Choose your resolution and file size based on the resulting percentage.
    Does that mean that if I set it to be ~75% I should only expect a video with about 75% of the original video quality?
    Hehe, you say that as if 75% is something to be avoided. 100% is quant 2. 75% is actually a very good result. The good percentages, the ones you should aim for, lie between about 65-80%. For older and grainier movies, you can go lower, sometimes as low as 50%. But in the end, you'll be the judge of what looks good to you, and what percentages to aim for.

    If the B/(P*F) for that 75% Compress Test result is .685, that means that particular movie is hard to compress, and had you followed the usual guideline of .20 or .27 or whatever, you would have wound up with a lousy looking movie.
    So, for the "Field Operations", what is the recommended de-interlace method, or does that also depend on the quality of the source video?
    It doesn't depend on the quality, but on the type of source material. Run the Preview in DGIndex. If it shows as Film, use Force Film to get a 23.976fps progressive video. If it says NTSC, then you have to do further examination. If it's telecined film, you set the field operation for Honor Pulldown Flags and IVTC. If it's pure interlace, set the field operation for Honor Pulldown Flags and deinterlace.
    I read somewhere that when you select "Save & Encode", Gordian Knot automatically selects the best "recommended" de-interlace method. Is this true?
    No, Gordian Knot doesn't select anything; you do. If this is still above your head, use AutoGK, which is probably what you were thinking of. It does an analysis of the video and selects the best way to treat the video.
    Quote Quote  
  14. Originally Posted by ziggy1971
    So let me get this straight. The general recommendation would be to do a "Compressibility Check" first and then try to...
    My recommendation is to do a single pass target quantizer encode with a quantizer of 3. Or for really critical matieral use a quantizer of 2. Then you're done.

    With a quantizer of 2 the output will be almost indistinguishable from the input even if you look at enlarged still frames. At 3 you will be able to see a little macroblocking if you look at enlarged still frames (and disable the playback deblocking feature of the Divx or Xvid codecs) but you won't notice them at normal playback speeds.

    Think of it like this:

    With single pass target quantizer encoding you pick the quality, the encoder picks the file size.

    With 2-pass variable bitrate encoding you pick the file size, the encoder picks the quality.
    Quote Quote  
  15. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Hey guys,

    Thanx again for the detailed information. It is explained very well and has taught me a lot about the different parts of encoding and what to look for.

    I'll do some more testing with the two different ways of encoding (Quatizer & Multipass) and see what kind of results I get. By the responses I've got from this, I get the impression that there are far more options than I initially anticipated.

    ...had you followed the usual guideline of .20 or .27 or whatever, you would have wound up with a lousy looking movie.
    Yes, manono, I was following those guidelines and getting less than impressive results and thanx to you guys in the forum, I am getting much better results now. Kudos to you guys, I can't thank you enough.

    Thanx again guys, if I have more questions I know where to come,
    Cheers,
    ziggy1971 8)
    Quote Quote  
  16. Originally Posted by redwudz
    I want to enter the bitrate I want to use and let the application determine how big the file gets.
    Actually, I do that all the time with the VH Bitrate calculator. Go to the 'Advanced Mode' and enter the bitrate in the 'Calculated Bitrate' box and the 'Custom Size' will change.

    The limitation of the VH calc and VideoCalc, is it doesn't allow you to specify maximum and minimum bitrates. What if I always want 9800kb max and 2000kb min? So I still have to guess at the average when using these calculators. Specifying different max and min bitrates affect the outcome too.

    The VH Calc doesn't allow you to specify to reserve an amount either for menus. Nor does it specify AC-3 or MP2 audio. I was under the impression the different audio standards have different overhead.

    Anyone ever use Fit2Disc by "Shh"? Comments seem good.
    Quote Quote  
  17. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    The VH calculator does allow for space to be reserved : third line down at the far right marked MB/DVD (25 MB Default)

    Maximum and minimum have absolutely nothing to do with bitrate calculation. There is only one bitrate. It is either THE bitrate if you are encoding CBR, or the average bitrate if you are encoding VBR. The minimum and maximum figures are arbitrary points around the average.

    Audio format makes no difference if the bitrates are the same.

    I don't understand what your problem is. There is no guessing involved. You are either fitting a running time to a space, or a quality level to a space. That's it. No guessing. You know how long the video (one or more) running time is, and how much space you need to squeeze it into.

    There is a reason most bitrate calculators are very simple beasts - because the basic rules are very simple.
    Read my blog here.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!