VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Writing this so I can refer back to it whenever I need... some of you may be interested in this as well so I'm posting it here.

    Let me preface this with the fact that I never went to school for any video / audio processing. This is what has resulted from gathering info from various sources around the net and doing my own experimenting.

    This is a guide on how to rip a DVD to 1080p @ 59.94FPS (or 50FPS for Region 2). It's mostly geared towards NTSC DVDs but I've had the same success with interlaced PAL DVDs using this method. Trashy AI upscales (looking at you Topaz) annoyed me so I figured out how to do this instead. This guide is a more faithful-to-the-original-DVD conversion than a true upscale.

    I'm going to be up-scaling (aka resizing) the video to 1080p while keeping frame accuracy during a QTGMC pass, retaining chapters, all audio tracks, and subtitles (if on the DVD).

    This is a rather tedious and lengthy process, so just read through it all first before you attempt it.

    You'll need these tools (all free):

    DVD Decrypter
    DVDVob2Mpg
    DGIndex
    AviSynth+ / VirtualDub2 (with QTGMC + NNEDI3 plugins) -- watch this guide on how to set it up
    Handbrake
    SubtitleEdit
    MKVToolNix
    VLC

    MediaInfo (not required but nice to check what tracks are in your files)

    Step 1: Use DVD Decrypter to export the DVD to an ISO.

    This will remove any region locks on the DVD and an accurate ISO rip. I rip them in DVD9 (dual layer) mode for maximum quality.
    You can do this with DVD5, but the results aren't nearly as good.

    Some newer DVDs may need RipIt4Me to defeat the copyright protection.

    Step 2: Eject your DVD and mount the ISO.

    I do this since it's faster to work with a mounted ISO than it is to continuously read the DVD, so set it up in read mode to ISO, and wait for this to finish.

    Step 3: Open the mounted ISO with DVD Decrypter in IFO mode.

    This will read the headers and stuff in the DVD, and show you the VOBs you can extract.

    Using VLC, open your DVD and start playing what episode or video you want to export, and pay attention to the track lengths for each episode you want to extract.
    Sometimes the copyright protection methods include having multiple of the same video, but with long blank areas or misaligned audio.

    Extract the correct length track that you find in the Input menu.

    Step 4: Use DVDVob2Mpg to convert all the .VOB files extracted into a single MPG file.

    Make sure to select them in order so you don't have any out of order scenes. This is to get rid of any junk data in the VOBs. Do not delete the VOBs yet.

    Step 5: Use MKVToolNix to create the chapters file.

    Select your first VOB that you extracted and add it into MKVToolNix as a new file. Select the rest in order, and drag them in, choosing "Append" to the current project.

    De-select the video track and keep at least one audio track in the file.
    Move to the "Output" tab and under Chapters, find the "Generating chapters" dropdown menu and choose "One chapter for each appended file".
    Click start multiplexing and wait for your track to finish.
    Now open "Chapter editor" on the left menu of MKVToolNix.
    Make any necessary changes (usually deleting the first and last chapter since the video start & end chapters don't matter and re-numbering the rest) to the chapter file and then save it.

    Keep the mka file that was generated. You can now delete the VOB files that were extracted.

    Step 6: Use Handbrake to export the subtitle track(s).

    Open Handbrake and import the MPG you generated earlier. Set format in the 'Summary' tab to MKV.
    Go to the 'Video' tab and chooe H.264, Constant Quality, Constant Framerate, set the RF to 51 and encoder preset to ultrafast. (we're just doing this to extract the subtitles, so the video quality doesn't matter).
    Go to the 'Subtitles' tab and click tracks -> Add all remaining tracks. Delete the 'Foreign Audio Scan' entry.
    Delete any audio tracks so you don't waste any time.
    Start the encode and wait for it to finish, it should generate a MKV.

    Open the generated video in SubtitleEdit, and it should show you the subtitle tracks.
    For each track, choose import and set the new resolution to 1440x1080 (or 1920x1080 for widescreen).
    I export them as both an .ASS track (I change the font a nice letterbox black highlight / white font) and a .SRT track.

    Now you can delete the video file you just generated.

    Step 7: Open your MPG file in DGIndex

    Open DGIndex and select your MPG file.

    Play it for a bit and check the side panel to see if it's top field first or bottom field first. This is important for later.

    Then do 'File' -> 'Save Project' and save it.

    This should export a .D2V file as well as export any audio tracks with their respective delays in the file name, usually this is 0ms since DVDVob2MPG usually zeros / aligns them.

    Step 8: Converting the video with VirtualDub2

    You're going to need to write a small AVS script for VirtualDub2 to know what to do.

    This is my upscaling script. It's pretty basic compared to some of the very fine adjustments other's have done with QTGMC, however it works well enough for me.

    SetFilterMTMode ("QTGMC", 2)
    MPEG2Source("DRIVE:\YOURDIRECTORY\WHATEVER.d2v")
    AssumeTFF()
    QTGMC(preset="Slower", InputType=0, Lossless=2, SourceMatch=3, EdiThreads=4)
    #Crop(0,2,0,0)
    nnedi3_rpow2(2, cshift="LanczosResize", fwidth=720, fheight=540, nns=4)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=1440, fheight=1080, nns=4)
    Sharpen(0.016)
    Prefetch(14)
    We set the filter MT mode to 2, I'm not sure why but I read it somewhere.
    Then we use MPEG2Source and import the D2V correctly, and frame accurate. FFVideoSource won't.
    Then we set the field order that we found above in DGIndex. (TFF or BFF)
    QTGMC pass at 'Slower' for better quality / more time per frame, 0 to indicate interlaced, using lossless and sourcematch to adjust some of it's internal filters. EdiThreads is adjusted for my CPU, you may need to change it.
    Some encodes have a small flickering black line on the top or bottom, i crop them out (lose a small amount of detail, unnoticable IMO)
    I do a couple resizes using different algorithms with NNEDI3.
    A small sharpen at the end since we've come up quite a bit in size from the original DVD source.
    A prefetch to utilize my CPU. You may need to remove that line.

    You will need to adjust the widths and heights if you are going to 1080p (I do 960x540 and 1920x1080).

    Ok, now save this as a .AVS file.

    Drag your AVS file into VirtualDub2 and it should pop up the preview. Scroll through and play a bit to make sure there aren't any issues like wrong field first or flickering lines.

    Make your adjustments and once it looks okay, go to 'File' and 'Save Video'. Change file format to MKV. Change the compression to whatever codec you prefer.

    I do FFMPEG/x265 and configure it to 8 bit depth, profile Slow, RF18. This setting takes a while but the video quality is fantastic.

    Now name the video something like VOB_01(RF18S).mkv and let it run. This took a long time to process per episode, about 2hrs per 25 mins. This is because of my settings, you can adjust them / the codec and achieve faster processing times.

    Step 9: Merge everything together with MKVToolNix.

    Import the video file you created with VirtualDub2, then import your audio (usually track 0 is the default while others are commentary / scores / other languages), and your subtitles.
    Import the .mka file you generated with chapters as well, then pay attention to the color and de-select the audio track that was imported with it.

    Re-arrange your audio tracks so the default is first. Then, for any other tracks, select them (multiple if you hold CTRL) and set "Default track" flag to No. I also change all the audio track's language to "en" for english and set the 'Track name' accordingly (ie. Mono / Stereo / Commentary / Surround / 5.1 Surround / etc.)

    De-select any Tags / Global Tags that were generated with the video file. You won't need them.

    So you should now have a video track, audio track(s), subtitle tracks, and a chapter track. Make sure your 'Generating Chapters' dropdown menu is set to 'Don't generate chapters' since we already have them.

    Now, multiplex your file together and you should have your final result, a 1080p/59.94fps fullscreen video with frame accurate deinterlacing and synced audio / subtitle / tracks & chapters.

    You can go ahead and rename your final file, and delete the rest.

    That's it.

    Now it's time to do the whole thing over again for your entire DVD / show. It's a long process, it's best to have them all setup as jobs in VirtualDub2 and run them overnight. I've successfully done Viva La Bam, IASIF, and 6 seasons of TPB like this and it was very time consuming. I will add example pictures eventually.

    This will also work with say old VHS / Hi8 footage if you use a DVD Recorder (S-Video is best) as they record in interlaced NTSC (or PAL).

    Important note: This may not work accurately with animated titles or ones that are hard telecined. (For example, Invader Zim)

    Additional note: I have noticed some very slight audio sync issues in a few of my encodings, but only a handful. I'm not sure if there's something going on with the process, if I just missed a step, or if its a source issue but if anyone has this same issue and knows why it may be happening please let me know.
    Quote Quote  
  2. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Some comments, just to better understand your flow:

    Why QTGMC applied by default? (in PAL not all sources are interlaced, movies rarely are; in NTSC often an inverse telecine is needed)

    Why QTGMC lossless? (is not appropriate for all sources by default)

    Why 2 nnedi3 steps?

    QTGMC denoises with that settings, a better sharpening filter is more appropriate.

    This will also work with say old VHS / Hi8 footage if you use a DVD Recorder (S-Video is best) as they record in interlaced NTSC (or PAL).
    They may encode interlaced the progressive source
    Quote Quote  



Similar Threads

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