VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Member
    Join Date
    Mar 2009
    Location
    Norway
    Search Comp PM
    Hello!

    I am trying to rip a DVD to xvid. But there's a problem with blocks/tiles in the image. It looks very much like this (sample image at 0%): http://www.image-restore.co.uk/Blog_Images/jpeg_compression.jpg but only when there is a lot of movement or rapid changes in light (like lightning and other flashes).

    When I increase the target bitrate from 1000 to 2- or 3000, the blocks almost disappear. But the file size increases rapidly when increasing bitrate.

    I have seen videos with bitrate of 1000, or even less, without blocks in the image.

    How to remove the blocks/tiles?

    Software I use:

    DVD Decrypter
    VirtualDubMod 1.5.10.2

    overtoast
    Quote Quote  
  2. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    I hope you're using DVD Decrypter to backup your own DVDs. Try to donwload some new matrixes at doom9.org or try to use some of the various matrixes that come along with the codec. I usually set my bitrate at 1,200 using a matrix of extra low bitrate. If you don't find the file at doom.org, I'll try to find the link for ya.
    Cheers,
    Mark
    Quote Quote  
  3. Member
    Join Date
    Mar 2009
    Location
    Norway
    Search Comp PM
    First of all: I am backing up my own DVDs. No more, no less.

    Thanks! Never heard of matrixes in the xvid codec. I will look into this and find out how they work.

    overtoast
    Quote Quote  
  4. is xvid required ? or have you considered other options (e.g h.264) ?

    another strategy is to use zones for encoding (i.e. those sequences with high bitrate peaks - e.g. action scenes, you can allocate more bitrate to, or those that you don't care about e.g. ending credits, you can lower )
    Quote Quote  
  5. What you are discovering is that some shots require more bitrate than others to keep from breaking up into macroblock artifacts. If you need a specific file size you should use 2-pass variable bitrate encoding. This will allocate more bitrate to shots that need it, less to shots that don't.

    If you don't need files of a particular size use Xvid in Single Pass Target Quantizer mode (constant quality) with a Quantizer from 2 to 4. The file will come out whatever size is required to maintain that quality. At 2 there will be almost no macroblocking, even if you look at enlarged still frames. The resulting files will be pretty large though. At 3 there will be a little macroblocking if you look at enlarged still frames but it won't be noticeable at normal playback speeds. This is a good compromise of image quality and file size. At 4 you'll get more macroblocking but smaller file sizes.

    Also, Xvid has built in deblocking and deringing filters you can enable for playback. This reduces the blocks a bit.
    Quote Quote  
  6. Member
    Join Date
    Mar 2009
    Location
    Norway
    Search Comp PM
    Thank you to all responses.

    I have been experimenting with the resolution and Single Pass Target Quantizer. Now the macroblocks are virtually gone, using quantizer 3.00 and a resolution at 70-80 % of the original. I'm happy with the quality/file size. And thanks to this thread I have learned a lot:

    - What matrixes are and how they work.
    - How to use the quantizer.
    - What the zone options does.
    - How to make good quality backups of my DVDs.

    Learning bits and pieces every day!

    Greetings from overtoast!
    Quote Quote  
  7. Quantization matrices is a big subject. If you really want to know how they work you will need to read up on Fourier analysis and the Discrete Cosine Transformation:

    http://mathworld.wolfram.com/FourierSeriesSquareWave.html
    http://en.wikipedia.org/wiki/Fourier_analysis
    http://en.wikipedia.org/wiki/Discrete_cosine_transform

    In short, the quantization matrix determines what details at what frequencies are retained in the compressed data. There are matrices for retaining lots of small details (and noise) but they require high bit rates, matrices for retaining less detail and require less bit rate. You can optimize the matrix for the particular video. For example, cartoons tend to have little detail but sharp edges. So there are matrices designed specifically for that. There are some alternate matrices in an archive in the Xvid folder.

    Of the two built in matrices in VirtualDub the h.263 matrix is less sharp but delivers more compression and less DCT ringing (little spots around sharp edges). The standard MPEG matrix is sharper but requires more bitrate and gives more ringing.

    The zone options in Xvid let you define different segments of the video and treat them differently. For example you could encode the first and last parts of the video (opening and closing credits) with a constant quantizer of 4 (less quality) and the body of the video with a quantizer of 3 (more quality).

    If you want to retain as much detail as possible from your DVD sources you can encode at the same resolution as the DVD and use the Xvid Pixel Aspect Ratio or Display Aspect Ratio settings to display with the proper aspect ratio at playback. Not all players support this so you should test your intended playback software/device. And keep in mind that your next player may behave differently.
    Quote Quote  
  8. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    No intention here to take away from some excellent posts by Jagabo, but as an added boost to deblocking look into the MSU Smart Deblocking filter - it's very, very good even on harsh sources. I use it on everything. What's amazing about it is that it deblocks without blurring. Nice.

    http://compression.ru/video/deblocking/smartdeblocking_en.html

    It's also free and works well with both VirtualDub and AviSynth and has excellent results with H.264, Xvid, DivX and MPEG-2 encoding.
    I hate VHS. I always did.
    Quote Quote  
  9. The only reason he got blocking was because (as near as I can tell) he used CBR encoding. Once he got away from that (by doing CQ encodes), the blocking went away. 2-pass VBR bitrate encoding would accomplish the same thing.
    Quote Quote  
  10. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    Fully in agreement - there is no substitute for a good encoding scheme. The MSU filter, although excellent and can increase compression rates further still (at least visually), is only really as a bonus to be used in synergy with proper encoding.
    I hate VHS. I always did.
    Quote Quote  
  11. A note for the OP: MSU Deblocking is for removing blocks from the source video. It won't help if you are creating blocks by over or improperly compressing the video.
    Quote Quote  



Similar Threads

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