What is DGIndex? | Table of Contents |
DGIndex, part of the DGMPGDec package, is primarily designed to create an index of an MPEG video stream, containing the location of each frame in the input stream, and some additional information about each frame. This index, or project file, is used by the companion AviSynth filter DGDecode to provide frame-accurate serving of the video via an Avisynth script. DGIndex is able to decode and index most MPEG1/2 streams including elementary streams, program streams, VOBs, VCDs, SVCDs, PVA files, and transport streams. Additional features include: video demuxing (m1v/m2v), audio demuxing (ac3, dts, aac, mpa, and lpcm), optimized iDCTs, luminance filtering, cropping, and more.
DGIndex is an evolution of Chia-chen Kuo's DVD2AVI and is baselined off DVD2AVI v1.77.3.
The evolved version was renamed to DGIndex to avoid naming confusions, to reflect the significant divergence of functionality, and to clearly link it with neuron2's companion tools in DGMPGDec. Neuron2 wants to take great pains to acknowledge the origins of DGIndex as described in the Credits section below.You can get the latest binaries and source code of DGMPGDec at http://neuron2.net/dgmpgdec/dgmpgdec.html.
DGIndex is free software distributed under the terms of the GNU GPL v2 license. You must agree to the terms of the license before using the program or its source code. Please see the License section for details.
This document is a reference manual for DGIndex. Please refer to the accompanying documents for quick start information, frequently asked questions, and guidance on actual usage of DGIndex in typical scenarios.
File Menu | Table of Contents |
Open | Table of Contents |
Use this option to open one or more source files. If you open more than one file, their contents will be concatenated in the order in which the files are listed in the File List dialog. Demultiplexing or frame serving will produce a single output stream that is a concatenation of the source files. When you open multiple files, all the files must be of the same type; e.g., you cannot open MPEG1 and MPEG2 files at the same time, you cannot open program streams and transport streams at the same time, etc.
Clicking on File\Open causes one of two things to happen:
If no files have yet been selected, the Open dialog will appear.
Multiple files may be selected by holding the SHIFT or CTRL keys during file selection.
Click "Open" to proceed to the File List dialog.
If one or more files have already been selected, the File List dialog will open.
Files can also be loaded by dragging-and-dropping them onto the DGIndex window. This causes the File List to be opened with the list containing the drag-and-dropped files.
When the File List dialog opens with newly selected files, it sorts them (using an intelligent multifield sorting algorithm) and lists the selected files. In rare cases, the order produced may not be what the user requires. This can be corrected by using the list editing buttons. The following buttons are available for list management:
When the list is arranged satisfactorily, click "OK" and the contents of the File List will be loaded into DGIndex as a continuous sequence.
Sometimes due to cutting or editing, video streams may start with several frames that cannot be decoded properly (because their reference frames are missing). When this is the case for the first file in your file list, DGIndex will warn you by popping up a dialog box containing this message: "WARNING! Opening GOP is not closed. The first few frames may not be decoded correctly." This is just a warning and does not prevent DGIndex from operating correctly. In this case, DGIndex replaces the first few frames with copies of the first good decodable frame. Note that this warning and replacement occurs only for the first file in the file list.
Load Project | Table of Contents |
Use this option to open existing DGIndex (d2v) project files.
When a project file is loaded, DGIndex opens the project's files in the correct order and restores the following settings from the project file:
Save Project | Table of Contents |
Use this option to generate a DGIndex project file (d2v file). The project file is used by DGDecode (or DGVfapi) to frame-serve the video.
DGIndex builds a project file containing the paths to the source files, the video settings, and MPEG indexing information. For more information on the structure of d2v files, refer to Appendix A.
When the project is saved, the timeline selection points are honored, that is, the served video and the demultiplexed audio will contain only the portions of the input streams selected by the timeline selection points.
Generation of the project file can take several minutes depending on the size of the project and the speed of your computer.
Note that the source file names and path locations cannot be changed after a project file is generated. If you need to change their names or move them, you will either have to regenerate the project file using Save Project after moving them, or you will have to edit the paths given in the top of the d2v file.
Save Project and Demux Video | Table of Contents |
Use this option to generate a DGIndex project file (d2v file) as described in the section "Save Project" above, and at the same time demultiplex the video to a separate MPEG elementary stream file (m1v or m2v file). Elementary stream files are sometimes needed for use with other applications (such as DGPulldown and DVD authoring programs). DGIndex provides this functionality as a convenient tool for the sophisticated user; elementary streams are not required for frame serving via DGDecode (or DGVfapi).
The elementary stream file will be generated in the same directory as the project (d2v) file, and its name will be created by concatenating the base name of the project file with ".demuxed.m1v" for MPEG1 streams, or ".demuxed.m2v" for MPEG2 streams. For example, if the project file is named "movie.d2v" and it contains MPEG2 video, the elementary stream file will be named "movie.demuxed.m2v".
Note that demultiplexing always generates a single elementary stream file containing all the video of the project, even if the project file refers to multiple source files.
Save BMP | Table of Contents |
Use this option to save the current frame on display in the DGIndex window to a Windows BMP file. When this option is selected, a file dialog will open that allows you to specify the desired name and location for the BMP file.
Preview, Play, Stop, Pause/Resume | Table of Contents |
Use these options to control video playback in the display window. Keyboard hotkeys are given in parentheses.
Play and Preview play only video and not audio.
The video playback speed is controlled by the playback speed control options available via the Options/Playback Speed menu.
The Play command does not decode frames prior to the current position to obtain reference frames, so you may see macroblocking on the first few frames of a Play operation if you jump around on the timeline. Note that this is purely a display quirk in DGIndex, it never occurs in the frame-served video or in demultiplexed video files.
Play and Preview automatically pop up the Information Panel.
Exit | Table of Contents |
Use this option to close all open files and terminate DGIndex.
Stream Menu | Table of Contents |
Detect PIDs: PAT/PMT | Table of Contents |
DGIndex can open transport streams. Transport streams can contain multiple programs, each of which contains audio and video streams. The Stream menu allows the user to list the programs and to select the desired program to be decoded. The stream menu is disabled if the input stream is not a transport stream. Transport streams periodically send data tables called the PAT/PMT tables that specify the programs and tags (PIDs) for the associated audio and video streams. By setting the PIDs for the desired audio and video streams, you thereby select the desired program.
Use the "Detect PIDs: PAT/PMT" option to list the programs and their associated streams, and to select the desired streams to be decoded. DGIndex will parse the first input file for the PAT/PMT tables and, if found, will display the programs and their PIDs in a list box. If PAT/PMT tables cannot be found, an error message will be shown instead, in which case the list box should be closed and the "Detect PIDs: Raw" option used instead.
To select the desired video stream, highlight it by selecting it with a mouse click. Then click on the "Set Video" button. To select the desired audio stream, highlight it by selecting it with a mouse click. Then click on the "Set Audio" button. When you have selected your PIDs, click on the "Done" button to close the list box. The video should now be displayed in the DGIndex window.
The PIDs are stored in the DGIndex.ini file and so will be retained across DGIndex sessions.
Note that selecting an audio stream as video, or vice versa, will produce undefined operation and may crash DGIndex. For that reason, both PIDs come up by default to 0x02, which is a reserved value. However, because the DGIndex.ini file retains PIDs from a previous session, you may run into this. If you get strange behavior or crashing, then manually set the audio and video PIDs to 0x02 using the "Set PIDs" option before loading your input file(s), and then detect and set your PIDs normally.
DGMPEGDec currently does not support audio-only streams. This will be fixed in a future version.
Detect PIDs: Raw | Table of Contents |
Rarely, a transport stream may lack PAT/PMT tables. In such cases, the PIDs of the audio and video streams can be displayed and selected using the "Detect PIDs: Raw" option. Because raw PID detection does not show which audio and video streams go together, some trial and error may be required to find which audio and video PIDs belong together (commonly encountered pairs of associated video/audio PIDs are 11/14, 21/24, and 31/34). For that reason "Detect PIDs: PAT/PMT" should always be tried first.
The operation of the "Detect PIDs: Raw" list box is the same as described above for the "Detect PIDs: PAT/PMT" list box.
Set PIDs | Table of Contents |
Use this option to manually specify PIDs using hexadecimal notation, or to query the selected PIDs. If you use this dialog to specify your PIDs, DGIndex will not detect PIDs and will simply use the specified PIDs to select the audio and video streams.
Note that selecting an audio stream as video, or vice versa, will produce undefined operation and may crash DGIndex. If you get strange behavior or crashing, then manually set the audio and video PIDs to 0x02 using the "Set PIDs" option before loading your input file(s), and then detect and set your PIDs normally.
Video Menu | Table of Contents |
iDCT Algorithm | Table of Contents |
Specify which iDCT algorithm will be used by DGIndex and DGDecode.
Algorithms that are not supported by your processor are automatically deleted from the menu, so you may not see all of the above options.
The iDCT algorithm that you should use depends primarily on what CPU you have, and to a lesser degree on the desired iDCT accuracy. All of the available options are IEEE-1180 compliant. For more infomation on iDCTs please see the DGDecode manual.
Quality: IEEE-1180 Reference > 64-bit Floating Point > Remaining iDCTs.
Speed: SSE2MMX is the fastest. IEEE-1180 Reference is the slowest.
Note that the selected iDCT algorithm is placed in the D2V file. DGDecode can be configured to use this setting (default) or it can be overridden via the "idct" parameter.
This setting is also stored in the DGIndex.ini file and therefore is saved across DGIndex sessions. If you edit the DGIndex.ini file, or the D2V file, to specify an iDCT algorithm that is not supported by your processor, then DGIndex and DGDecode will demote your setting to the next available setting that is supported by your processor.
Field Operation | Table of Contents |
MPEG2 video provides a syntax element (RFF flags) that allows a single field of any frame to be repeated automatically during display ("pulled down"). The extra fields do not occupy space in the MPEG2 stream but are simply created by copying when the stream is decoded and displayed. This facility is most often used to display film rate clips (23.976 fps) at the NTSC rate (29.97 fps), a process called 3:2 pulldown. In practice, however, pulldown in various different patterns is commonly encountered. It can be used, for example, to display 25 fps PAL at the NTSC rate. You can learn about telecining and pulldown at this web site.
Understanding the theory and practice required to properly set this option for a given application is nontrivial. Here we can only define the operations and give some general guidance. There is ample additional material available in existing guides.The Field Operation setting allows the user to specify how the pulldown (RFF) flags are to be handled.
The Field Operation is perhaps the most important option to understand when using DGIndex. Most users should first preview the project using the Honor Pulldown Flags option. If the clip is not PAL or MPEG1, and the Video Type field in the Information window indicates FILM 95% or higher, it is likely that the clip can be treated as 3:2 pulldown material, and so the Force Film option should be selected for generation of the D2V file.
If the percentage is much lower than 95% or the Video Type indicates an NTSC percentage, then you should leave this option set to Honor Pulldown Flags for generation of the D2V file. If the result is combed (because the source is interlaced, hybrid interlaced/3:2, field blended, etc.), you may want to apply a deinterlacer or inverse telecine (IVTC) filter in your Avisynth script.
If the film percentage is low but still mostly film, you can try using Force Film and see what you get. You may find some stray combed frames in the output. You can fix those by post-processing with FieldDeinterlace(full=false). If the result is satisfactory to you, then fine. If not, there are more advanced ways to handle hybrid, hard-telecined, field-blended, and other pathological video. These more advanced methods almost always require the video to be served with the Honor Pulldown Flags option.
When assessing the FILM percentage using a preview operation, it is important to use a lengthy portion of the film itself, because introductions and credits are sometimes rendered differently than the main movie content.
Almost invariably, if you know the source is not mostly 3:2 pulled-down NTSC, you will want to select Honor Pulldown Flags and then post-process as required. Keep in mind that if there are no pulldown flags, there is nothing to honor, so this option just delivers the encoded frames.
The Ignore Pulldown Flags option should be necessary only for advanced users who want to see just the exact coded pictures in the MPEG stream.
You should also read this article for additional information on using Force Film vs. external IVTC.
Note that the Honor Pulldown Flags option was formerly called None, and the Ignore Pulldown Flags option was formerly called Raw Encoded Frames.
YUV->RGB | Table of Contents |
When you use DGVfapi to frame serve, the video is always converted to RGB. This option specifies how the colorspace conversion to RGB is to be performed.
This option affects conversion to RGB, which occurs in only two places in DGMPGDec: 1) in the display window of DGIndex, and 2) the video served by DGVfapi. Generally, unless you have a good reason to clip the RGB, you should select the PC scale option.
Two well-known situations for using TV scale are as follows:
Luminance Filter | Table of Contents |
Use this option to perform luminance adjustments.
Use the checkbox in the upper right corner to Enable or Disable this filter. Position the Gamma and Offset sliders until desired results are achieved. DGIndex stores the luminance adjustment settings in the D2V file and DGDecode reads them and applies the same luminance adjustment to the served video, so that what you see in the DGIndex window is what you get in the served video.
Gamma performs a non-linear adjustment, while offset just adds or subtracts luminance for all the pixels. It is beyond the scope of this manual to describe the concept of gamma. Google is your friend.
This function is unrelated to, and should not be confused with, DGDecode's bundled Avisynth filter called LumaYV12().
Clipping | Table of Contents |
Use this option to crop your video.
Use the checkbox in the upper right corner to Enable or Disable this filter. Position the Horizontal and Vertical sliders until desired results are achieved. DGIndex stores the clipping settings in the D2V file and DGDecode reads them and applies the same clipping to the served video, so that what you see in the DGIndex window is what you get in the served video.
Audio Menu | Table of Contents |
Output Method | Table of Contents |
Use this option to control audio processing.
DGIndex can demultiplex the following types of audio: LPCM, AC3, MPA, DTS, AAC.
Only AC3 tracks can be decoded to WAV. Use an external audio utility, such as BeSweet,
to decode other audio types.
Demuxed audio files will be named after the project name and additional parameters of the audio
format.
For example: "MyProject T01 3_2ch 448Kbps DELAY -248ms.ac3".
An important number is contained in the filename of the demultiplexed audio file: the delay correction for the audio relative to the video. In the example above, the audio delay correction is reported as -248 milliseconds. That means that the audio should be advanced by 248 milliseconds. The number -248 could thus be entered directly into VirtualDub's "Audio Skew Correction" edit box to achieve audio/video synchronization. Note that when AC3 tracks are decoded to WAV, their filenames do not contain a delay correction value because the correction is applied during decoding.
Track Number | Table of Contents |
Use this option to select the audio track(s) to be operated on by Demux Tracks and Decode AC3 Track to WAV.
If Demux Tracks is selected, one or more tracks can be selected. If Decode AC3 Track to WAV is selected. only one track can be selected. If Demux All Tracks is selected, this option is ignored.
Dolby Digital Decode, 48 -> 44.1KHz, Normalization | Table of Contents |
[To Be Completed.]
Options Menu | Table of Contents |
Process Priority | Table of Contents |
Specify what CPU usage priority Windows will assign to DGIndex.
Use this option if you are running multiple applications at once, and want to prioritize (or de-prioritize) DGIndex for CPU usage.
Playback Speed | Table of Contents |
Specify the playback speed for play and preview operations.
The single step mode is controlled by the right arrow button (>) on the timeline. Please be aware that due to orphaned B frames, the first few frames of a playback operation, including a single-stepping operation, may show artifacts. They will not show up in the frame-served video, so don't worry! To ameliorate this effect, start your single-stepping operation a little bit ahead of the frames you desire to view. Also note that during a single-stepping operation, you cannot navigate on the timeline. To single-step from a new location, first exit the play operation, then reposition on the timeline in the normal way, and restart the play operation. Finally, single-stepping does not give you per-frame granularity for cuts and timeline positioning; it just allows you to pace the playback so that individual frames can be examined.
Force Open GOPs in D2V File | Table of Contents |
Rarely, a stream may be encoded incorrectly, such that the GOPs are marked as closed when they are really open. This can cause you to see blocking artifacts when doing random access in the frame-served video. To correct these cases, the Force Open GOPs in D2V File option is provided. When it is checked, GOPs are all marked as open in the D2V file, and the actual open/closed GOP indications in the stream are ignored. This cures the macroblocking but makes random access slower. Because the problem is so rare, and the cure reduces performance for normal streams, the cure is not applied automatically, but is presented as an option.
In practice, if you see blocking artifacts when doing random access while frame-serving, enable the Force Open GOPs in D2V File option and see if the blocking is fixed.
Note that this setting is stored in the DGIndex INI file.
Log Quant Matrices | Table of Contents |
When MPEG2 files are created, configurable data structures called quantization matrices are used to control how the video is compressed. Often, different matrices work better for different kinds of video. Power users often like to know what matrices have been used to encode their streams. This option allows you to dump all the quantization matrices found in the stream.
To dump the matrices, enable this option and then perform a Save Project operation. A text file will be created that contains the quantization matrices. For example, if your d2v file is named "movie.d2v", the dump file will be named "movie.quants.txt".
Note that this setting is not stored in the DGIndex INI file.
Tools Menu | Table of Contents |
Parse D2V | Table of Contents |
This tool is intended for power users. When selected, you are prompted to open a d2v file. After the d2v file is selected, a text file is created that contains an analysis of the contents of the d2v file, and the system's editor is opened on that text file. If your d2v file is named "movie.d2v", the text file will be named "movie.parse.txt". The contents of the text file will be readily understood by power users.
Fix D2V | Table of Contents |
Rarely, a stream will be encoded with illegal transitions of the TFF/RFF (pulldown) flags. This causes the served video to show incorrect field order in some sections. The perceptible result is that the frame-served video may be smooth, then it becomes jerky, then it becomes smooth again, then... The Fix D2V tool can be used to detect and fix such stream errors.
When this option is selected, you are prompted to open a d2v file. After the d2v file is selected, a text file is created that contains a dump of the illegal transitions found and the corrections that were made, and the system's editor is opened on that text file. If your d2v file is named "movie.d2v", the text file will be named "movie.fix.txt".
If no illegal transitions are found, a text file is not generated, and a message box informs you of that fact. In addition to the text file dump, and more importantly, if illegal transitions are found, a repaired copy of your d2v file is generated. If you then use the fixed d2v file in place of the original one for frame-serving, the field order problems will be cured. If your d2v file is named "movie.d2v", the fixed d2v file will be named "movie.d2v.fixed". The original d2v file is not altered.It is harmless to run Fix D2V on a correct d2v file, so it is a good practice to run it on all d2v files to ensure that they do not contain illegal transitions. A future version of DGIndex will do this automatically.
Help Menu | Table of Contents |
SIMD, DirectDraw Overlay, VFAPI Plug-In | Table of Contents |
These are read-only indicators displaying information about the status of DGIndex.
The DirectDraw Overlay indication is valid only after an input file is loaded.
The VFAPI Plug-In indication must be present; otherwise, VFAPI frame serving will not be operative.
Quick Start Guide, DGIndex User Manual, and DGDecode User Manual | Table of Contents |
These option open the respective documents in your browser. To work, the files "QuickStart.html", "DGIndexManual.html", "DGDecodeManual.html" that are included with this program must be in the same directory as the "DGIndex.exe" file. Do not rename these files.
Display Window | Table of Contents |
Navigation | Table of Contents |
Preview the video file(s) and select the start/end points for the project/demuxing.
Use the navigation slider, and these two buttons for navigation:
< - Seek to previous I frame.Currently, the display window displays only I frames in navigation mode (because they are possible selection points for cutting the video), which usually appear about every 12 to 15 frames. This makes the video appear to jump when stepping, instead of moving smoothly. Of course, during play, preview, or frameserving, all frames are shown.
The video may in some cases appear stretched/squashed in the display window because DGIndex displays the video as is it stored in the MPEG stream, which may not be the same as the final display size. For an explanation, read Doom9's article on Aspect Ratios.
When a video is displayed that has a frame size that will not fit on a 1024x768 desktop, the video is reduced in size by a factor of two. Thus, high-definition (HD) videos can be previewed without requiring scrolling.
Selection | Table of Contents |
When doing Save Project, Save Project and Demux Video, or Preview, the operation will be applied only to the portion of the timeline between the selected start and end points.
By default, the entire timeline is automatically selected. Selection start/end point can be changed, but only one set of start/end point may be specified for a project (i.e.: multiple start/end points are not yet supported).
Splash Screen | Table of Contents |
When no file is loaded the DGIndex window displays a default splash screen. If you prefer to have a different splash screen, place an appropriately sized windows BMP file called "splash.bmp" in the same directory as DGIndex.exe.
Information Panel | Table of Contents |
The Information Panel displays important statistics about the loaded video and audio stream(s). Information displayed in this panel is often essential for correctly processing DGIndex projects, especially when frameserving into third-party applications. The Information Panel is displayed when a project is saved or when using the Play/Preview commands. Note that when doing a Play/Preview operation, the information will apply only to the section actually played or previewed.
Video Section | Table of Contents |
Audio Section | Table of Contents |
Status Section | Table of Contents |
APPENDIX A: D2V File Structure | Table of Contents |
This Appendix documents the syntax and semantics of the D2V file format. Normal users need not concern themselves with this information, as it intended for developers and power users.
There are three sections to all D2V files: 1) the header section, 2) the settings section, and 3) the data section. These sections are described below.
D2V Format - Header Section | Table of Contents |
Following is a typical header section:
DGIndexProjectFile11
3
G:\RETURN_OF_THE_KING\VIDEO_TS\VTS_01_1.VOB
G:\RETURN_OF_THE_KING\VIDEO_TS\VTS_01_2.VOB
G:\RETURN_OF_THE_KING\VIDEO_TS\VTS_01_3.VOB
The first line always begins with the string "DGIndexProjectFile" immediately followed by a two-digit D2V version number. This number is checked by DGDecode and must match the version expected. This mechanism thus enforces the requirement that DGIndex and DGDecode must be used in matched pairs. If DGDecode rejects your D2V file as "obsolete", be sure that you are using the correct version of DGDecode. Sometimes one forgets that one has an older version in the Avisynth plugins folder, or one forgets to upgrade DGDecode when upgrading DGIndex.
The second line gives the number of video files included in the D2V project file. Each video file must be referenced on the subsequent line(s). The header section must then terminate with a blank line.
Each source file reference consists the absolute path of the referenced file. If the referenced files are moved after creation of the D2V file, you must either edit the paths to be correct, or you must re-generate your D2V file.
In the remainder of the D2V file, the files are referenced with a number corresponding to their place in this list. The list is zero-based, that is, the first file is numbered 0.
D2V Format - Settings Section | Table of Contents |
Following is a typical settings section:
Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=5
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=4:3
Picture_Size=720x480
Field_Operation=0
Frame_Rate=29970
Location=0,0,6,17CF3
The second section of a D2V file defines values that are determined by, or within, DGIndex. Some are determined by DGIndex as it analyzes the MPEG stream, others reflect user-specified choices. All of these fields must be explicitly defined, even if the associated value is zero. The settings section also must terminate with a blank line.
If the stream type is set to 2 (transport stream) then an additional line is appended after the Stream_Type line:
MPEG2_Transport_PID=880,881
Settings determined automatically by DGIndex are: Stream_Type, MPEG_Type, Aspect_Ratio, Picture_Size, and Frame_Rate (although the user-defined Field_Operation does have an impact on the Frame_Rate value).
The remaining settings are are user-defined within DGIndex: MPEG2_Transport_PID,iDCT_Algorithm, YUVRGB_Scale, Luminance_Filter, Clipping, Field_Operation and Location.
The following table describes each of these parameters and the range of values possible for each.
D2V Field | Possible Values | Definition/Comments |
---|---|---|
Stream_Type | (0) Elementry Stream (1) Program Stream (2) Transport Stream (3) PVA Stream | Defines the type of MPEG stream. Determined by DGIndex. All possible values listed. |
Transport PIDs | (Video PID, Audio PID) | Selects the video/audio PIDs to be decoded. User-specified. Appears only for Stream_Type 2. |
MPEG_Type | (1) MPEG-1 (2) MPEG-2 | Defines the type of MPEG stream. Determined by DGIndex. All possible values listed. |
iDCT_Algorithm | (1) 32-bit MMX (2) 32-bit SSEMMX (3) 32-bit SSE2MMX (4) 64-bit Floating Point (5) 64-bit IEEE-1180 Reference (6) 32-bit SSEMMX (Skal) (7) 32-bit Simple MMX (XviD) | Defines the iDCT DGDecode will use to decode this video. User-specified. All possible values listed. |
YUVRGB_Scale | (0) TV Scale (1) PC Scale | Defines the range DGDecode will use if RGB conversion is requested. User-specified. All possible values listed. |
Luminance_Filter | (Gamma, Offset) | Defines values for DGIndex's Luminance_Filter. User-specified. Both Gamma and Offset have a range of: +/- 256. This parameter is unrelated to DGDecode's LumaFilter. |
Clipping | (ClipLeft, ClipRight, ClipTop, ClipBottom) | Defines values for Clipping (aka: Cropping) lines of video. User-specified. Arbitrary values possible within the resolution of the video. |
Aspect_Ratio | MPEG2: (1:1) (4:3) (16:9) (2.21:1) MPEG1: (1:1) (0.6735) (16:9,625) (0.7615) (0.8055) (16:9,525) (0.8935) (4:3,625) (0.9815) (1.0255) (1.0695) (4:3,525) (1.575) (1.2015) | Defines the Aspect Ratio of the video specified in the MPEG stream. Determined by DGIndex. All possible values listed. |
Picture_Size | (widthxheight) | Defines the size of the video after clipping has been applied. Determined by DGIndex. Arbitrary values possible within the size of the loaded video. |
Field_Operation | (0) Honor Pulldown Flags (1) Force Film (2) Ignore Pulldown Flags | Defines values for Field Operation. User-specified. All possible values listed. |
Frame_Rate | (rate) | Defines output framerate * 1000. |
Location | (StartFile,StartOffset,EndFile,EndOffset) | Defines start and end points for the video selection range. User-specified. |
D2V Format - Data Section | Table of Contents |
Following is a typical data section (real ones will typically be much longer):
d00 6 0 0 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 384035 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 768034 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 1152609 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 1537064 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 1922483 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 2304616 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 2689746 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 3075088 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 3459597 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 3844802 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 4227419 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 4613561 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 4996887 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0 ff
FINISHED 0.00% FILM
The data section of a D2V file contains the indexing of the MPEG video stream. There is one line for each I picture in the MPEG stream. Each line describes that I picture as well as all the following pictures up to, but not including, the next I picture.
Each I picture line consists of seven fields that must be explicitly defined, even if the associated value is zero. The layout for each line is as follows:
info matrix file position vob cell flags ...
Therefore, the second line in the typical data section given above would break down as follows:
info | matrix | file | position | vob | cell | flags |
---|---|---|---|---|---|---|
d00
| 6
| 0
| 384035
| 0
| 0
| b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
|
The following section describes each field of an I picture line and its range of possible values.
The info field is a 12-bit hex number bit-mapped as follows:
Bit Position | Definition/Comments |
---|---|
bit 11 | 1 (Always 1 to signal start of data line) |
bit 10 | 1 (This line's pictures are part of a closed GOP) 0 (Open GOP) |
bit 9 | 1 (This line's pictures are part of a progressive sequence) 0 (Otherwise) |
bit 8 | 1 (This I picture starts a new GOP) 0 (Otherwise) |
bits 7-0 | 0 (Reserved) |
The matrix field displays the currently applicable Matrix_Coefficient value (colorimetry).
The file field references the file (as defined in the beginning of the D2V file) containing this line's pictures.
The position field is a decimal number that points to the byte position in the source file at which decoding of the indexed I picture should begin. For non-packetized streams, if a sequence header is present it is indexed, otherwise the picture header is indexed. Packetized streams are treated the same way except that the packet header start code preceding the sequence header or picture header is indexed. We prefer to index sequence headers because they may carry new quant matrices, but they are not mandatory at each GOP, so we fall back to the picture header.
The vob and cell fields display the current position within the DVD navigation stream (private stream 2). The VOB and CELL numbers are taken from there. Not applicable for non-DVD sources.
The sequence of Flags fields contains per-picture data corresponding to the pictures in display
order, that is, the Flags fields are re-ordered into display order. End Of Stream is signaled with a Flags field
value of ff
. Each per-picture Flags field is an 8-bit hex number bit-mapped as follows:
Bit Position | Definition/Comments |
---|---|
bit 7 | 1 (Picture is decodable without the previous GOP) 0 (Otherwise) |
bit 6 | Progressive_Frame Flag (See notes below) 0 (Interlaced) 1 (Progressive) |
bits 5-4 | Picture_Coding_Type Flag 00 (Reserved) 01 (I-Frame) 10 (P-Frame) 11 (B-Frame) |
bits 3-2 | 00 (Reserved) 01 (Reserved) 10 (Reserved) 11 (Reserved) |
bit 1 | TFF Flag |
bit 0 | RFF Flag |
Notes on Progressive_Frame Flag: This specifies that the picture is part of a frame (either a frame picture making up the entire frame, or a field picture making up one of the fields of the frame) whose fields are sampled at one moment. A RFF flag may be present however, such that the displayed frame after pulldown is interlaced.
Command-Line Interface | Table of Contents |
Parameters | Table of Contents |
DGIndex can also be executed via a command-line interface. This feature is intended for use in automated scripts and batch files, and for use by third-party applications. Following is the syntax and semantics for the command line interface. Note that options not included are controlled by DGIndex defaults and the DGIndex INI file.
Parameter | Command-Line Flag | Definition/Comments |
---|---|---|
Set Delimiter | -SD=delimiter character | Set the delimiter character. For some applications, the [ and ] characters are used in filenames. In such cases, you can use the -SD option to set a different delimiter character. The -SD option must precede any other options that use a delimiter. |
Input Files | -IF=[file1,file2,file3,...] | Load specific files. If a specified file cannot be found, it is ignored. Brackets Required! |
Auto-Input Files | -AIF=[file1] | Autoload files incrementally. If a specified file cannot be found, it is ignored. Brackets Required! |
Batch Files | -BF=[filelist] | Load a batch of files. The filelist should be a plain text file listing one file per line with no extra white space. If a specified file cannot be found, it is ignored. Brackets Required! HINT: The following DOS command automatically generates a filelist: DIR *.VOB /B > FILELIST |
Audio PID | -AP=audioPID | Transport stream audio PID, hex notation. (e.g., -AP=14) |
Video PID | -VP=videoPID | Transport stream video PID, hex notation. (e.g., -AP=11) |
iDCT Algorithm | -IA=algorithm | 1=MMX, 2=SSEMMX, 3=SSE2MMX, 4=64-bit Floating Point, 5=IEEE-1180 Reference, 6=Skal MMX, 7=Simple MMX |
Field Operation | -FO=field operation | 0=Honor Pulldown Flags, 1=Force Film, 2=Ignore Pulldown Flags |
YUV->RGB | -YR=method | 1=PC Scale, 2=TV Scale |
Track Number | -TN=track(s) | track#,track#,track#,... Use a comma-separated list of tracks. If OM=3 (Decode), only one track must be listed. |
Output Method | -OM=method | 0=None, 1=Demux Tracks, 2=Demux All Tracks, 3=Decode AC3 to WAV |
Dynamic Range Control | -DRC=amount | 0=Off, 1=Light, 2=Normal, 3=Heavy |
Dolby Surround Downmix | -DSD=on/off | 0=Off, 1=On |
Downsample Audio (48->44.1 kHz downsample) | -DSA=method | 0=None, 1=Low, 2=Mid, 3=High, 4=Ultrahigh |
Output File | -OF=[project file] | Do Not Include Extension! Brackets Required! |
Output File and Demux | -OFD=[project file] | Same as -OF but also demux the video. Brackets Required! |
Exit | -EXIT | Exits DGIndex when project has been saved. |
Example | Table of Contents |
This example...
DGIndex -IA=2 -FO=2 -TN=2,5 -OM=1 -AIF=[d:\files\vts_02_1.vob] -OF=[d:\MyProject] -exit
will save a project file to "d:\MyProject.d2v", specifying:
Auto-Input Files = "[d:\files\vts_02_1.vob]"
Output File = "[d:\MyProject]"
iDCT = "SSEMMX"
Field Operation = "Ignore Pulldown Flags"
Output Method = "Demux"
Track Numbers = "2 and 5"
EXIT
Here is an example that uses the ! character:
DGIndex -FO=2 -TN=1 -OM=1 -SD=! -IF=!D:\vobfiles\vts_02_1.vob! -OF=!d:\MyProject! -exit
Note that if you process the CLI line with a DOS shell (e.g., in a batch file), then the specified delimiter character must not be a DOS special character. If you invoke DGIndex using CLI programmatically, then DOS special characters can be used, because the DOS shell does not get involved.
Credits | Table of Contents |
License | Table of Contents |