<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>All Things IT Blog &#187; DGIndex</title>
	<atom:link href="http://www.enusbaum.com/blog/tag/dgindex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.enusbaum.com/blog</link>
	<description>My little nerded out corner of the Internets!</description>
	<lastBuildDate>Tue, 18 Oct 2011 20:22:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Backing up a DVD to DivX &#8212; My way or the highway!</title>
		<link>http://www.enusbaum.com/blog/2009/01/backing-up-a-dvd-to-divx-my-way-or-the-highway/</link>
		<comments>http://www.enusbaum.com/blog/2009/01/backing-up-a-dvd-to-divx-my-way-or-the-highway/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 23:15:29 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[Audiophile]]></category>
		<category><![CDATA[General Software]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[AC3]]></category>
		<category><![CDATA[DCDI]]></category>
		<category><![CDATA[DGIndex]]></category>
		<category><![CDATA[DivX]]></category>
		<category><![CDATA[DVD Copy]]></category>
		<category><![CDATA[DVD Decrypter]]></category>
		<category><![CDATA[DVD to DivX]]></category>
		<category><![CDATA[Smart Deinterlace]]></category>
		<category><![CDATA[VFAPI]]></category>
		<category><![CDATA[Video Encoding]]></category>
		<category><![CDATA[VirtualDubMod]]></category>
		<category><![CDATA[XviD]]></category>

		<guid isPermaLink="false">http://www.enusbaum.com/blog/?p=173</guid>
		<description><![CDATA[I&#8217;ve been backing up my DVD collection for years in order to watch the movies I own on my portable devices as they evolve. Currently I love watching my movies on the iPhone! I&#8217;m currently using a FANTASTIC new application from Elemental Technologies called Badabom! It uses nVidia&#8217;s CUDA technology to harness the power of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been backing up my DVD collection for years in order to watch the movies I own on my portable devices as they evolve. Currently I love watching my movies on the iPhone! I&#8217;m currently using a FANTASTIC new application from <a title="Web Site -- Elemental Technologies" href="http://www.elementaltechnologies.com/" target="_blank">Elemental Technologies</a> called <a title="Badaboom -- GPU Enabled video transcoder!" href="http://www.badaboomit.com/" target="_blank">Badabom</a>! It uses <a title="Web Site -- nVidia CUDA Technology" href="http://www.nvidia.com/object/cuda_home.html" target="_blank">nVidia&#8217;s CUDA technology</a> to harness the power of my GPU to convert movies from DivX to MP4! Currently it&#8217;s able to convert a movie to iPhone size/format at over 200fps using my Intel Q6600 and nVidia 8800GTX!</p>
<p>SCIENCE! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Backing up to DivX is another story though. I&#8217;ve always been a stickler for quality and control over the process. A perfect example of this is my use of &#8220;old&#8221; programs such as VirtualDub and refusal to use the &#8220;1-Click&#8221; applications because I feel like I lose control over the quality. I think this stems from my age and time of use because back during DivX 3.11 there were no &#8220;1-Click&#8221; applications that could copy a DVD and any attempt at making one usually failed terribly.</p>
<p>So I&#8217;ve always manually converted them, again, out of my own stubbornness. I thought I&#8217;d post my steps here to see if anyone agrees that there&#8217;s some method to my madness (or to tell me that I&#8217;m getting old and should get with the times!) <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>My process allows me to encode any DVD content into DivX using 2-pass XviD encoding while still maintaining the original Dolby Digital AC3 audio track.</p>
<p><span id="more-173"></span>To use my process, the following programs are required:</p>
<ol>
<li><a title="Download Link -- DVD Decryper" href="http://fileforum.betanews.com/detail/DVD_Decrypter/1011845169/1" target="_blank">DVD Decrypter</a></li>
<li><a title="Download Link -- DGIndex" href="http://neuron2.net/dgmpgdec/dgmpgdec.html" target="_blank">DGIndex</a></li>
<li><a title="Download Link -- VFAPI" href="http://www.divx-digest.com/software/vfapi.html">VFAPI</a> (codec + utility)</li>
<li><a title="Download Link -- XviD (koepi's build)" href="http://www.koepi.info/" target="_blank">XviD</a> (codec, koepi&#8217;s build)</li>
<li><a title="Download Link -- VirualDubMod" href="http://virtualdubmod.sourceforge.net/">VirtualDubMod</a></li>
</ol>
<p><strong>Step 1: Backup the DVD</strong></p>
<p>Actually, that&#8217;s a misleading title. Really it should be decrypt and demux the movie. Using DVD Decrypter, I demux the MPEG-2 (M2V) and the Dolby Digital Audio (AC3). This gives me the raw video and audio files I need. Set the AC3 aside because we&#8217;re only going to deal with the M2V file.</p>
<p>Open DVD Decrypter and select the drive with the DVD you wish to backup. Select &#8220;IFO Mode&#8221; from the Mode menu and choose the &#8220;Stream Processing&#8221; Tab.</p>
<p>Inside this Tab, you&#8217;re able to select which streams you want to backup from the DVD. Usually I only select the Video Stream and the 6 Channel Audio Stream. Be sure to also select the &#8220;Demux&#8221; radio button for each stream. Start the backup!</p>
<div id="attachment_181" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-2.png"><img class="size-medium wp-image-181" title="DVD Decrypter" src="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-2-300x194.png" alt="DVD Decrypter" width="300" height="194" /></a><p class="wp-caption-text">DVD Decrypter</p></div>
<p><strong>Step 2: Create a D2V File</strong></p>
<p>Open DGIndex and open the demuxed M2V file. This will generate a D2V file which contains information needed by other programs to open and process the M2V file properly (such as Framerate, Aspect Ratio, etc., etc). Once the file is opened, select File -&gt; Save Project. This will start DGIndex processing the video file and analizing its contents. Once the process is complete it&#8217;ll give you a D2V file that you can now use in VFAPI <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_183" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-3.png"><img class="size-medium wp-image-183" title="DGIndex" src="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-3-300x220.png" alt="DGIndex" width="300" height="220" /></a><p class="wp-caption-text">DGIndex</p></div>
<p><strong>Step 3: Create AVI File using VFAPI</strong></p>
<p>Using the VFAPI driver and utility, you&#8217;re able to create a .AVI container file that uses the D2V information and M2V file as the video source. This allows you to open the .AVI file in a program (such as VirtualDub) and access the video information without having to actually go through an MPEG-2 parser.</p>
<p>Open VFAPI Converter, hit &#8220;Add File&#8221; and select the D2V file generated by DGIndex. Then select &#8220;Convert&#8221;. This will create the .AVI file we will work with in VirtualDubMod.</p>
<div id="attachment_184" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-4.png"><img class="size-medium wp-image-184" title="VFAPI Utility" src="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-4-300x179.png" alt="VFAPI Utility" width="300" height="179" /></a><p class="wp-caption-text">VFAPI Utility</p></div>
<p><strong>Step 4: ENCODE!</strong></p>
<p>I use VirtualDubMod as my video editor here because the &#8220;Mod&#8221; version supports muxing the AC3 audio back into the video file we create.</p>
<p>I do two pass encoding using XviD because it gives me the highest quality video and a more precise file size. This way I can set my movies to be encoded into an exactly 2GB file and TV show episodes into 700MB files.</p>
<p>Before I begin encoding the first pass, I also add the Virtualdub Deinterlace filter to it&#8217;ll handle the deinterlacing of the input video. This is important so you don&#8217;t lose any bits of data with the encoder trying to give data to the interlaced movement when it shouldn&#8217;t even be here! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_185" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-5.png"><img class="size-medium wp-image-185" title="VirtualDubMod Deinterlace Filter" src="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-5-300x192.png" alt="VirtualDubMod Deinterlace Filter" width="300" height="192" /></a><p class="wp-caption-text">VirtualDubMod Deinterlace Filter</p></div>
<p><span style="text-decoration: underline;"><strong>UPDATE 01/27/2009:</strong></span> It was brought to my attention by my good friend Paul that there is a &#8216;better&#8217; Deinterlacing plug-in for VirtualDub called Smart Deinterlacer which can be had from their <a title="Link -- Smart Deinterlacer Homepage" href="http://neuron2.net/smart/smart.html" target="_blank">website</a> <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It sports some good features such as edge-directed interpolation which is a feature of the (formerly) Faroudja DCDI video processor used in quite a few high end video processors! As far as quality comparisons/speed between the default VirtualDub plugin and Smart Deinterlacer, well, I haven&#8217;t been able to spot a difference yet. I used the movie Leatherheads as a test and the frames seemed identical when I compared the deinterlaced output (Smart Deinterlacer v2.8 beta 1 used). I guess it&#8217;s up for you to decide which you prefer, but I felt I owed it to my readers to at least offer up an alternative! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Another option in the latest version of XviD is the ability to encode using multiple threads, thus enabling XviD to encode faster on multi-core machines. Currently encoding a movie at full resolution with the deinterlace filter, my Q6600 can encode a movie at 70fps first pass and 35fps second pass.</p>
<div id="attachment_186" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-6.png"><img class="size-medium wp-image-186" title="XviD Multi-Threaded Encoding Option" src="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-6-300x281.png" alt="XviD Multi-Threaded Encoding Option" width="300" height="281" /></a><p class="wp-caption-text">XviD Multi-Threaded Encoding Option</p></div>
<p>(Note: Not all modes of XviD encoding are multi-core friendly. Enabling cartoon mode for example will force the XviD encoder to use only a single thread)</p>
<p>On your second pass, this is where we remux back in the AC3 audio stream. Add it to the stream list and encode!</p>
<div id="attachment_187" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-7.png"><img class="size-medium wp-image-187" title="Adding the AC3 Stream back to the DivX Video" src="http://www.enusbaum.com/blog/wp-content/uploads/2009/01/picture-7-300x210.png" alt="Adding the AC3 Stream back to the DivX Video" width="300" height="210" /></a><p class="wp-caption-text">Adding the AC3 Stream back to the DivX Video</p></div>
<p>Your finished product will be a high quality DivX backup of your original DVD movie!</p>
<p>Now, I&#8217;m sure there&#8217;ll be some questions from the peanut gallery on why I do things one way or another. So I&#8217;ll just handle a few obvious ones here <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Q:</strong> Why do you use DGIndex/VFAPI to handle the MPEG2 Video? Why don&#8217;t you just use the MPEG2 Input filter for VirtualDub?</p>
<p><strong>A:</strong> I gave that a try for a while but it turns out that handling an MPEG2 video in VirtualDub using the plug in is hella slow. The file is not easily navigated, takes a long time to load and in the end is just burdensome to work with. I find using the DGIndex/VFAPI driver solution better because the input file is loaded quickly and is easily worked with. It doesn&#8217;t require loading the entire MPEG2 stream to memory <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Q:</strong> You&#8217;re crazy! You know single click solutions probably give you just as good quality with much less work!</p>
<p><strong>A:</strong> You&#8217;re probably right! I never claimed that this is the &#8220;one and only way&#8221; to encode a DivX file to get the highest quality. I just find this way works best for me <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Q:</strong> Can I use this method to backup a DVD using the new &#8216;corrupt IFO block&#8217; copy protection found on newer DVD releases such as &#8220;The Dark Knight&#8221;?</p>
<p><strong>A:</strong> Short answer, no. The new copy protection mechenism used causes DVD Decrypter to just crash. Even if you&#8217;re using a driver patch decrypter like DVD43, DVD Decrypter still won&#8217;t be able to handle the corrupt IFO information. Have I been able to work around it? Yes, but the only process I&#8217;ve come up with thus far is long and cumbersome. I&#8217;ll blog about that later if it&#8217;s requested, but it&#8217;s not pretty. <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><strong>Q:</strong> Why do you keep the AC-3 audio? Why not just conver it to MP3 so you can get more space for better video quality?</p>
<p><strong>A:</strong> I&#8217;m an audiophile. I&#8217;m willing to deal with the recoded video because I know the audio will still be the same sweet sounding Dolby 5.1 that was on the original DVD. If you are so inclined to convert the AC3 track to MP3, you can do so using <a title="Download Link -- HeadAC3he" href="http://www.digital-digest.com/dvd/downloads/showsoftware_headac3he_166.html" target="_blank">HeadAC3he</a>. If you are going to be converting the AC3 to MP3, I suggest when demuxing the DVD you select the Dolby 2.0 track, this way it&#8217;s down sampled to stereo by the studio which will yeield much better results than letting HeadAC3he down sample six channels to two. <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Q:</strong> Why XviD? Why not use an official copy of DivX?</p>
<p><strong>A:</strong> I chose XviD because it keeps my method of backing up DVD&#8217;s to only free/open source programs. Also, I&#8217;m a fan of the XviD encoder options in letting me configure and specify a lot of different things. Such as number of threads to encode with (so it&#8217;ll take advantage of my multi-core machine) as well as different encoding types (such as enabling Cartoon Mode). Koepi&#8217;s build is lightwight and easy to use. <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Q:</strong> Why are you still using the AVI container? You know that there are much better containers out there such as MKV, right?</p>
<p><strong>A:</strong> Of course I know! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I just don&#8217;t use them&#8230; well, to be honest, because nobody else uses them! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  Seriously though, I haven&#8217;t run across a commercial DVD player or network media device that can demux Matroska files in my every day use. So until then, I&#8217;ll stick with tried and true AVI <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="su-linkbox" id="post-173-linkbox"><div class="su-linkbox-label">Link to this post!</div><div class="su-linkbox-field"><input type="text" value="&lt;a href=&quot;http://www.enusbaum.com/blog/2009/01/backing-up-a-dvd-to-divx-my-way-or-the-highway/&quot;&gt;Backing up a DVD to DivX &#8212; My way or the highway!&lt;/a&gt;" onclick="javascript:this.select()" readonly="readonly" style="width: 100%;" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.enusbaum.com/blog/2009/01/backing-up-a-dvd-to-divx-my-way-or-the-highway/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

