Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > NLE - Non Linear Editing

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th December 2011, 10:34   #1  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
GUIDE: How to prepare a DVD for NLE editing

Guide to prepare a DVD for editing in a NLE

In this guide I will explain how to prepare a DVD for editing. Our goal is to extract the video and audio from the DVD into a format which we can use to edit. We want to do so as quickly and simply as possible, and in a lossless fashion both for video and audio, and regardless of whether the audio is MPEG, AC3 or DTS. We will extract the video and audio tracks from the DVD, converting the audio at the same time as we extract it to mono WAV files corresponding to each channel of audio. This will work with MPEG, AC3 and even DTS audio! If you have the right codecs installed this process will be lossless. We will edit the video without reencoding to an intermediate format, and we will do so in a frame accurate way.

This whole process takes about 10 minutes on a normal hard drive, and probably around 5 minutes on an SSD.

Programs which need to be installed
Download and install the following programs (all free), if you haven’t done so already.
The following programs will be used “in the background” and need to be installed first:
AviSynth (latest stable build) – The following programs require this to be installed.
AviSynth Virtual File System – This and the next program will allow us to directly edit the DVD video file without re-encoding it.
Pismo File Mount Audit Package

Also install MeGUI, which is the only program we will need to open during the entire process of preparing our DVD for editing:
MeGUI – The will be the program we use to extract the streams from the DVD and convert the audio losslessly to mono WAV files. We will also index the video with MeGUI.

Copy DVD to hard drive
Using AnyDVD, DVDFab Decrypter, or some similar program, copy the DVD to your hard drive.

Export video and audio streams from the DVD
Open MeGUI. Open the “HD Streams Extractor” in the “Tools” menu. This tool is normally used to extract streams from Blu-ray folders or files, but it can do the same with DVD folder structures!


Select the option “Select File as Input” and then hit the button on the upper right to select the files.


Navigate to the folder where you copied your movie, and then into the VIDEO_TS folder. If the “Size” and “Length” columns are not visible, right click on one of the column headers and make them visible. Order the files in alphabetical order.

You need to look for the VOB files that correspond to the main movie and select them. This is usually easy, but some videos have lots of VOB files. Look for a bunch of VOBS in a row which are 1GB big each. These will usually be the movie. Select the VOB files beginning with the VOB file which ends in “_1” (important – don’t select the “_0” file) and select all the VOB files with the same prefix. For example, here I selected from “VTS_01_1.VOB” until “VTS_01_5.VOB”, but not the file after it because the prefix changed, and not the file before it because it ended in 0.

Once you have your VOB files selected, click on the button “Open”.


MeGUI will analyze the VOB Structure and present a list of video, audio and subtitle tracks available in the movie. You can now choose to export the video, audio, and subtitle tracks you are interested in.

Select the check box of the video track and then change the “Extract As” option to the format “M2V”. Do not use the “MKV” option for DVD videos (MeGUI will warn you that it could give problems for DVD videos). For HD or Blu-ray streams MKV works well.


Select the audio tracks you want and change the output format to “WAVS”. This will output a single mono WAV file for every channel in the audio file (v.gr. it will output 6 files for 5.1 audio, 2 files for stereo audio, etc.). If there are any other tracks you want select them and the output format as well. Deselect any tracks you aren't interested in.


Select the Output directory and hit “Queue”.


Go to the “Queue” tab and hit the button “Start”.


MeGUI will export a log file, the video file, and the audio tracks. Notice that the audio tracks are named according to their channel names – “L” is for the “Front Left” channel, “R” for the “Front Right”, etc.


Notice that the video seems to be shorter than the audio! This error happens sometimes. This is only appearance, however. All the information is there. Our next steps will unlock it.

Index the video file
We must now index the video file. This will allow us to edit it in any video editor, and will make sure that any edits we make are frame accurate. Even if you video editor directly supports editing M2V files you will probably find that it will run faster if you index the file.

In MeGUI open the “File Indexer” from the “Tools” menu.


In the File Indexer, select the video file you just exported as your “Input File”. The file extension should be M2V. Then select “DGIndex” or “DGIndexNV” as the “File Indexer”, and hit “Queue”. Make sure the options “On completion load files” and “and close” are selected. Do not select the option to “Demux Video Stream”.


Go to the Queue tab and hit the “Start” button.


