DGAVCDec Quick Start Guide


This document is intended to help newcomers to DGAVCDec to quickly understand the process and become productive. It is intentionally short and to the point, and is not intended to be a complete users manual or tutorial.


What is DGAVCDec?

DGAVCDec is an AVC (H.264) decoder suite. It is used to decode AVC streams from such sources as HD-DVD EVOs, captured transport streams, *.264 files, etc. Note that currently only AVC elementary streams and transport streams are supported, so if you have a different container type, such as *.mp4, you will have to demultiplex the raw AVC stream from its container before processing it with DGAVCDec.


What Do I Need to Use It?

You need the DGAVCDec package and Avisynth. First get Avisynth 2.5 (or better) and install it:

Avisynth 2.5

You are going to use DGAVCIndex.exe and DGAVCDecode.dll from the DGAVCDec package, so extract them from the ZIP file and put them together in a directory.

Also get VirtualDub as we will use that to view the decoded video:

VirtualDub Web Site

We'll assume you have an AVC elementary file.


OK. Now What?

Fire up DGAVCIndex. Using File/Open, open your AVC (H.264) file. You should see the video.

Now select File/Save Project and enter a name for the index file (DGA file) that is going to be generated. Suppose your source file is called 'mystream.264'; you might choose the name 'mystream' to enter here, because DGAVCIndex will automatically append '.dga'. Good. Hit Save. The indexing process will start and you'll see the indicator moving along the time line to indicate the progress. Be patient if your video is large. When the process finishes, exit DGAVCIndex.


What is This Index File and What Do I Do with It?

DGAVCIndex created an index file called *.dga. It is read by DGAVCDecode, which actually decodes the AVC and delivers the video. The index file just contains information that tells DGAVCDecode where each frame is located and some information about each frame.

But you can't just execute DGAVCDecode directly! It has to be done through Avisynth. We'll make a script file called mystream.avs using a text editor. Later in this document I'll show you how to configure DGAVCIndex to make the script automatically, but for now, you need to know the old-fashioned way. So put this text into a new text file you make called 'mystream.avs':

  LoadPlugin("...\DGAVCDecode.dll")
  AVCSource("mystream.dga")

Replace the path '...' in the first line with the path to the location where you placed DGAVCDecode.dll.

Finally, use VirtualDub to open the 'mystream.avs' script file just as if it was an AVI file. That's it! You have your video and can navigate randomly on the VirtualDub timeline. Does life get much sweeter than this?


Yeah, But How Do I Do That Automatic Script File Thing?

Ahh, you have to pay extra for that! No, not really.

Let's suppose you have a script that you use all the time. Maybe like this:

  loadplugin("...\DGAVCDecode.dll")
  loadplugin("...\Decomb.dll")
  avcsource("mystream.dga")
  fielddeinterlace()

Copy this to a file and call it 'template.avs'. Then edit it to replace the DGA file name with __vid__ (that's two underscores before "vid" and two after). template.avs should then look like this:

  loadplugin("...\DGAVCDecode.dll")
  loadplugin("...\Decomb.dll")
  avcsource("__vid__")
  fielddeinterlace()

You see, DGAVCIndex is going to use this as a template and insert the right file name whenever it sees __vid__. Slick, eh?

OK, all you have to do now is fire up DGAVCIndex, select your template file with the Options/AVS Template menu item, and then do a Save Project. If the *.avs file does not already exist, DGAVCIndex will make one for you based on the template! Of course, the template has to be created only once, while you'll get an automatically generated AVS script every time you save a DGAVCIndex project.


Cool. One Last Question...

Shoot!


Why the Two-Step Tango? Why Can't I Do Everything Right in DGAVCIndex?

Good question! We want to make our video available to any application that we might find useful. Surely we can't put every possible function into DGAVCIndex. So instead we create a way to 'serve' the video into all these other applications. Avisynth is an AVI file server. It creates a 'fake AVI' and tricks applications into thinking they have a real AVI when they open the *.avs file.

If you just want to make an AVI out of your video, it's easy. Open the AVS in VirtualDub, set your compression, and do Save AVI.


Copyright (C) 2007-2008 Donald A. Graft, All Rights Reserved