DVD -- AVI (have looked at guides)

Discussion in 'DivX / XviD' started by steve7777, Oct 23, 2006.

  1. steve7777

    steve7777 Member

    Joined:
    Mar 11, 2005
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    16
    Hello all,

    It has been a long time since I've encoded a DVD to XviD and am seeking some assistance.

    Having a DVD on my HDD, I'd crack open Donlad Grafts "DGMPEGDec MPEG1/2 Decoder and Frame Server". This would produce a .d2v file if my memory is any good.

    They I'd write a script for AVISYNTH that would serve the frames into VirtualDub Mod. The sound was already demuxed with the above plug-in.

    Does that make sense? I also used IVTC to clean up the video when it was interlaced.

    I'm just wondering what is common practice these days, and what yeilds the best results (quality wise).

    Thanks,

    Steve
     
  2. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    Yes, it makes sense. I too use VirtualDubMod to make DVD -> AVI (so I can add any kind of audio I demux [ReJig to have AC3 delay =0!] or encode the decode WAV file (which has delay=0) to MP3/AC3 2 ch using other applications: HeadAC3he (the one I prefere because it can encoode WAV --> MP3 CBR) or FFMPEG GUI (the one I use only if HeadAC3he cannot encode the sound file, thing that happens only when HeadAC3he loads a stream demuxed from some AVIs.

    To make VirtaulDub read D2V files you have two choices:
    - transform the D2V file in a pseudo-AVI using the VFAPI reader codec;
    - install avisinth + writing a script file (loadD2V.AVS)

    MPEG2Dec3dg_mpeg2source("C:\your_movie_directory\Movie.d2v")
    ConvertToYUY2()

    (MPEG2Dec3dg.dll is an AviSynth plugin you've put in its \plugin directory, a little better than the standard DLL MPEG2Dec3.dll)

    After loading the D2V, load with the Stream___Stream List -> Add command the sound and use the filters described in ours guide.

    Just remember to use the batch mode to make the two runs necessary to make a Xvid Multipass AVI file.

    VirtualDub(Mod) also is able to call internal Xvid bitrate calculator, to create a perfect 700 MB AVI file.

    Just a caution: read the 16_9 DivX guide, but use the VirtualDub filter order explained in the 4_3 guide:
    1) [bold]Deinterlace[/bold] to de-interlace the video (or the AVI will be made of kay-frames only).
    2) [bold]Null Transform[/bold] to remove the black bars. The standard movie will become a XxY movie, where X = 720 - CropW - CropE, Y = 480/576 - CropN - CropS (NTSC/PAL)
    3) [bold]Resize[/bold], to have a slighyly smaller screen (about 600-640 x Y'). [X x Y --> X' x (X/X')*Y to keep aspect ratio]. To resize I use the Lanczos algorythm.

    Please note: this method is very good but is not immediate to learn. But once you have managed to make your first AVI file, you're done.
    I don't think it's 'common practice'. I think WinAVI is more common (but I never used it).
     
    Last edited: Oct 25, 2006
  3. steve7777

    steve7777 Member

    Joined:
    Mar 11, 2005
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    16
    Thanks, that's how I'll proceed. Looks like it gives you the most configuration options and really lets you customize the quality.

    Is XviD still the codec of choice, I tried h264 a a while ago (read: a long while ago) but it wasn't ready for prime time.

    Thoughts?
     
  4. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    There are some decent H.264 encoders now. For instance x264 is excellent. I just wouldn't recommend using it via Vdub. You can still use DGIndex and AVISynth though since the cli encoder accepts AVISynth scripts as input.

    Sounds like you pretty much had the right idea in your first post.
     
  5. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    celtic_d speaks of things on too much detail for me (why aren't you the moderator of this forum? If interested, PM me and I'll recommend you to the Afterdawn staff....)
     
  6. steve7777

    steve7777 Member

    Joined:
    Mar 11, 2005
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    16
    Alright, so I did my first encode and I'm not 100% satisfied. I configured XviD as per the following guide:

    http://www.short-media.com/review.php?r=267&p=1

    First, I ran DGIndex and using the "Forced Film" funciton in the Video --> Field Operation menu, it got rid of my interlacing issues (material in question was 99% Film according to DGIndex's preview function (F5))

    Then I created the following script for AviSynth:

    The material in question was anamorphic (2.35:1), so I cropped out the black bars (it suprised me that the top and bottom bars weren't the same size).

    After that, I pulled up VirtualDub Mod and did a 2 pass "Fast Recompress", 1200kbps target quality.

    Basically, the video looks good when it's at it's original size, but even then some blocking is apparent. When I crack it open fullscreen... it looks O.K, but I've seen better.

    Then I thought I could implement a filter in the AviSynth script above, but that would be an exercise in futility, because all I'd be doing is cleaning up the source video, and not the end result.

    So there you have it... I was thinking of putting the file through VirtualDub Mod with and AviSynth Script that would perform some sort of optimisations (of which I know nothing about), and use the "Direct Stream Copy" built in to Virtual Dub.


    Now I realise that my screen resolution is 1440x900, so I guess it's normal that the quality of the video degrades when you blow it up(I presume VLC and WMP don't have a very sophisticated resize filter)


    So what should I do?

    1- Off the bat use AviSynths "Lanczos4Resize" and resize it to, say 1216x512? The problem I see with this solution is that XviD would really be spreading the quality really thin using the same 1200kbps settings.

    2- Use FFDSHOW and let it do on the fly post-processing for all my XviDs? I don't see the point as I have the oppertunity to customize the various quality settings off the bat anyways.

    3- Other suggestions from gurus?

    I really appreciate all the help, maybe my expectations are too high? I know that XviD won't look as good as the original DVD but the blocking (especially in solid colors like shots of the sky, walls, etc.) is really annoying.

    P.S. I used a custom matrix in the XviD encoding: DideƩ's SixofNine Quantization Matrix

    It was recommended by the author of the guide mentionned above and this "Didee" character is also a Doom9.org forum member.

    Regards,

    Jimmy
     
    Last edited: Oct 30, 2006
  7. steve7777

    steve7777 Member

    Joined:
    Mar 11, 2005
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    16
  8. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    I proposed to do things simpler, and therefore I propose to do the 'crop' and 'resizing' stuffs using VirtualDub's filters (Resize for the Lanczos or Bicubic resizing and Null Transform for the cropping as explained in our guide) after having made it to load the VOB set (the D2V).

    I personally use AviSynth only to make VirtualDub open D2V files, but if celtic_d is right you'd better use the VFAPI reader codec, instead.

    I prepare the audio separately (using HeadAC3he of FFMPEG GUI) and then I add it with VirtualDubMod (the D2V file is only for the video part).
    Or you can aply very complicated guides, but I'll let you alone in this. You choose..
     
    Last edited: Nov 8, 2006
  9. steve7777

    steve7777 Member

    Joined:
    Mar 11, 2005
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the help, I'll try both out and see which I prefer
     

Share This Page