When it finishes indexing the file, a window like this will appear, as well as a window with an image from the video. Hit the button “Save” on the bottom right. This will save an AVS file (i.e. an Avisynth script) in the folder where you exported the video and audio tracks. Don’t worry if you don’t understand what’s going on, just keep following the instructions!


After hitting the save button another window may appear. You can now close that window and MeGUI as well. Your folder will now look something like this:


The files “T2_Video - .d2v.bad” and “T2_Video - .fix.txt” are the files with the information about how to access the hidden part of our video. If your video length was already correct you will not see those two files. The important thing is that you now have an AviSynth file with the extension AVS. This small AVS text file plus our index (the D2V file) will allow us to edit the original DVD video in a frame accurate manner without an intermediate codec!

Mount the AVS file
Right click on the file with the extension “AVS” and select “Quick Mount”. If the option to “Quick Mount” does not appear, install these two programs, both free:
AviSynth Virtual File System – This and the next program will allow us to directly edit the DVD video file without re-encoding it.
Pismo File Mount Audit Package
After selecting “Quick Mount” the AVS file will disappear, and a folder will appear. It should look like this:


If you go into that folder you will see three files, one of which is a video file with the extension AVI which you can then use in your video editing program. Don’t worry if the video file appears to be huge. It is a “virtual” file, and takes up only a few KB. This virtual file is what you want to edit with, not the M2V file directly.


Edit your DVD
At this point you are ready to begin editing your DVD. Simply import the AVI video file and the audio streams into your video editing program (v.gr. Sony Vegas Movie Studio or Magix Movie Edit Pro). Here is how it looks in Sony Vegas. The video and audio are in perfect sync and are complete. In this case there is a little extra video at the end from one of the “extras”, but you can just cut that off. You are now ready to edit the DVD!


NOTE: If your video editing program does not recognize the video stream, add the command "ConvertToYUY2()" to your AviSynth script. If that doesn't work, try "ConvertToRGB24()".

