What is DGDecodeNV? | Table of Contents |
DGDecodeNV is an Avisynth source filter (AviSynth v2.5 or higher) that decodes and frame-serves AVC (H.264), VC1, and MPEG2 video. It works in conjunction with the indexing tool DGIndexNV.
Note that DGDecodeNV automatically generates hinting data for the Avisynth filter ColorMatrix().
The "NV" in the name "DGDecodeNV" indicates that this version of the program is designed for use with the VP2 (or greater) GPU decoder on some Nvidia video cards. See here to check whether your video card has a VP2 or greater engine:
Table of Nvidia Graphics Cards SpecificationsYou can get the latest binaries of DGDecodeNV at http://rationalqm.us/dgdecnv/dgdecnv.html.
Filter Syntax | Table of Contents |
DGSource() | Table of Contents |
DGSource(str "dgi", bool i420, int deinterlace, bool use_top_field, bool use_pf, bool use_D3D, int crop_t, int crop_b, int crop_l, int crop_r, int resize_w, int resize_h, int fieldop, bool debug)
AVC, MPG, and VC1 video each provide syntax elements that enable a single field of any frame to be repeated automatically during display ("pulled down"). The extra fields do not occupy space in the video 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. One way to learn about "telecining" and "3:2 pulldown" is to perform a search for those terms using our friend Google.
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 fieldop setting allows the user to specify how the pulldown flags are to be handled.
The fieldop is perhaps the most important option to understand when using DGDecNV. Most users should first preview the project and inspect the DGIndexNV Information Panel. If the clip is 29.976fps, and the Field Repeats box in the Information Panel indicates field repeats consistent with 3:2 pulldown, then it is likely that the clip can be treated as 3:2 pulldown material, and so Force Film (fieldop=1) should be selected. Force Film can also be used on hybrid material and will decimate frames as required in video sections to maintain the film rate.
Otherwise, then you should leave fieldop=0 (Honor Pulldown Flags) for generation of the DGI 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.
Almost invariably, if you know the source is not all 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.
fieldop=2 (Ignore Pulldown Flags) should be necessary only for advanced users who want to see just the exact coded pictures in the video stream.
Usage Examples | Table of Contents |
AviSynth LoadPlugin() Example | Table of Contents |
LoadPlugin("C:\My Files\DGDecodeNV.dll")Note: This load plugin line can be omitted if DGDecodeNV.dll is in the default AviSynth plug-ins directory, because Avisynth will load it automatically.
DGSource() Examples | Table of Contents |
DGSource("C:\My Files\project.dgi")Note: The path can be omitted if "project.dgi" is in the same directory as your AviSynth (*.avs) script.
DGSource("project.dgi", deinterlace=1)
DGSource("project.dgi", deinterlace=2, resize_w=1280, resize_h=720)