Quality of DVD rips vs compressed video

TimTim Southwest PA Icrontian
edited October 2004 in Internet & Media
I do a lot of digital video production work for my webshow, so I have seen what a lot of different bit rates look like on a computer.

I've seen the quality of DVD movies when I rent them.

And I've seen DVD ripped movies compressed to fit on a 700 MB CD.

And the quality of the DVD rips looks like it is far better than what the file size would permit.

Most of the DVD rips I've seen play with the Xvid and DivX Codecs.

What is it about these methods that allow such high quality video in a small file size?

Comments

  • ThraxThrax 🐌 Austin, TX Icrontian
    edited October 2004
    Various excerpts from my forthcoming DVD-> XViD tutorial
    What is XViD?:
    XViD is a video encoder/decoder (CoDec) that operates under the MPEG-4 Part 2/ISO #14496-2 standard. Using an advanced algorithm called Discrete Cosine Transformation (DCT), the movement and colours in a motion picture are encoded in mathematical representations then processed by XViD with an algorithm called quantization. When DCT is performed, 8 pixel by 8 pixel blocks of the image are mathematically isolated. CDT then groups four of these 8x8 pixel groupings into what's called a macroblock. The quantization process in XViD then converts the pixels in these macroblocks to frequencies, and those macroblocks which are now represented as frequencies correspond to detail. High frequencies equate to high detail, and low frequencies equate to low detail. Once the quantization process has been performed by XViD, it loads a Quantization Matrix which tells XViD what frequencies to throw away. This is compression. The XViD codec itself allows the use of custom quantization matrices to provide more or less detail. Amidst this quantization process, XViD is constantly analyzing three types of frames:

    1) I-Frame: Short for intra-frame, these are unique and individual frames like a still picture. These come in user-selectable intervals and the full information of these frames are encoded.
    2) P-Frame: Short for predicted-frames, the information encoded in these frames only contains the difference in the frames prior to this type. If there's an image static between two frames, save a light changing from blue to orange, only the light changing from blue to orange will be encoded.
    3) B-Frames: Short for bidirectional-frames, these frames reference the frame before and after it to conclude the best frame to reference, if not both of them, to get the best quality out of this frame.

    And when all is said and done, quantization complete, I/P/B-Frames analyzed and encoded, XViD encoding is complete

    There are additional ways of maintaining the quality, and these are:
    Adaptive Quantization:
    The first "Psychovisual" enhancement to the XViD codec. Adaptive quantization preys on the fact that the human eye is much less perceptive to encoding errors in very dark or very light fields than it is in high-detail fields. What adaptive quantization does is allow the XViD codec to apply different low-detail quantization values for different macroblocks which allows saved bits to be redistributed into the detail portions of the film.
    Quarter Pixel:
    Quarter Pixel, also known as Q-Pel from here on out, is a tricky option to use correctly. Q-Pel is a modification to the way XViD analyzes the movement in B-Frames and P-Frames. Typically XViD motion analysis judges motion detail by half pixels and mathematically expresses them with a single post-decimal integer (0.x) . Q-Pel, on the other hand, increases the mathematical motion vectors in I/B-Frames to two post-decimal integers (0.xx) for a more scrutinizing analysis of all the frames in your project. Q-pel does not increase quality in a direct sense, rather it allows finer mathematics to increase the compressability of your project. The catch with Q-Pel is that the amount of texture bits saved must be higher than the bits needed to analyze every frame with two post-decimal values.
    Global Motion Compensation:
    Global Motion Compensation (Henceforth known as GMC) attempts to combine all the mathematical expressions for macroblock motion into a single motion vector (Which is why it's called global motion compensation). If you have multiple macroblocks (Remember, a grouping of 4 8x8 blocks) moving in a similar direction, XViD would apply a motion vector to each of these blocks individually without GMC. But since they're all moving similarly, it would make sence that all of them have a common vector, thus alleviating wasted bits by using the same vector several times. Turn it on! The bits saved go to increasing quality.
    Quantization Type:
    You have three options here. MPEG sharpens the image, and is good for basic high-bitrate (>1000kbps) encodes, and H.263 softens the image which is better for medium-bitrate (800-1000kbps) encodes. The last option allows the entry of your own custom quantization matrix, which is recommended to maximize quality. The XViD installation gives you a variety of custom matrices in its start menu entry, feel free to extract them and try them in source range encodes. See which one is best for you. Generally there is no single "Best" matrix for encodes, because each source project is different. High-contrast videos can stand to use matrices that drop a lot of the deep black and sharp white frequencies in the DCT process, as the human eye can't perceive subtle shifts in very dark and very light shades. Low-contrast videos must use matrices that drop off much less detail so as to preserve the subtle differences between objects. And furthermore, the desired sharpness of the final product must also be considered. If I were to recommend one basic quantization matrix, MPEG would be it, as I like a cleaner, sharper picture. However, as decent as the H.263 and MPEG quantization matrices are, users in the Doom9 community have created their own excellent matrices.

    There are some other things, but my full guide will explain more. I'm still trying to find the motivation to complete it.
  • JimboraeJimborae Newbury, Berks, UK New
    edited October 2004
    Argh... Thrax stop teasing us & get it finished :)
  • ThraxThrax 🐌 Austin, TX Icrontian
    edited October 2004
    Basically, the DVD I was using explicitly for the tutorial was packed away when redid all the wood floors in our house.. And the short pause in the production process was just enough for all my motivation to slip away.

    It sits here on my hard drive, requiring many further hours of work. Perhaps this weekend when I am home from Uni, I will attend to its completion.
  • mmonninmmonnin Centreville, VA
    edited October 2004
    You arent British! Stop trying to suck up to Dan.;)
  • EMTEMT Seattle, WA Icrontian
    edited October 2004
    Just a little note, I think the proper name is XviD (vs Xvid or XViD)

    The guide looks very informative though!
Sign In or Register to comment.