1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The True Way to convert DVD into DivX

Discussion in 'DivX / XviD' started by happyuser, Jun 14, 2004.

  1. happyuser

    happyuser Guest

    Why do we not cover some of the experiences in DivX creation and DVD-to-DivX conversion, for example, there is one topic about DivX that I had never seen anyone mentions. If you convert like more than 200 DVDs into mpeg4 ( DivX ), you will know what I am talking about.
    Let me hear from you first.
    But I will start first by sharing my experiences:
    1. Use Ecuador's AVI bitrate Calculater to calculate bitrate.
    2. Use DoItFast4U to prepare and encode extras on your DVD: you can encode the whole DVD into DivX. VirtualDub, lame, AC3Dec, and a list of other software needs to be used in this case.
    3. Split the movie before encoding: use Ecuador's bitrate calculator to calculate bitrate for one CD, for example, 680mb, 192kbps, at bitrate of 1500kbps for video, we should have a length of 0:55:53. Encoding this way we do not have to split one large file after encoding.
    4. There is always a 20-40 milisecond delay after the DivX.avi being encoded. This is depends on how high a bitrate we choose. A 20 ms delay should be applied to a 720x416 ( 16x9 ) movie while up to 40 ms delay can be applied to a 640x480 ( 4x3 ) piece of Divx.avi of bitrate of 1600 kbps or higher. This is to compensate for the slowness of the whole computer system and video card performances.
    5. Last but not least, know how to resize and crop the 16x9 movie; even the 4x3 movie needs resize and crop too, especially if these pieces are from within the Extras part of the DVD. Use FlaskMpeg to find out how much to resize and use VirtualDub to find out how to crop, then use AviSynth AVS resize and crop features as well as IVTC or SmoothDeinterlacer features, and then use fast-Recompress in VirtualDub.
     
  2. happyuser

    happyuser Guest

    The guide at
    http://www.afterdawn.com/guides/archive/dvd2divx_anamorphic.cfm
    this is a good guide, but needs to be notified on some important issue:
    1. Software used have to be correct:
    VirtualDub: stick with version 1.5.1 of virtualDub.
    a. CDEx: use CDEx 15.1.
    b. Use Ecuador's Bitrate Calculator instead of DVTools.
    c. Use MPEG2Dec3dg.dll and DVD2AVIdg.exe that included in the decodefix100.zip that you can download from anywhere now. Do not use VFAPICodec anymore.
    d. Decode and encode audio at 48 kHz not at 44.1 kHz.
    e. Do not use FieldDeinterlacer. Use SmoothDeinterlacer.dll instead.
    f. When Resize, remember that both axes( lenght and width) have to be a multiple of 16, use FlaskMpeg for this checking.
    g. For the main movie, use CDEx, but for Extras on the DVD, just use the mp3 encoding function that integrated in VirtualDub: remember to install newest lame_enc.dll: lame3.95.1.zip is the new one at the current.
    h. Encode the Extras on the DVD first before encoding the movie: you may want to get some files.bmp for chapters and main menu and Special Features out of the VTS_01_0.VOB if VTS_01 is your main movie.

    2. Do a research on the use of DVD2AVI in the aspect of treating FILM, pure interlaced NTSC, hybrid. For example, if indicator shows:
    a. FILM or 95% or higher FILM: use forced film and encode at 23.976 progressive.
    b. less than 94% film: no forced film and use IVTC in Avisynth:
    LoadPlugin("decomb.dll")
    AVISource("film.avi")
    Telecide()
    Decimate(cycle=5)
    c. 50% or so FILM and 50% or so pure interlace ntsc: no force film and use hybrid treatment in Avisynth:
    LoadPlugin("decomb.dll")
    AVISource("hybrid.avi")
    Telecide(guide=1,gthresh=30)
    Decimate(mode=3,threshold=2.0)
    d. Pure Interlaced NTSC: no forced film and use SmoothDeinterlacer in Avisynth as follows:
    LoadPlugin("d:\dvdtools\SmoothDeinterlacer.dll")
    ConvertToYUY2(interlaced=true)
    SmoothDeinterlace(lacethresh=5,edgethresh=20,staticthresh=0)
    3. Use FlaskMpeg to find out how to resize, and then use VirtualDub to find out how much to crop, and then use AviSynth AVS to resize and crop. Also use AviSynth to do all the above IVTC and SmoothDeinterlacer and then use Fast-Recompress in VirtualDub.





     
  3. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    I'm not any kind of expert on Divx since I've only played with it, but as far as your comments on AviSynth I mostly agree, but I'd make a couple of suggestions to make things a little easier/faster. Donald Graft has updated DVD2AVIdg/MPEG2DEC3dg and the newer versions are a little faster. I think the latest is 1.3, but I'm not positive since the app I use it with doesn't work with anything higher than 1.1. Also, I recommend using AVSEdit (from the AviSynth download page) to edit scripts with. It has a simple built in editor that allows you to crop interactively without opening another app. You change the borders and it adds it to the script. That, and other features, have cut down the time it takes me to write scripts significantly.

    As for the guide, I can understand why it uses VFAPI because a lot of people (most?) are intimidated by AviSynth. I personally think it's more perception than reality, but I also find it a lot easier to use than any NLE I've ever tried, so that may just be me.
     
  4. bergj69

    bergj69 Member

    Joined:
    Jun 15, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    11
    I've tried working with the easiest solution ever: DrDivX: just pop in the DVD, define quality settings and click, it converts the DVD into DivX. However, during calculations so far the programm crashes once it is at approx. 80%. I've seen complicated procedures described all over the net, all I am looking for is a Dr. DivX alike programm that doesn't crash. Who can help me out? (I want to DivX the DVD's a bought at an interesting rate in China but with Chinese, Thai, Korean and Japanese subtitles only. The DivX file that I can get from these DVD's are quite easily fitted with a subtitle from my native tongue (Dutch) with the aid of SubSync).
     
  5. bergj69

    bergj69 Member

    Joined:
    Jun 15, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    11
    Whoops, double posting...
     
    Last edited: Jun 17, 2004
  6. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    Happyuser mentioned not to use VFAPICodec anymore, does that mean i shouldn't install it? cuz my virtual dub doens't let me edit the output avi files when i haven't installed my VFAPIcodec yet. Someone help?
     
  7. shiroh

    shiroh Guest

    we should make a new thread to support avisynth, though thats what the official site is for. and take down the old guides that still using VFAPI.
     
  8. happyuser

    happyuser Guest

    You have to download and install AviSynth_2.5.4.exe. Example:
    c:\dvdtools\AviSynth 2.5
    c:\dvdtools\AviSynth 2.5\plugins
    Notice the \plugins directory above.
    Now, go and download the decodefix100.zip and unzip this. Within this file, you only need these two files: MPEG2Dec3dg.dll and DVD2AVIdg.exe. Copy the MPEG2Dec3dg.dll into the plugins directory above. It is better to keep the decodefix100 after you had unzipped the decodefix100.zip, for example, my directory structure would be:
    c:\dvdtools\decodefix100
    within this decodefix100, make a shortcut to the DVD2AVIdg.exe file and cut and paste this shortcut into the desktop, and now you can use this DVD2AVIdg.exe instead of the old DVD2AVI.
    Search and download the followings: undot_25_dll_20030118.zip smoothdeinterlacer_25_dll_20030218.zip and unzip them. After that copy the SmoothDeinterlacer.dll and UnDot.dll into the c:\dvdtools\AviSynth 2.5\plugins
    You also need this file: decomb410b4[1].zip. Unzip them and copy the two files: the Decomb.dll and DecombHelp.html into the c:\dvdtools\. Also copy Decomb.dll to the c:\dvdtools\AviSynth 2.5\plugins. The purpose of this plugins directory is that everything you put in it should be files that end with .dll, and these files.dll will be autoleaded: you do not have to use a statement as: LoadPlugin("c:\dvdtools\SmoothDeinterlacer.dll")
    Now create a directory: c:\dvdtools\STANDARD_AVS and in this, create a few files.AVS as follow:

    ==============================================================

    1. DVD_FILM_PRG.AVS: when use FORCED FILM and encode as 23.976
    #LoadPlugin("c:\dvdtools\MPEG2Dec3.dll")
    Mpeg2Source("ToyStory2_16x9_PrgFilm.d2v",idct=0)
    #LoadPlugin("c:\dvdtools\SmoothDeinterlacer.dll")
    #LoadPlugin("c:\dvdtools\UnDot.dll")

    #BicubicResize(640,480)

    #BicubicResize(720,544)
    #Crop(0,48,720,400)

    #BicubicResize(720,416)
    #Crop(0,48,720,368)
    UnDot()

    ==========================================

    2. DVD_DeInterlaced_4x3.AVS: when source is pure NTSC Interalced: NO Forced Film and deinterlace with smoothDeinterlacer:
    #LoadPlugin("c:\dvdtools\MPEG2Dec3.dll")
    Mpeg2Source("ToyStory2_16x9_i_ntsc.d2v",idct=0)
    #LoadPlugin("c:\dvdtools\SmoothDeinterlacer.dll")
    #LoadPlugin("c:\dvdtools\UnDot.dll")
    ConvertToYUY2(interlaced=true)
    SmoothDeinterlace(lacethresh=5,edgethresh=20,staticthresh=0)
    # Result still be 29.976

    #BicubicResize(640,480)

    #BicubicResize(720,544)
    #Crop(0,48,720,400)

    #BicubicResize(720,416)
    #Crop(0,48,720,368)
    UnDot()

    ============================

    3. DVD_IVTC_NO_guide_4x3.AVS: When indicator shows less than 94% Film: NO Forced Film: IVTCing here:
    #LoadPlugin("c:\dvdtools\MPEG2Dec3.dll")
    #LoadPlugin("c:\dvdtools\decomb.dll")
    Mpeg2Source("ToyStory2_16x9_ntsc.d2v",idct=0)
    #LoadPlugin("c:\dvdtools\SmoothDeinterlacer.dll")
    #LoadPlugin("c:\dvdtools\UnDot.dll")
    Telecide()
    Decimate(cycle=5)

    #BicubicResize(640,480)

    #BicubicResize(720,544)
    #Crop(0,48,720,400)

    #BicubicResize(720,416)
    #Crop(0,48,720,368)
    UnDot()

    =============================

    4. DVD_Hybrid_4x3.AVS: 50% FILM and 50% pure NTSC: NO forced Film: Hybrid Treatment:
    #LoadPlugin("c:\dvdtools\MPEG2Dec3.dll")
    #LoadPlugin("c:\dvdtools\decomb.dll")
    Mpeg2Source("ToyStory2_hybrid.d2v",idct=0)
    #LoadPlugin("c:\dvdtools\SmoothDeinterlacer.dll")
    #LoadPlugin("c:\dvdtools\UnDot.dll")

    Telecide(guide=1,gthresh=30)
    Decimate(mode=3,threshold=2.0)
    # Result still be 29.976


    #BicubicResize(640,480)

    #BicubicResize(720,544)
    #Crop(0,48,720,400)

    #BicubicResize(720,416)
    #Crop(0,48,720,368)
    UnDot()

    ====================================================
    Using NotePad, copy and paste the contents into corresponding File.AVS.
    After you use DVD2AVIdg.exe and save your project, for example, you save it as ToyStory2_16x9_ntsc.d2v, right-click this file, and then click "Rename", and then right-click and then click copy, and then high the file name( Terminator3_4x3_hybrid.d2v ) in the Mpeg2Source("Terminator3_4x3_hybrid.d2v",idct=0) and right-click and click "Paste". Now you should have as follows:

    Mpeg2Source("ToyStory2_16x9_ntsc.d2v",idct=0)


    ==================================================
    Resizing and Cropping:
    -------------------------------------
    1. 4x3 movie:
    remove # in #BicubicResize(640,480): now you should have BicubicResize(640,480).
    -----------------------------

    2. 16x9 movie:
    For example you have this: DVD_DeInterlaced_4x3.AVS. I would like to rename this into this: ToyStor2_16x9_DeInterlaced.AVS

    a. Open the the second VOB file ( Did you already rip the main movie into hard-drive? ) in FlaskMpeg ( use flaskmpeg_060_preview.exe ) and try to resize it. Usually they are like the followings:
    720x400
    or
    720x416

    Open ToyStor2_16x9_DeInterlaced.AVS above and remove the # in the corresponding and you should have as follows:
    BicubicResize(720,400)
    #Crop(0,48,720,368)
    or:
    BicubicResize(720,416)
    #Crop(0,48,720,368)
    Notice the Crop() lines above. Now save this ToyStor2_16x9_DeInterlaced.AVS. But let FlaskMpeg open: this is for checkin to see if a particular number is of multiple of 16.
    b. Right-click this ToyStor2_16x9_DeInterlaced.AVS and open it with VirtualDub:
    Click: Video--Filters--Add--null transform.
    At the bottom-right of the Filters windows, click "Cropping" ( above the "Configure"): a new windows appears: Filter Input Cropping windows.
    Move the slider below the video to an area where you can see the top and bottom lines that separate the black bars and the main movie.
    Use:
    Left-Top: Y1 Offset for top cropping <=== pay attention to this number.
    Bottom-Left: Y2 Offset: for bottom cropping
    After you are satisfied, click "OK" at the bottom-right to return to the "Filters" windows. Now look at the resolution before "null transform". Do you see both numbers are of multiple of 16, for example 720x368? If no, return to the "Cropping" windows and try again. Usually Y1 Offset's value and Y2 Offset's value have to be of even numbers.
    When you see the resolution's numbers are of muliple of 16, go back to the Cropping windows and remember the value of the Y1 Offset ( Did I mention you should remember this value ? )
    Example: Y1 Offset = 72
    720x368
    Previously you have something like this:
    BicubicResize(720,400)
    #Crop(0,48,720,368)
    Remove the # and change the second value to 72 ( Left, Top, With, Height : respectively: Y1 Offset is top cropping value remember? ) and change the fourth value into 368 if is not already so.

    YOU ARE DONE.

    Now, open this ToyStor2_16x9_DeInterlaced.AVS in VirtualDub and on the Video menu, click on "Fast recompress" and you are ready to encode.









     
  9. happyuser

    happyuser Guest

    Remember, your file.AVS, for example ToyStor2_16x9_DeInterlaced.AVS, has to be in the same directory of the DVD2AVI project that you saved:
    example:
    My DVD2AVI project is at: d:\ToyStory2_Main\
    inside this directory, I have other files together with the two files as follows:
    ToyStory2_16x9_ntsc.d2v
    ToyStor2_16x9_DeInterlaced.AVS
    other files.
     
  10. shiroh

    shiroh Guest

    i usually use lanczosresize, but that is a matter of preferrences.
    give this a shot,
    bicubicresize(..,-0.2,0.6)

    colourspace conversion, 1 rule, don't change it. so don't use virtualdub fullprocessing, and use fast recompress. all filters should be in avisynth.

    also, try these filter.
    Msharpen filter from donald A Graft, its good for sharpening animes, which all of my encodes, and CGs.

    temporal cleaner.

    i like the kernel deinterlace approach.

     
  11. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    Hey happy, thanks for the quick response, ummm i guess now i have a problem because before i could read your comment, i already installed the VTAPI codec, do you know how i can uninstall it? is it important that i uninstall it?
     
  12. happyuser

    happyuser Guest

    There is no harm installing VFAPICodec.
    Now let's focus on Subtitle for Divx. You should go in that direction because if you do not, you will lose a very wonderful feature that SubRip, VobSub, and MicroDVD offer, and that feature is the ability to play DivX with subtitles just like the original DVD with no extra space required.
     
  13. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    NM
     
    Last edited: Jun 23, 2004
  14. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    NM
     
    Last edited: Jun 23, 2004
  15. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    I been reading though avisynth's website about croping, the function goes crop (top X, top Y, width of X, height of Y) is that correct?

    another thing, in your AVS files why did you type crop 2 times and bicubicresize 3 times? Isn't 1 time of each enough?
     
    Last edited: Jun 23, 2004
  16. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    sorry, yet another question, for audio, should i use demux All tracks or decode to WAV in dvd2avi? Because when i demux i dont get a WAV files so CDex cannot open the file. I read in the avisynth guide that i should use beSweet to encode the audio, is this better?

    what values should i use for interleaving in virtualdub. or should i use interleave at all. I'm going to try to interleave every frame right now. Is it going to make my dubbing very slow? just curious

    I found how to delay the audio option, it's right under the audio interleaving, i want to do 20 ms delay when i'm encoding at around 2000 kbps, is that correct?

    in your standard_AVS files, you commented out the plugins, wut purpose do they serve though, i'm kind of confused. Why putting it there?

    Which program should i use, virtualdub or virtualdubmod? On the avisynth guide i read that the mod is better cuz of its fast recompress function or something, is that true?


    Thanks so much for answering
     
    Last edited: Jun 23, 2004
  17. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    nvm
     
    Last edited: Jun 23, 2004
  18. happyuser

    happyuser Guest

    Crop(0,48,720,368)
    left, top, width, height respectively
    Example:
    Example: Y1 Offset = 72
    720x320
    ==> the crop statement should be:
    Crop(0,72,720,320)

    ===========================
    #BicubicResize(640,480) ==> (for 4x3 movie)
    ----------------------------------------------------
    #BicubicResize(720,544) ==> (for 4x3 one that has black bars on top and at bottom: getting rid of the black bars: you change from a 4x3 movie into a 16x9 with final resolution of 720,400: see Crop state below)
    #Crop(0,48,720,400)
    -----------------------------------------------------
    #BicubicResize(720,416) ==> (for 16x9 movie)
    #Crop(0,48,720,368)

    ==========================================
    DVD2AVI:
    Audio--Output Method--Decode to WAV(AC3,LPM)
    This will simplify and reduce the time it takes to process the audio part of your final DivX.
    I used to use Media Twin soft: AC3 Decoder together with DoItFast4U (For processing Extras on the DVD) and just use the mp3 encoding engine that comes with VirtualDub: Just saves me some time. For the main movie, I can use either the Decode to WAV in DVD2AVI or the AC3 Decode. It doesn't matter.
    --------------------------------------------
    Default VirtualDub's Audio-Interleave's setting is fine. What I would do is after I have encoded my DivX, I apply a 20 ms delay to the audio for the 16x9 clip (720x368). This is to compensate for the slowness of the performance of the future DivX player. When I encode 640x480 at 29.976 at 1700 kbps or more, I put at 20 to 35 ms (sometimes up to 40 ms) audio delay depending how I feel what be satisfying when I watch the movie.
    What bitrate of video should we encode? The followings are what I used to encode:
    1. Main movie: the range of 1300-1750 kbps.
    2. Extras:
    a. Behind the Scene, Making Of, and etc.:
    just give them all a bitrate of 1000kbps(video)-128kbps(audio)
    b. Preview or Music Clips: 1300kbps(video)-160kbps, a 192kbps for Music clips is preferable.
    =======================================
    #LoadPlugin("c:\dvdtools\MPEG2Dec3.dll")
    #LoadPlugin("c:\dvdtools\decomb.dll")
    Mpeg2Source("ToyStory2_hybrid.d2v",idct=0)
    #LoadPlugin("c:\dvdtools\SmoothDeinterlacer.dll")
    #LoadPlugin("c:\dvdtools\UnDot.dll")
    These are for your convenience. Statement begins with # will be ignored ( not processing ).
    Older AviSynth needs files.dll to be loaded manually.
    Notice the first one: MPEG2Dec3.dll. This is not the one you are using ( the one you are using is MPEG2Dec3dg.dll ).
    For some strange reason, if you use MPEG2Dec3dg.dll and DVD2AVIdg.exe with TmpgEnc Plus 2.5, in the middle of extracting some files.bmps, it just says something about "can not load MPEG2Dec3dg.dll". When I need to open my DVD2AVI project in TmpgEnc, I just use the old DVD2AVI.
    ===============================
     
  19. myfinger

    myfinger Member

    Joined:
    Jun 18, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    ALL tis well, thanks so much, i just encoded my first movie into divx. Except the movie is the most basic NTSC Film progressive, so i didn't have to do much to it.

    It took around 10 hours total time though...i donno if that sounds about correct, i have a AMD 1800+, 768 MB of ram, GeForce4 TI4200 128 mb, and RAID harddrives. Took me around 10 minutes to rip audio, 30 minutes to encode it at 224 kbps, one hour and 30 minutes for the first pass, and four hours and 30 minutes for the second pass at around 1500 kbps.

    I encoded a couple of segments, one at 2000 kbps and one at 4000 kbps, i could barely tell the difference...but even at 8000 kbps i could tell the difference between that and the original video. So i donno, maybe i should just use dvd shrink and record entire dvds instead.

    Happyuser, have u had any experience with dvdshink? do you know quality wise, dvdshrink is on par with what kpbs if the video was in divx? cuz i'm not sure if the time i spend on encoding into divx is worth it if i could use dvd shrink (using deep analysis) and probably backup an entire movie in like...a fourth of the time...
     
  20. shiroh

    shiroh Guest

    because the quantization, it still compresses the picture, like you save jpeg and save it again as jpeg, something will be lost.

    that time length of encoding is normal, for a full length movie, you won't believe what some people would do. 9 hours for a 23 minute anime show, but thats is on a celeron and loads of filters.

    i've never use dvdshrink for real use, cause i don't have a dvd burner yet, only on experimental use on the PC, for archival backup, it really depends on your taste, but for regular user, i think it would be good enough, compress is still compress. you can recompile what you want, get the only necessry things and save some space for the movie.
     

Share This Page