View Full Version : GUIDE: How to prepare a DVD for NLE editing

29th December 2011, 10:34
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) (http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/) – The following programs require this to be installed.
AviSynth Virtual File System (http://www.turtlewar.org/avfs/) – This and the next program will allow us to directly edit the DVD video file without re-encoding it.
Pismo File Mount Audit Package (http://www.pismotechnic.com/pfm/ap/)

Also install MeGUI, which is the only program we will need to open during the entire process of preparing our DVD for editing:
MeGUI (http://sourceforge.net/projects/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!
http://s13.postimage.org/8hmiv7ahz/image017.png (http://postimage.org/)

Select the option “Select File as Input” and then hit the button on the upper right to select the files.
http://s13.postimage.org/7llg20bfr/image002.png (http://postimage.org/)

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”.
http://s13.postimage.org/za839iyg7/image003.png (http://postimage.org/)

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.
http://s13.postimage.org/b7r9enht3/image004.png (http://postimage.org/)

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.
http://s13.postimage.org/ktktuy8yv/image005.png (http://postimage.org/)

Select the Output directory and hit “Queue”.
http://s13.postimage.org/mmnqj9u5j/image006.png (http://postimage.org/)

Go to the “Queue” tab and hit the button “Start”.
http://s13.postimage.org/vvpwte31j/image007.png (http://postimage.org/)

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.
http://s13.postimage.org/v7lno6tpj/image008.png (http://postimage.org/)

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.
http://s13.postimage.org/aau0x9l2f/image018.png (http://postimage.org/)

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”.
http://s13.postimage.org/famvrh1bb/image010.png (http://postimage.org/)

Go to the Queue tab and hit the “Start” button.
http://s13.postimage.org/6gvzadecn/image011.png (http://postimage.org/)

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!
http://s13.postimage.org/3o2rqce07/image012.png (http://postimage.org/)

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:
http://s13.postimage.org/bi3dbqlt3/image013.png (http://postimage.org/)

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 (http://www.turtlewar.org/avfs/) – This and the next program will allow us to directly edit the DVD video file without re-encoding it.
Pismo File Mount Audit Package (http://www.pismotechnic.com/pfm/ap/)
After selecting “Quick Mount” the AVS file will disappear, and a folder will appear. It should look like this:
http://s13.postimage.org/wt0xg03xj/image014.png (http://postimage.org/)

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.
http://s13.postimage.org/p1k7hfzs7/image015.png (http://postimage.org/)

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!
http://s13.postimage.org/ncb49dk2v/image016.png (http://postimage.org/image/ccpwxrtnn/full/)

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()".

30th December 2011, 09:09
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 ;)

30th December 2011, 09:42
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).

profiler 2.0
4th January 2012, 16:13

Thanks for the info

profiler 2.0
4th January 2012, 23:21
_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


4th April 2012, 03:26
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.



Edit: For reference the d2v file seems OK.

Frame_Rate=25000 (25/1)

profiler 2.0
4th April 2012, 16:40
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


4th April 2012, 17:43
Isn't vegas supposed to work wonderfully with mpeg2 stuff? (Cutting it without re-compression even)

5th April 2012, 00:00
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.


5th April 2012, 11:56
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.


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.

1st December 2012, 02:45
One question, its possible extract mpg streams using pgcdemux from megui???? For me is more useful extract episodes of DVD.

3rd December 2012, 00:33
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.

4th December 2012, 09:13
@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.

9th December 2012, 07:55
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.

20th April 2014, 06:25
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?

20th April 2014, 19:42
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.

21st April 2014, 08:36
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.