What is DGIndexNV? | Table of Contents |
DGIndexNV, part of the DGDecNV package, is primarily designed to create an index of an AVC/MPG/VC1 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 DGDecodeNV to provide frame-accurate serving of the video via an Avisynth script. DGIndexNV can currently open elementary streams (e.g., 264, m2v, and vc1), program streams (e.g., mpg and vob), transport streams (ts and m2ts), Matroska (mkv) streams, and MP4 streams (mp4).
The "NV" in the name "DGIndexNV" indicates that this version of the program is designed for use with the VP2 (or later) GPU decoder on some Nvidia video cards. Consult the following table to determine which cards support DGDecNV. If the card shows VP2 or later for the PureVideo HD, then DGDecNV can be used with the card.
Table of Nvida GPUsYou can get the latest binaries of DGDecNV at http://rationalqm.us/dgdecnv/dgdecnv.html.
This document is a reference manual for DGIndexNV. Please refer to the accompanying documents for quick start information, frequently asked questions, and guidance on actual usage of DGIndexNV in typical scenarios.
File Menu | Table of Contents |
Open | Table of Contents |
Use this option to open the source media file(s) (elementary, program, transport, and Matroska streams only). You can also open BluRay MPLS playlist files (see below).
Clicking on File\Open causes one of two things to happen:
If no files have yet been selected, the Open dialog will appear.
Click "Open" to proceed to the File List dialog.
If a file has already been selected, the File List dialog will open.
Files can also be opened by dragging-and-dropping them onto the DGIndexNV window, and files can also be loaded by dragging-and-dropping them onto a desktop shortcut icon. Finally, files can also be opened by means of the most-recently-used list on the File menu.
Multiple files can be opened at once but they are expected to be fully compatible, e.g., a series of vob files, or a series of transport stream files. When opening multiple files, the File List dialog allows you to specify the order of appearance of the files in the resulting overall timeline.
You can also open BluRay MPLS playlist files. The decrypted BDMV folder must exist on your hard drive. Open an MPLS file in the BDMV/PLAYLIST directory. If multiple angles are present you are prompted for the angle. The required M2TS files are automatically loaded in order. You can use a tool such as BDInfo to help you to determine the correct MPLS file to open to get the main movie. In some cases where the playlist specifies many M2TS files audio/video sync can drift off due to the joints between files. DGIndexNV automatically corrects this in demuxed AC3 files only. Support will be added for additional audio types in future versions. Consider using EAC3TO to demux your audio if you require sync correction for audio types other than AC3.
Load Project | Table of Contents |
Use this option to open existing DGIndexNV (dgi) project files.
When a project file is loaded, DGIndexNV opens the project's source file(s) and restores the following settings from the project file:
Close | Table of Contents |
Use this option to close all open input files.
Output Trimmed TS | Table of Contents |
This option will output a transport stream file delimited by the project's range. Note that this is a rudimentary function intended for advanced users who understand its limitations. If you cut at an open GOP, or instance, then you will get macroblocking at the start. Any orphaned frames can be mitigated in your Avisynth script using FreezeFrame().
Here's a little tip for those lacking the creative juices to figure it out themselves. Suppose you want to cut two or more segments from a stream and have them appended together to make an edited stream (a common example is deleting commercials). Set the project range for the first segment (that you want to keep!) and save the output file. Now set the next project range and save that, but this time specify the same file and answer the dialog box with the append option. Continue this way until you have saved all your segments.
For best performance, output to a file on a physical disk different from the disk where the source files reside.
Save Project | Table of Contents |
Use this option to generate a DGIndexNV project file (dgi file). The project file is used by DGDecodeNV to frame-serve the video via Avisynth.
DGIndexNV builds a project file containing the path to the source file, the video settings, and indexing information. For more information on the structure of dgi files, refer to Appendices A-C.
Generation of the project file can take several minutes depending on the size of the project and the speed of your computer.
Save Project and Demux Video | Table of Contents |
Use this option to generate a DGIndexNV project file (dgi file) as described in the section "Save Project" above, and at the same time demultiplex the video to a separate elementary stream file. Elementary stream files are sometimes needed for use with other applications. DGIndexNV provides this functionality as a convenient tool for the sophisticated user; it is not required for frame serving via DGDecodeNV.
The elementary stream file will be generated in the same directory as the project (dgi) file, and its name will be created depending on the type of the source file. If the source file is an elementary stream (ES), the base name of the project file is concatenated with ".demuxed.avc", ".demuxed.m2v", or ".demuxed.vc1" (depending on the video type). For example, if the project file is named "movie.dgi", the elementary stream file will be named "movie.demuxed.avc" (for AVC video). If the source file is not an ES, then the "demuxed." is omitted. The inclusion of "demuxed." when the source file is an ES prevents possible overwriting of the source file.
Save BMP | Table of Contents |
Use this option to save the current frame on display in the DGIndexNV 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.
Note that this option saves the cropped frame in its original size, e.g., if the frame is reduced by two for display that will not be effective for the saved BMP, although the configured cropping will be honored. This means that the frame will be saved as it will be served via your Avisynth script.
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.
When you are stopped on the timeline (not performing a Play or Preview operation), then you may use the < and > arrows to step by GOPs on the timeline. When you start a Play or Preview you enter a decoding mode that plays the video.
The Play/Preview commands decode and display all frames from the starting point, i.e., they do not suppress orphaned frames. if any, at the start of the GOP. So you may see macroblocking on the first few frames of a Play/Preview operation if your stream has open GOPs. Note that this is purely a display matter in DGIndexNV; it never occurs in the frame-served video or in demultiplexed video files. While such frames could have been suppressed, DGIndexNV is intended for analysis and not playback; it can be useful to operate this way because one can easily identify open GOPs in the stream. Note that when navigating on the timeline when stopped, orphaned frames are suppressed.
The video playback speed is controlled by the playback speed control options available via the Options/Playback Speed menu.
Play and Preview automatically pop up the Information Panel.
Exit | Table of Contents |
Use this option to close the source file(s) and terminate DGIndexNV.
Stream Menu | Table of Contents |
Detect PIDs: PAT/PMT | Table of Contents |
DGIndexNV 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 PID for the desired video stream, you thereby select the desired program to decode. Note that only the video and PCR PIDs can be set in this menu. Use the "Audio/Audio Demux" option to set audio PIDs.
Use the "Detect PIDs: PAT/PMT" option to list the programs and their associated streams, and to select the desired video stream to be decoded. DGIndexNV will parse the 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 PCR stream, highlight it by selecting it with a mouse click. Then click on the "Set PCR" 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 DGIndexNV window.
The PIDs are stored in the DGIndexNV.ini file and so will be retained across DGIndexNV sessions.
Note that selecting an audio stream as video will produce undefined operation and may crash DGIndexNV. For that reason, the video PID comes up by default as 0x02, which is a reserved value. However, because the DGIndexNV.ini file retains PIDs from a previous session, you may run into this. If you get strange behavior or crashing, then manually set the video PID to 0x02 using the "Set PIDs" option before loading your input file, and then detect and set your video PID normally.
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 the video and PCR PIDs using hexadecimal notation, or to query the selected PIDs. If you use this dialog to specify your PIDs, DGIndexNV will not detect PIDs and will simply use the specified PIDs to select the video and PCR streams. Note that only the video and PCR PIDs can be set in this menu. Use the "Audio/Audio Demux" option to set audio PIDs.
Note that selecting an audio stream as video will produce undefined operation and may crash DGIndexNV. For that reason, the video PID comes up by default as 0x02, which is a reserved value. However, because the DGIndexNV.ini file retains PIDs from a previous session, you may run into this. If you get strange behavior or crashing, then manually set the video PID to 0x02 using the "Set PIDs" option before loading your input file, and then detect and set your video PID normally.
Video Menu | Table of Contents |
Enable PureVideo Deinterlacer | Table of Contents |
Use this option to enable/disable the Nvidia PureVideo deinterlacer. If you have HD video, you will have to enable the Display HD Full Sized option to see the effects of the deinterlacer in DGIndexNV.
Check Single Rate to enable classical deinterlacing, where the number of output frames is the same as the number of input frames.
Check Double Rate to enable bobbing, where each field of an input frame generates a full frame in the output. Note 1: Double rate deinterlacing requires Windows XP Service Pack 3! Note 2: Double Rate deinterlacing here is intended only to show how the video will look when served with DGSource(deinterlace=2), so some of the Info dialog fields (such as frame rate and playback frame count) are not adjusted to reflect the double rate.
Check Use progressive_frame if you want the deinterlacing to honor NVCUVID's progressive_frame indication.
If single or double rate deinterlacing is enabled and this option is checked,
then only frames marked as interlaced by NVCUVID will be deinterlaced.
If single or double rate deinterlacing is enabled and this option is not checked,
then all frames will be deinterlaced.
The option is stored in the INI file.
Display HD Full Sized | Table of Contents |
Use this option to display HD video at full size instead of shrunk by half. This can be useful for inspecting your video, because interlacing cannot be seen when video is shrunk by half.
The option is not stored in the INI file.
Disable Display | Table of Contents |
This option is intended for getting an idea of the performance of the GPU's decoding engine. When this option is enabled, all display operations are disabled except for one: the FPS field of the Info dialog is updated. If you load your stream, select this option, and start a preview, the FPS field will show the raw decoding rate of the GPU decoder as implemented in DGIndexNV. Note that the conversion from YV12 to RGB24 used when display is enabled is very CPU intensive. So if you want to assess the frame rate and CPU utilization of the GPU decoder, it is necessary to disable the display.
Cropping Filter | Table of Contents |
Use this option to crop your video.
Use the checkbox in the upper left corner to Enable or Disable this filter. Position the Left, Right, Top, and Bottom controls until desired results are achieved.
The Auto Crop buttons can be used to automatically crop away black bars (letterboxing and pillarboxing). Auto Crop mod 4/8/16 will enforce at least mod 4/8/16, respectively, for the resulting width and heigth. For best results, navigate to a frame with high contrast between the video and the black bars before entering the cropping dialog.
DGIndexNV stores the cropping settings in the DGI file and DGDecodeNV reads them and applies the same cropping to the served video, so that what you see in the DGIndexNV window is what you get in the served video.
Copy Frame to Clipboard | Table of Contents |
Use this option to copy the frame on display to the clipboard. It may then be pasted into suitable graphics applications.
Note that this option saves the cropped frame in its original size, e.g., if the frame is reduced by two for display that will not be effective for the saved BMP, although the configured cropping will be honored. This means that the frame will be saved as it will be served via your Avisynth script.
Audio Menu | Table of Contents |
Audio Demux (Transport Streams) | Table of Contents |
DGIndexNV can open transport streams. Transport streams can contain multiple programs, each of which contains audio and video streams. The Audio Demux menu allows the user to select audio streams to be demultiplexed when a Save Project operation is performed. The following audio types are currently supported: MPEG audio, AAC ADTS audio, AAC LATM/LOAS, AC3 audio, DTS audio, and LPCM audio. Additional formats will be added as test streams are received.
The "Available audio streams" listbox lists the audio streams that were detected. To select an audio stream for demultiplexing, highlight it by selecting it with a mouse click. Then click on the "Set" button. The stream's PID will be added to the list in the "Audio streams to demux" listbox. To remove a stream from the list, highlight it and then click on the "Clear" button. Use the "Set All" and "Clear All" buttons to add or remove all the available audio streams, respectively. When you have selected your audio PIDs, click on the "Done" button to close the menu. Now subsequently, when you perform a Save Project operation, the selected audio streams will be demultiplexed. Also, if you do a Preview or Play operation, the detected audio streams will be listed on the Info dialog.
Demuxed audio files will be named after the project name and additional parameters of the audio format. For example: "arte.hd PID 083 L2 2ch 48 128 DELAY -27ms.mp2".
The DELAY value reported is the required adjustment for the demuxed audio elementary stream to retain sync with the video. As it is not obvious why this delay exists and how to interpret the sign of the number, I offer the following explanation. The delay arises because demuxing elementary streams may not hit the same PTS (Presentation Time Stamp) values for the audio and video at the point in the stream where demuxing begins. (The PTS is a number that says when that audio or video access unit is to be displayed.) There is no guarantee in a stream that access units for audio and video with the same presentation times will be close together. So, for example, if we demux and find that the first video PTS is 7 and the first audio PTS is 3, then if we start playing both together immediately, we will have the video playing too early relative to the audio, so we need to move up the audio in time by -(7 - 3) = -4. So, a positive delay means you have to delay the audio, and a negative delay means you have to advance the audio.
When LPCM is demuxed from a transport stream, usually an M2TS (Blu-Ray) stream, the raw PCM is stored in the output file. You can convert this to a standard wave file using the popular SOX audio processor tool, which you can get here:
http://sourceforge.net/projects/sox/A typical command line would be as follows (although you need to check your audio parameters in the Info dialog to choose the correct SOX options):
sox -B -r48000 -t .raw -c 6 -2 -s "Blu-ray PCM PID 1101 DELAY 0ms.pcm" "out.wav"A future version of DGIndexNV may integrate WAV packaging functionality to eliminate the need for SOX.
It is possible that audio streams are declared in the PAT/PMT tables but are not actually present in the source file, in which case demultiplexing them will fail to produce demultiplexed files. You can test for the actual presence of declared streams by doing a Preview operation. If the streams are actually present they will be listed on the Info dialog.
You can permanently disable audio detection (during play/preview) and demuxing by unchecking the "Enable audio processing" checkbox. If you want to temporarily disable demuxing while retaining detection, you can clear the "Audio streams to demux" list.
Only the "Enable audio processing" setting is stored in the DGIndexNV.ini file.
Audio Demux (Matroska Streams) | Table of Contents |
DGIndexNV can open Matroska streams. Matroska streams can contain multiple audio tracks. The Audio Demux menu allows the user to select and demultiplex the desired audio track. The following audio types are currently supported: MPEG audio, AAC ADTS audio, AC3 audio, DTS audio, FLAC audio, and VORBIS audio. Additional formats will be added as test streams are received.
The "Available audio streams" listbox lists the audio tracks that were detected in the Matroska file. To select an audio stream for demultiplexing, highlight it by selecting it with a mouse click. Then click on the "Demux" button. You will prompted to specify the destination file to receive the demultiplexed audio. After you have specified the file, the audio track will be demultiplexed immediately. The progress of the operation is displayed by the progress bar.
The demultiplexing operation honors the project range settings made via the [ and ] buttons.
No audio delay value is reported because the video and audio are always demultiplexed starting at the same timecode in the Matroska file.
Options Menu | Table of Contents |
Loop Playback | Table of Contents |
When this option is selected and playback during a Preview or Play operation reaches the end of the timeline, playback will automatically start again at the beginning of the timeline.
Playback Speed | Table of Contents |
Specify the playback speed for play and preview operations.
Process Priority | Table of Contents |
Specify what CPU usage priority Windows will assign to DGIndexNV.
Use this option if you are running multiple applications at once, and want to prioritize (or de-prioritize) DGIndexNV for CPU usage.
Use Full Paths | Table of Contents |
DGI files and AVS files created via an AVS template contain references to files. This option controls whether they should be stored as relative paths or full paths. When this option is disabled, the DGI file and generated AVS scripts will suppress the full path information and provide just the relative paths; everything is relative to the location of the DGI file.
The option to continue using full paths was retained to provide backward compatibility to third-party applications.
This option setting is stored in the INI file and so is retained across DGIndexNV invocations.
Always Crop 1088->1080 | Table of Contents |
When enabled, if the stream specifies bottom cropping, the cropping will be honored without asking the user. Also, if the stream does not specify cropping, but the coded height is 1088, then 8 pixels will be cropped from the bottom without asking the user. If disabled, the user will be prompted for what to do in both these cases. When invoked via the CLI, the option is enabled, i.e., no prompting is performed.
This option setting is stored in the INI file and so is retained across DGIndexNV invocations.
Response to Mismatched Audio | Table of Contents |
If DGIndexNV detects that the type of an audio stream as declared in the PAT/PMT differs from the type actually detected in the stream, then the desired behavior is determined by the state of this option.
This option setting is stored in the INI file and so is retained across DGIndexNV invocations.
AVS Template | Table of Contents |
DGIndexNV can automatically generate an Avisynth script for serving your project. It requires you to specify a template file, such as the following one:
loadplugin("...\DGDecodeNV.dll")
loadplugin("...\Decomb.dll")
dgsource("__vid__")
fielddeinterlace()
This is any normal AVS script, except that the DGI file name is replaced with __vid__ (that's two underscores before "vid" and two after). When DGIndexNV creates the AVS script, it replaces __vid__ with the correct DGI file name.
To select and enable a template, use the Options/AVS Template pulldown menu item to set your template file as the active template file. After performing a Save Project operation, DGIndexNV uses this file as a template and inserts the right file name whenever it sees __vid__.
You may also use the __aud__ specifier to generate the audio file name. Note that if you are generating more than one audio file, this specifier will refer to the first audio file that is opened. Therefore, to be sure to get the desired audio file, process just one audio stream.
You may also use the __del__ specifier to generate the delay value for use in DelayAudio(__del__).
DGIndexNV creates the AVS script file only if it does not already exist or if the 'Overwrite existing script' box is checked. The script file is created in the same directory as the DGI file.
The AVS Template dialog box displays the current active template folder and the current active template file.
If the 'Enable template' box is unchecked, the template file will not be created.
After a template directory is specified, the AVS Template drop-down menu will list all AVS files in that directory. You may select one of these listed files to specify that file as your active template file. The active template file is checked. This is a convenience feature to allow easy selection of the desired template file.
The option settings are stored in the INI file and so are retained across DGIndexNV invocations. When an INI file is not present, the AVS Template path defaults to a file named "template.avs" and located in the same directory as that of the executed DGIndexNV.exe.
Enable Info Log | Table of Contents |
When the Enable Info Log option is checked and the Information Panel is closed, either manually or automatically by DGIndexNV, a log file is created that contains the information displayed in the Information Panel at the time of closure. The file name used is that of the input file with the extension changed to "log". The log file is created in the same directory as the input file. If this directory is not writable, then the log file is not created.
This option setting is stored in the INI file and so is retained across DGIndexNV invocations.
Log Timestamps | Table of Contents |
This option allows you to dump a trace of the audio and video PTS/DTS timestamps encountered when a Save Project operation is performed. This is an advanced feature for expert users and so how to interpret this dump is not described here. For transport streams, the PCRs encountered on the configured PCR PID are also logged, and for program streams the SCRs are logged.
To dump the timestamps, enable this option and then perform a Save Project operation. A text file will be created that contains the timestamp trace. For example, if your index file is named "movie.dgi", the dump file will be named "movie.timestamps.txt".
The timestamps are presented in native syntax units, and in brackets divided by 90 (so the time unit is milliseconds). E.g.:
PCR 237636675 [2640407 ms]
Note that this option setting is not stored in the DGIndex INI file.
List GPU Devices | Table of Contents |
This option allows you to display a list of the available CUDA-enabled GPU devices together with their ordinal numbers. The active GPU device is marked with '>'. You can force DGDecNV to use a specific GPU device by means of the CUDA_Device auxiliary INI file option. Refer to Appendix E for details.
Help Menu | Table of Contents |
DGDecNV Quick Start Guide, DGIndexNV User Manual, and DGDecodeNV User Manual | Table of Contents |
These options open the respective documents in your browser. To work, the files "QuickStart.html", "DGIndexNVManual.html", "DGDecodeNVManual.html" that are included in the DGDecNV package must be in the same directory as the "DGIndexNV.exe" file. Do not rename these files.
Display Window | Table of Contents |
Navigation | Table of Contents |
Use the navigation slider, and these two timeline buttons for navigation by GOP:
Solid left-pointing arrow button - Seek to previous GOP.Currently, the display window displays only the first frame of a GOP in navigation mode (because they are possible selection points for cutting the video). This makes the video appear to jump when stepping, instead of moving smoothly. Of course, during play, preview, or frameserving, all frames are shown.
When "scrubbing" using the navigation slider, the movement of the cursor may seem curious. When you move the mouse and let go, or you click and drag and then pause without releasing the click, DGIndeNV starts decoding forward from that point, displays the first decodable frame (at the start of the next GOP), and then positions to that point. That may not be the place where you let go or paused, and this will be obvious when there are just a few GOPs on the timeline. This is by design. The idea is that the bar should be positioned at the start of the GOP on display.
The mouse scrollwheel is supported. When you are not in play/preview mode, the scrollwheel will act as do the right and left arrow keys, i.e., it will effect GOP stepping.
The video may in some cases appear stretched/squashed in the display window because DGIndexNV displays the video as is it stored in the video 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 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).
Play/Preview | Table of Contents |
For the 32-bit executable, the conversion from YV12 to RGB for display is implemented with the following attributes: coefficients that are dynamically set based on the stream's colorimetry (usually Rec601 or Rec709), progressive scan, and TV scale. For the 64-bit executable, in order to provide a fast pure C language implementation, the conversion is implemented with the following attributes: fixed coefficients, progressive scan, and PC scale (this will be corrected in a future version). This affects only display in DGIndexNV; YV12 is served out of DGSource(). Conversions (if needed) for the served video are implemented in your Avisynth script.
Frame Step Mode | Table of Contents |
The Frame Step Mode is a useful mode of operation that allows you to single step through the frames starting from the current timeline position. The Information Panel is updated as you step, providing useful stream and per-frame information.
The Frame Step Mode is controlled by the step button. Note that during a frame-stepping operation, you cannot navigate on the timeline. To exit the Frame Step Mode, use the stop button, use File/Stop, or hit ESC.
The mouse scrollwheel is supported. When you are in frame step mode, the scrollwheel will act as does the frame step button, i.e., it will single-step by frame.
To frame-step from a new location, first exit the operation, then reposition on the timeline in the normal way, and restart the frame-step operation. Finally, frame-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.
Splash Screen | Table of Contents |
When no input file is loaded DGIndexNV can display a splash screen. To enable this feature, place an appropriately sized windows BMP file called "dgindexnv.bmp" in the same directory as DGIndexNV.exe. Several sample BMPs are available from the DGDecNV home page.
Information Panel | Table of Contents |
The Information Panel displays important statistics about the loaded video stream. Information displayed in this panel is often essential for correctly processing DGIndexNV 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.
When the Enable Info Log option is checked and the Information Panel is closed, either manually or automatically by DGIndexNV, a log file is created that contains the information displayed in the Information Panel at the time of closure. The file name used is that of the input file with the extension changed to "log". The log file is created in the same directory as the input file. If this directory is not writable, then the log file is not created.
The Information panel can be docked to the main DGIndexNV window by placing the right edge of the main window close to the left edge of the Information panel. They will snap together. If you want to separate them, just move the Information panel away from the main window.
Video Section [AVC] | Table of Contents |
Video Section [MPG] | Table of Contents |
Video Section [VC1] | Table of Contents |
Audio Section | Table of Contents |
Status Section | Table of Contents |
APPENDIX A: DGI File Structure [AVC] | Table of Contents |
This Appendix documents the syntax and semantics of the DGI file format used when AVC video is indexed. Normal users need not concern themselves with this information, as it is intended for developers and power users.
There are three sections to all DGI files: 1) the header section, 2) the settings section, and 3) the data section. These sections are described below.
DGI Format - Header Section | Table of Contents |
Following is a typical header section:
DGAVCIndexFileNV14 DGIndexNV 2043 X32
Y:\DGDecNV\DGIndexNV\Release\
Y:\don1.264 8192000
Y:\don2.264 8192000
The first line always begins with the string "DGAVCIndexFileNV" immediately followed by a DGI file version number. This string is checked by DGDecodeNV and must match the version expected. This mechanism thus enforces the requirement that DGIndexNV and DGDecodeNV must be used in matched pairs. If DGDecodeNV rejects your DGI file as "obsolete", be sure that you are using the correct version of DGDecodeNV. Sometimes one forgets that one has an older version in the Avisynth plugins folder, or one forgets to upgrade DGDecodeNV when upgrading DGIndexNV.
The first line also contains the version number of DGIndexNV and X32 or X64 to indicate the 32-bit or 64-bit executable.
The second line specifies the path to the DGIndexNV executable that DGDecodeNV will use to find the license file. The third line is blank and the fourth line specifies the first input stream file. Additional input files are listed after the first. Each input file line also gives the size of the input file. The header section must then terminate with a blank line.
The source file reference consists of either a relative path and filename, if the Use Full Paths option is disabled; or the full absolute path of the referenced file, if the Use Full Paths option is enabled. If the Use Full Paths option is enabled and the referenced file is moved after creation of the DGI file, you must either edit the path to be correct, or you must regenerate your DGI file.
DGI Format - Settings Section | Table of Contents |
The settings section consists of one-line specifiers. The following specifiers are defined:
DEVICE 0
The number on this line specifies the ordinal number of the GPU device to be used by DGDecodeNV.
DECODE_MODES 0,1,0
The numbers on this line are interpreted as described for the corresponding auxiliary INI file option.
STREAM 1
The number on this line is interpreted as follows: 0 = elementary stream, 1 = transport stream, 2 = Matroska stream, 3 = program stream.
PKTSIZ 188
This specifier appears only if the input file is a transport stream. The number on this line specifies the transport packet size in bytes.
VPID 68
This specifier appears only if the input file is a transport stream. The number on this line specifies the video PID that was selected in DGIndexNV.
CLIP 0 0 0 0
The first number on this line is the cropping left value. The second number is the cropping right value. The third number is the cropping top value. The fourth number is the cropping bottom value.
RANGE 0 0 200000 0
For elementary and transport streams, the first number on this line is the offset in the source file corresponding to the left selection range value. The third number is the offset in the source file corresponding to the right selection range value. The second and fourth numbers are reserved and not currently used.
For Matroska streams, the first number on this line is the timecode in the source file corresponding to the left selection range value. The third number is the timecode in the source file corresponding to the right selection range value. The second and fourth numbers are reserved and not currently used. Note that the right timecode value of 18446744073709551615 (0xffffffffffffffff) is special; it denotes that a right range is not set, or in other words, the right range is the end of the file.
AUDIO 80,c0
The string on this line is the comma-separated list of audio id's to demux. This line will list no audio id's for elementary and Matroska streams.
DGI Format - Data Section | Table of Contents |
The data section consists of one-line specifiers identified with an upper-case keyword. For example:
SPS 552
PPS 581
SPS 552
PPS 581
IDR 591
0:FRM 7 0 0 5
1:FRM 5 1 0 5
2:FRM 6 2 0 5
3:FRM 6 3 0 5
4:FRM 5 4 0 5
5:FRM 6 5 0 5
6:FRM 6 6 0 5
7:FRM 5 7 0 5
8:FRM 6 8 0 5
9:FRM 6 9 0 5
10:FRM 5 10 0 5
11:FRM 6 11 0 5
12:FRM 5 12 0 5
13:FRM 5 13 0 5
14:FRM 5 14 0 5
15:FRM 5 15 0 5
16:FRM 5 16 0 5
SIZ 1920 x 1088
FPS 24000 / 1001
CODED 47
PLAYBACK 47
0.00% FILM
ORDER 1
The data section of a DGI file contains the indexing of the AVC video stream. The syntax for each keyword line is as follows:
APPENDIX B: DGI File Structure [MPG] | Table of Contents |
This Appendix documents the syntax and semantics of the DGI file format when MPG video is indexed. Normal users need not concern themselves with this information, as it is intended for developers and power users.
There are three sections to all DGI files: 1) the header section, 2) the settings section, and 3) the data section. These sections are described below.
DGI Format - Header Section | Table of Contents |
Following is a typical header section:
DGMPGIndexFileNV14 DGIndexNV 2043 X32
Y:\DGDecNV\DGIndexNV\Release\
Y:\don1.m2v 8192000
Y:\don2.m2v 8192000
The first line always begins with the string "DGMPGIndexFileNV" immediately followed by a DGI file version number. This string is checked by DGDecodeNV and must match the version expected. This mechanism thus enforces the requirement that DGIndexNV and DGDecodeNV must be used in matched pairs. If DGDecodeNV rejects your DGI file as "obsolete", be sure that you are using the correct version of DGDecodeNV. Sometimes one forgets that one has an older version in the Avisynth plugins folder, or one forgets to upgrade DGDecodeNV when upgrading DGIndexNV.
The first line also contains the version number of DGIndexNV and X32 or X64 to indicate the 32-bit or 64-bit executable.
The second line specifies the path to the DGIndexNV executable that DGDecodeNV will use to find the license file. The third line is blank and the fourth line specifies the first input stream file. Additional input files are listed after the first. Each input file line also gives the size of the input file. The header section must then terminate with a blank line.
The source file reference consists of either a relative path and filename, if the Use Full Paths option is disabled; or the full absolute path of the referenced file, if the Use Full Paths option is enabled. If the Use Full Paths option is enabled and the referenced file is moved after creation of the DGI file, you must either edit the path to be correct, or you must regenerate your DGI file.
DGI Format - Settings Section | Table of Contents |
The settings section consists of one-line specifiers. The following specifiers are defined:
DEVICE 0
The number on this line specifies the ordinal number of the GPU device to be used by DGDecodeNV.
DECODE_MODES 0,1,0
The numbers on this line are interpreted as described for the corresponding auxiliary INI file option.
STREAM 1
The number on this line is interpreted as follows: 0 = elementary stream, 1 = transport stream, 2 = Matroska stream, 3 = program stream.
PKTSIZ 188
This specifier appears only if the input file is a transport stream. The number on this line specifies the transport packet size in bytes.
VPID 68
This specifier appears only if the input file is a transport stream. The number on this line specifies the video PID that was selected in DGMPGIndexNV.
CLIP 0 0 0 0
The first number on this line is the cropping left value. The second number is the cropping right value. The third number is the cropping top value. The fourth number is the cropping bottom value.
RANGE 0 0 7762712 0
For elementary, program, and transport streams, the first number on this line is the offset in the source file corresponding to the left selection range value. The third number is the offset in the source file corresponding to the right selection range value. The second and fourth numbers are reserved and not currently used.
For Matroska streams, the first number on this line is the timecode in the source file corresponding to the left selection range value. The third number is the timecode in the source file corresponding to the right selection range value. The second and fourth numbers are reserved and not currently used. Note that the right timecode value of 18446744073709551615 (0xffffffffffffffff) is special; it denotes that a right range is not set, or in other words, the right range is the end of the file.
AUDIO 80,c0
The string on this line is the comma-separated list of audio id's to demux. This line will list no audio id's for elementary and Matroska streams.
DGI Format - Data Section | Table of Contents |
The data section consists of one-line specifiers identified with an upper-case keyword. For example:
SEQ 12321
SEQEXT 0
GOP 0 5
0:FRM B 3 1 0 0
1:FRM B 3 1 0 0
2:FRM I 3 1 0 0
3:FRM B 3 1 0 0
4:FRM B 3 1 0 0
5:FRM P 3 1 0 0
6:FRM B 3 1 0 0
7:FRM B 3 1 0 0
8:FRM P 3 1 0 0
9:FRM B 3 1 0 0
10:FRM B 3 1 0 0
11:FRM P 3 1 0 0
12:FRM B 3 1 0 0
13:FRM B 3 1 0 0
14:FRM P 3 1 0 0
...
SIZ 720 x 576
FPS 25000 / 1000
CODED 223
PLAYBACK 223
0.00% FILM
ORDER 1
The data section of a DGI file contains the indexing of the MPEG2 video stream. The syntax for each keyword line is as follows:
APPENDIX C: DGI File Structure [VC1] | Table of Contents |
This Appendix documents the syntax and semantics of the DGI file format used when VC1 video is indexed. Normal users need not concern themselves with this information, as it is intended for developers and power users.
There are three sections to all DGI files: 1) the header section, 2) the settings section, and 3) the data section. These sections are described below.
DGI Format - Header Section | Table of Contents |
Following is a typical header section:
DGVC1IndexFileNV14 DGIndexNV 2043 X32
Y:\DGDecNV\DGIndexNV\Release\
Y:\don1.vc1 8192000
Y:\don2.vc1 8192000
The first line always begins with the string "DGVC1IndexFileNV" immediately followed by a DGI file version number. This string is checked by DGDecodeNV and must match the version expected. This mechanism thus enforces the requirement that DGIndexNV and DGDecodeNV must be used in matched pairs. If DGDecodeNV rejects your DGV file as "obsolete", be sure that you are using the correct version of DGDecodeNV. Sometimes one forgets that one has an older version in the Avisynth plugins folder, or one forgets to upgrade DGDecodeNV when upgrading DGIndexNV.
The first line also contains the version number of DGIndexNV and X32 or X64 to indicate the 32-bit or 64-bit executable.
The second line specifies the path to the DGIndexNV executable that DGDecodeNV will use to find the license file. The third line is blank and the fourth line specifies the first input stream file. Additional input files are listed after the first. Each input file line also gives the size of the input file. The header section must then terminate with a blank line.
The source file reference consists of either a relative path and filename, if the Use Full Paths option is disabled; or the full absolute path of the referenced file, if the Use Full Paths option is enabled. If the Use Full Paths option is enabled and the referenced file is moved after creation of the DGI file, you must either edit the path to be correct, or you must regenerate your DGI file.
DGI Format - Settings Section | Table of Contents |
The settings section consists of one-line specifiers. The following specifiers are defined:
DEVICE 0
The number on this line specifies the ordinal number of the GPU device to be used by DGDecodeNV.
DECODE_MODES 0,1,0
The numbers on this line are interpreted as described for the corresponding auxiliary INI file option.
STREAM 1
The number on this line is interpreted as follows: 0 = elementary stream, 1 = transport stream, 2 = Matroska stream, 3 program stream.
PKTSIZ 188
This specifier appears only if the input file is a transport stream. The number on this line specifies the transport packet size in bytes.
VPID 68
This specifier appears only if the input file is a transport stream. The number on this line specifies the video PID that was selected in DGVC1IndexNV.
CLIP 0 0 0 0
The first number on this line is the cropping left value. The second number is the cropping right value. The third number is the cropping top value. The fourth number is the cropping bottom value.
RANGE 0 0 5000456 0
For elementary and transport streams, the first number on this line is the offset in the source file corresponding to the left selection range value. The third number is the offset in the source file corresponding to the right selection range value. The second and fourth numbers are reserved and not currently used.
For Matroska streams, the first number on this line is the timecode in the source file corresponding to the left selection range value. The third number is the timecode in the source file corresponding to the right selection range value. The second and fourth numbers are reserved and not currently used. Note that the right timecode value of 18446744073709551615 (0xffffffffffffffff) is special; it denotes that a right range is not set, or in other words, the right range is the end of the file.
AUDIO 80,c0
The string on this line is the comma-separated list of audio id's to demux. This line will list no audio id's for elementary and Matroska streams.
DGI Format - Data Section | Table of Contents |
The data section consists of one-line specifiers identified with an upper-case keyword. For example:
SEQ 0 0 1 0 5
ENTRY 22 0 0
0:FRM 3 0 0
1:FRM 0 0 0
2:FRM 3 0 0
3:FRM 1 0 0
4:FRM 3 0 0
5:FRM 1 0 0
6:FRM 3 0 0
7:FRM 1 0 0
8:FRM 3 0 0
9:FRM 1 0 0
10:FRM 3 0 0
11:FRM 1 0 0
12:FRM 3 0 0
13:FRM 1 0 0
14:FRM 3 0 0
15:FRM 1 0 0
16:FRM 3 0 0
17:FRM 1 0 0
18:FRM 3 0 0
19:FRM 1 0 0
20:FRM 3 0 0
21:FRM 1 0 0
22:FRM 3 0 0
23:FRM 1 0 0
SIZ 1920 x 1088
FPS 24000 / 1001
CODED 7870
PLAYBACK 7870
0.00% FILM
ORDER 1
The data section of a DGI file contains the indexing of the VC1 video stream. The syntax for each keyword line is as follows:
APPENDIX D: Command-Line Interface | Table of Contents |
Parameters | Table of Contents |
DGIndexNV 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 DGIndexNV defaults and the DGIndexNV INI file. DGIndexNV writes the progress percentage during indexing to standard out to allow for third-party tools to display the progress of the indexing.
Parameter | Command-Line Flag | Definition/Comments |
---|---|---|
Input File | -i filename -i file1,file2, ... | Specify input file(s). If the specified file cannot be found, it is ignored. Each filename should be double quoted if it contains spaces. |
Video PID | -v videoPID | Transport stream video PID, hex notation (e.g., -v 11). |
PCR PID | -p pcrPID | Transport stream PCR PID, hex notation (e.g., -p 11). |
Cropping | -c left right top bottom | Crop the video as specified. If any of the values is not mod 4 the entire -c option is ignored. |
Output File | -o filename | Name of output index file, including the .dgi extension. The filename should be double quoted if it contains spaces. |
Output File with Video Demux | -od filename | Name of output index file, including the .dgi extension. The filename should be double quoted if it contains spaces. Same as -o but the video elementary stream is demuxed. |
Specify Avisynth Template | -at filename | Specify the filename of the Avisynth template to be used. This can be just a filename (e.g., template.avs), in which case the template file will be looked for in the same directory as DGIndexNV.exe. It can also be a full path that fully specifies the path and filename (e.g., c:\templates\template.avs). Leave the filename null to specify no template (i.e., give -at alone with no argument). Also note that overwrite is disabled, so if the target script already exists, it will not be overwritten. Delete it first. |
Demux Audio | -a | Demux all detected audio streams. |
Exit | -e | Exits DGIndexNV when project has been saved. |
Hide | -h | Starts and runs DGIndexNV in the hidden state and exits when the project has been saved (forces -e option). |
Example | Table of Contents |
This example:
DGIndexNV -i d:\files\movie.avc -o d:\MyProject.dgi -e
will save a project file, specifying:
Input File = d:\files\movie.avc
Output File = d:\MyProject.dgi
Exit on end
This example does the same but uses a file name with embedded spaces:
DGIndexNV -i "d:\files\my wedding day.avc" -o "d:\my wedding day.dgi" -e
These examples do the same but multiple input files are opened:
DGIndexNV -i file1.264,file2.264 -o file.dgi -e
DGIndexNV -i "d:\files\my wedding day.264","d:\files\my divorce day.264" -o "d:\my wedding day.dgi" -e
Note that quoting is supported only for the -i and -o options.
APPENDIX E: Auxiliary INI File Options | Table of Contents |
Some aspects of DGIndexNV's behavior can be modified via the INI file but not through the GUI, as described below. DGIndexNV creates defaults for these settings, but you can modify these lines in the INI file as you wish.
AVC_Extension=string: The extension used on demultiplexed AVC video files will be string. For example: AVC_Extension=264 will create a file such as "myfile.264".
MPG_Extension=string: The extension used on demultiplexed MPG video files will be string. For example: MPG_Extension=m2v will create a file such as "myfile.m2v".
VC1_Extension=string: The extension used on demultiplexed VC1 video files will be string. For example: VC1_Extension=vc1 will create a file such as "myfile.vc1".
UseD3D=0/1: If set to 1, then CUDA will be initialized for dependence on Windows D3D. If set to 0, then D3D-less operation is used. It is preferable to use UseD3D=0 but some Nvidia mobile adapter drivers do not yet support this mode.
CUDA_Device=int: If set to 255, then DGDecNV will use the first available CUDA-enabled device. If otherwise, the value selects the ordinal number of the CUDA device to be used. To list available CUDA devices and their ordinal numbers, use "Options/List GPU Devices".
Decode_Modes=0/1/2,0/1/2,0/1/2: The order of the parameters corresponds to AVC video, MPEG2 video, and VC1 video. A value of 0 selects CUVID decoding; a value of 1 selects CUDA decoding; a value of 2 selects DXVA decoding. For example, "Decode_Modes=0,1,0" causes CUDA to be used for MPEG2 video and CUVID for AVC and VC1 video. By default, CUVID is used for AVC and VC1, and CUDA is used for MPEG2. Note that DXVA decoding can produce better quality deinterlacing but also requires D3D mode (you must have UseD3D=1).
Full_Info=0/1: If set to 1, then DGDecNV will update all fields of the Info dialog during the Save Project operation. If set to 0, then some fields will not be updated. This option is provided as a workaround for a problem reported by a few users, such that under Win7 in some environments the performance of the Save Project operation is reduced when all the Info fields are updated. This should be set to 1 unless you are one of those few users.
Bare_Demux=0/1: When DGIndexNV demuxes AVC video, it prepends the starting SPS/PPS NALUs to the start of the demuxed files. This can assist some streams that erroneously do not start with the appropriate SPS/PPS NALUs (due to bad editing). This can cause problems for some authoring suites. In such cases, if your authoring application does not accept files demuxed by DGIndexNV, set this option to 1. When set to 1, the starting SPS/PPS NALUs are not prepended to the start of the demuxed video file.
Disable_Encrypted_Audio_Warning=0/1: Normally, DGIndexNV pops up a dialog box to warn you when an audio stream appears to be encrypted. Sometimes, however, this warning is spurious. You can disable this warning by setting this option to 1. When it is disabled, the encrypted stream is always ignored.
Fine_Cropping=0/1: When set to 0, the cropping granularity is 4 pixels. When set to 1, the cropping granularity is 2 pixels, subject to the constraint that the cropped width must be mod 4. E.g., you can crop 2 pixels from each side.