Last edited by JoeH; 11th January 2012 at 18:06. Reason: Added note at the end about what to do if video editing program doesn't recognize video
JoeH is offline   Reply With Quote
Old 30th December 2011, 09:09   #2  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,485
Just some minor comments:
  • there are DVDs that include other things in the "main" VTS, things like trailers, logos, advertisments, warnings etc. Demuxing the whole VTS will have these included as well (you noticed this as well in your guide). I use PGCdemux, which allows me to demux exactly the part I need. Alternatively, one can use the reauthoring function of eg DVDshrink to get only the main movie.
  • the DVD is a distribution format, not an editing one - editing a DVD is usually done at the expense of reencoding (which appears to be the goal of your guide)
  • MPEG-2 files are generally compatible with many editing suites, audio files have to be decoded, however not many entry level editiong suites are capable of coping with more than 2 channels, not to mention multiple tracks
  • The subtitles/CCs are not important in your guide apparently
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 30th December 2011, 09:42   #3  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
1. Good points. As far as the first one, so far I haven't had any problems as long as I don't select the VTS*_0 file (which seems to generally have the trailers, logos, etc. However, there could be exceptions I suppose. If so, something like PGCDemux could be used. I actually have used PGCDemux often, but since the method I described has fewer steps and so far hasn't failed me I prefer it.
2. The goal of this guide is in fact re-encoding after editing.
3. Yes, this guide is for use with NLE's that support 5.1 or 7.1 audio. I recommend Vegas Movie Studio Platinum, but Magix Movie Edit Pro is also very good. Both products cost less than $100. I actually use Vegas Pro, but if I had to purchase again today I would get Movie Studio Platinum. I'm not aware of any free NLE's for Windows that support 5.1 or 7.1 audio.
4. I didn't include info about the subtitles, but they are important to me. I didn't include them in this guide because I never actually extract the subtitles from the original DVD or Blu-ray. Here is a summary of what I have found works best:
a. Download SRT subtitle file in the language you are interested in from one of the online subtitle sites (there are many, just Google "subtitles download")
b. Make any necessary changes to the subtitles. If I cut the video, I retime the subtitles using Subtitle Workshop 4 (maybe I'll write a guide about how to do that in a failsafe way later).
c. Then I mux the subtitles into the final product (some programs which I know of which do this for DVDs are MuxMan, TMPGEnc Authoring Works, AudioMuxer, etc. There may be better ones for DVD. For Blu-rays I use TSMuxer, which does subtitles very well).

Last edited by JoeH; 30th December 2011 at 09:44.
JoeH is offline   Reply With Quote
Old 4th January 2012, 16:13   #4  |  Link
profiler 2.0
Registered User
 
profiler 2.0's Avatar
 
Join Date: Dec 2011
Location: In total abstraction ...
Posts: 9
brilliant

Thanks for the info
profiler 2.0 is offline   Reply With Quote
Old 4th January 2012, 23:21   #5  |  Link
profiler 2.0
Registered User
 
profiler 2.0's Avatar
 
Join Date: Dec 2011
Location: In total abstraction ...
Posts: 9
_The Easily extracted subtitles with SubRip to OCR method.
_The Method explained in this guide is interesting, especially allows to load a type ELN mkv in sony vegas.
_after, use debug mode server plugin frame to compress with x264 or HC encoder according to need

congratulations

Last edited by profiler 2.0; 7th February 2012 at 17:10.
profiler 2.0 is offline   Reply With Quote
Old 4th April 2012, 03:26   #6  |  Link
jriker1
Registered User
 
Join Date: Dec 2003
Posts: 379
Thanks for the post. Interesting process. I followed this thru with a 16:9 movie and it stayed 16:9 until I started using the AVS script. Then it became 4:3. Oddly enough MeGUI showed 16:9 when I saved the avs file but there was nothing physically in the avs file to show the format of the file other than "info=3". Is something wrong here?

For reference the m2v file is 16:9 just the avs that it gets messed up with.

Thanks.

JR

Edit: For reference the d2v file seems OK.

Stream_Type=0
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000 (25/1)
Location=0,0,0,1c3d60

Last edited by jriker1; 4th April 2012 at 03:48.
jriker1 is offline   Reply With Quote
Old 4th April 2012, 16:40   #7  |  Link
profiler 2.0
Registered User
 
profiler 2.0's Avatar
 
Join Date: Dec 2011
Location: In total abstraction ...
Posts: 9
Quote:
I followed this thru with a 16:9 movie and it stayed 16:9 until I started using the AVS script. Then it became 4:3.
-The problem may be the DVD ...
Sometimes there is the problem to be indexed (change the resolution aspect).
You can feel it in the MeGUI preview.

'I happened to DVD-9 which have been recoded to DVD-5

Greetings.
profiler 2.0 is offline   Reply With Quote
Old 4th April 2012, 17:43   #8  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,359
Isn't vegas supposed to work wonderfully with mpeg2 stuff? (Cutting it without re-compression even)
__________________
certain other member
smok3 is offline   Reply With Quote
Old 5th April 2012, 00:00   #9  |  Link
jriker1
Registered User
 
Join Date: Dec 2003
Posts: 379
Quote:
Originally Posted by smok3 View Post
Isn't vegas supposed to work wonderfully with mpeg2 stuff? (Cutting it without re-compression even)
It does, problem is it doesn't work with m2v files. Needs to be in an mpeg2 container however based on this article the resulting wav file can not be encapsulated/muxed with the m2v file. Not compatible with each other.

By the way in MeGUI when I create the index no matter what I change the DAR to it doesn't change the picture. Keeps showing as a square picture. Even the script shows setting 16:9 but the output is still basically a 4:3 image.

JR

Last edited by jriker1; 5th April 2012 at 00:07.
jriker1 is offline   Reply With Quote
Old 5th April 2012, 11:56   #10  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
Quote:
Originally Posted by jriker1 View Post
It does, problem is it doesn't work with m2v files. Needs to be in an mpeg2 container however based on this article the resulting wav file can not be encapsulated/muxed with the m2v file. Not compatible with each other.

By the way in MeGUI when I create the index no matter what I change the DAR to it doesn't change the picture. Keeps showing as a square picture. Even the script shows setting 16:9 but the output is still basically a 4:3 image.

JR
I've only seen this problem once myself. I don't remember for sure exactly what the cause of the problem was, but I think it was that the original image itself was actually 4:3 and was just being stretched to 16:9 by the settings.

I'm of the impression that the indexing doesn't affect the 16:9 or 4:3 aspect of the video itself (as it's not recoding the video). I think it's just an indicator to help video playback programs. If the video is actually 4:3 with a setting that stretches it to 16:9, maybe the indexer is simply making that evident.

You could ask Neuron2 (author of DGIndexNV) as well, he probably has seen this one before.
JoeH is offline   Reply With Quote
Old 1st December 2012, 02:45   #11  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 619
One question, its possible extract mpg streams using pgcdemux from megui???? For me is more useful extract episodes of DVD.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Nvidia GTX750 2GB DDR5 + SSD Vertex 4 256 GB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 3rd December 2012, 00:33   #12  |  Link
Pomegranate
Registered User
 
Pomegranate's Avatar
 
Join Date: Oct 2012
Posts: 66
Is MeGUI really needed? I use DVDShrink to get the main movie files, DGIndex to get avs + audio, eac3to to get wavs, virtualdub to adjust the avs script to my liking and I'm ready to edit. I don't use subtitles, so maybe that's where MeGUI could come in handy.
Pomegranate is offline   Reply With Quote
Old 4th December 2012, 09:13   #13  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
@Pomegranate - MeGUI is in fact not needed. Just facilitates things. There are other ways to get the same output. Use whatever works best for you. I am a big MeGUI fan because it integrates so many tools so well, but there are lots of options.
@OverDrive80 - I would just do that from pgcdemux. I don't think MeGUI has integrated all those features.
JoeH is offline   Reply With Quote
Old 9th December 2012, 07:55   #14  |  Link
LocalH
Registered User
 
Join Date: Mar 2005
Posts: 135
This is true. I personally use VOB2MPG to extract the raw MPEG-2 PS from the VOB, which I can then index with DGIndex to get my d2v + audio which I then process as necessary. Still, it's nice to have another tool to do this type of thing and I may just switch over to MeGUI.
LocalH is offline   Reply With Quote
Old 20th April 2014, 06:25   #15  |  Link
engineerer
Registered User
 
Join Date: Apr 2014
Posts: 2
Super-simple VOB import into Premier

This thread might need a major update. When I began asking around, about how to import a short clip from a commercial DVD into Adobe Premier (Elements, Version 11, if that matters), it was pointed out to me that VOB files, from DVD's will go directly in, and can be edited in the conventional ways.
If one wants to make a VOB file shorter, DVD-Shrink is a free utility that will do that, in a lossless manner. And, note also that a VOB file from nearly any commercial DVD can (now) be copied directly to a hard drive, using basic Windows copy-and-paste or drag-and-drop steps; and, once there, [spam] can also crop off the beginning and the end, to provide a small and convenient clip.
So . . . does that approach completely bypass all the other steps listed in the posts above?

Last edited by Guest; 20th April 2014 at 13:15. Reason: rule 5
engineerer is offline   Reply With Quote
Old 20th April 2014, 19:42   #16  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,485
It very much depends on what one wants to do with the files.
The VOBs are practically PSs (program streams), and they can be edited in a various of software, mainly for amateurs, directly. Pro software want elementary streams, because it is supposed that one MAKES his own DVD from separate audio and video parts, not COPIES an existing one.
If I want to selecte a scene, I might use DVDshrink in reauthoring mode (mostly there is an I-Frame at scene change). If no suitable I-frame (for lossless cutting) exists, I might use a "smart rendering" software, like Womble and similar. Again on PSs, not on indivisual ESes (elementary streams).
In the age of Terabytes I don't believe in re-encoding to fit 700MB size, like often desired. These are mostly for sharing, as filesharing services usually require a certain size (mostly for free downloads) while nobody would burn a CDR with a movie and I mean nobody. That was 20 years ago.
The only major problem is the NTSC-land. But again, IVTCing a video stream does not do anything than providing an additional step of TCing it afterwards, if one needs to make the DVD again compatible with the standard.
But that's only me. I copied my bought movies only because the issuers played with PUOs (preventing me from directly switching eg the subtitles or audios) or because I had to add subtitles (in particular English and some German and in particular cheap editions lack subtitles - some people used to live in ranches the size of Hamburg may not fully understand the concept of next-door neighbours but in these case subtitles are very handy ). Compilations of scenes featuring a certain common concept I did using DVDshrink and editors.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 21st April 2014, 08:36   #17  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
I wrote this guide with Sony Vegas in mind, and don't use Premiere, so I can't really comment on how well or not the process in Premiere works. From what I have been able to read online, the new VOB import feature in Premiere works well sometimes, and othertimes it doesn't. I'm not sure how well it handles the audio, or if it allows lossless editing of the individual channels... I would imagine so. When the OOTB import process doesn't work, know that this process will get it done, and will do so losslessly. The fact that the exact same process works for Blu-rays is an added plus.
JoeH is offline   Reply With Quote
Reply

Tags
demux, dgindex, dvd, megui

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:18.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.