Cyberia
7th January 2005, 00:32
DGMPGDec (DVD2AVI) F.A.Q.
Part 1: Intro and Versions
Q01: What is DGMPGDec (DVD2AVI) and what does it do?
A: The primary function of all versions of DGMPGDec (DVD2AVI) is to create an index of the location of each frame in an MPEG2 stream and some information about each frame.
Q02: How does DGMPGDec (DVD2AVI) relate to DGDecode (MPEG2DECx)?
A: DGDecode (MPEG2DECx) reads the .d2v project file from DGIndex (DVD2AVI) and decodes the video into AviSynth (http://sourceforge.net/projects/avisynth2).
Q03: What versions of DGMPGDec (DVD2AVI) exist and which version should I use?
A: There currently are at least 9 versions of DGMPGDec (DVD2AVI):
DGMPGDec 1.2.1: (http://neuron2.net/dgmpgdec/dgmpgdec121.zip) Based on DVD2AVIdg v1.3.0. Has a new icon and naming convention: DVD2AVI.exe -> DGParse.exe; MPEG2DEC3.dll -> DGDecode.dll; VFAPI.vfp -> DGVfapi.vfp. Adds auto AVS file generation, raw PID detection, and can demux MPEG audio and AAC from transport streams. Now walks the dog and cleans your house. Plus many bug fixes. (by Don Graft (http://neuron2.net/))
ALL VERSIONS LISTED BELOW ARE OBSOLETE! STOP USING THEM!
DVD2AVIdg v1.3.0: (http://neuron2.net/fixd2v/decodefix130.zip) Greatly enhanced and updated version which combines all the features of the other various builds of DVD2AVI: GUI rebuilt, CLI, transport streams, D2F compatibility and much more. This version also fixes a number of issues affecting ALL of the other builds, such as dropped frames and incorrect LBA addresses. Based on DVD2AVI v1.77.3. (by Don Graft (http://neuron2.net/))
DVD2AVI v1.86: (http://www.divx-digest.tv/software/encode/dvd2avi186.zip) Enhanced version. (by Gloval)
DVD2AVI v1.83.6: (http://nic.dnsalias.com/DVD2AVIT3.zip) Enhanced version, based on Save-OE, which supports DVB or ATSC transport streams. It also has some nice optimizations for P4's. Should be used together with mpeg2dec3.dll v1.08+ (by trbarry (http://mywebpages.comcast.net/trbarry/) and Nic (http://nic.dnsalias.com/))
DVD2AVI v1.82: (http://www.doom9.org/Soft21/Decoders/dvd2avi_182.rar) Enhanced version which also forms the basis for the Save-OE project, a not very active Sourceforge project. (by Ogo)
DVD2AVI v1.77.4: (http://www.doom9.org/Soft21/Decoders/dvd2avi1.77.4.zip) This is a modified version of v1.77.3 that can save v1.76 style d2v files.
DVD2AVI v1.77.3: (http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/DVD2AVI_1.77.3.zip) This is a new enhanced version from Jackei that has a lot of new features and enhanced crop/resizing etc. (by Jackei (http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/))
DVD2AVI v1.76 CLI: (http://www.dvd2dvd.org/DVD2AVI%201.76%20Command-Line%201.05.zip) This version supports a Command-Line Interface, which is required for use with some GUIs like DVD2SVCD. (by DVD2SVCD (http://www.dvd2svcd.org/))
DVD2AVI v1.76: (http://www.doom9.org/Soft21/Decoders/DVD2AVI_176.zip) Original version. (by Jackei (http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/))
Part 2: Video menu
Q04: What are the different iDCT Algorithms and which one should I use?
A: First, understand what an iDCT algorithm does. iDCT stands for Inverse Discrete Cosine Transform. It is the method by which digital data in an MPEG stream is decoded into analog video data for your TV or computer screen. Which iDCT to use depends on what CPU you have and possibly on how accurately you want to decode the frames. These are the available options:
32-bit MMX - Requires at least a Pentium MMX and should be much faster than the IEEE -1180 Reference iDCT. High precision, but slightly (imperceptibly) imprecise.
32-bit SSE MMX - Requires at least a P3 or Athlon (Thoroughbred) and should be faster than 32-bit MMX or 64-bit Floating Point. High precision, but slightly (imperceptibly) imprecise.
32-bit SSE2 MMX - Requires at least P4 or Athlon64 and should be the fastest algorithm. High precision, but slightly (imperceptibly) imprecise.
64-bit Floating Point - Will work on any processor and should be faster than 32-bit MMX. Very high precision, producing output closest to the IEEE -1180 Reference iDCT.
IEEE -1180 Reference - The official standard algorithm. It is very slow, but by definition should produce nearly perfect output.
Most people will not be able to tell the difference in quality between these algorithms but they can be easily observed by using the AviSynth filters Subtract and Levels.
NOTE: DGDecode (MPEG2DECx) supports several more iDCTs which can override the specified DGIndex (DVD2AVI) value.
Q05: What are the different Field Operations and which one should I use?
A: This is a complicated question, but is perhaps the most important one to understand when using DGIndex (DVD2AVI). First, let's describe the differences:
None - Outputs constant 29.970 frames/sec. The RFF flags are honored, i.e, pulldown is performed according to the flags, and the flags are stored in the D2V file.
Force Film - Outputs constant 23.976 frames/sec. Will possibly add or delete frames to maintain this frame rate (when there are more/less RFFs than implied by exact 3:2 pulldown). The RFF flags are not honored, i.e., pulldown is NOT performed, but the RFF flags are stored in the D2V file.
Raw Encoded Frames - Outputs (possibly fluxuating) source frame rate. No frames are added or deleted to maintain a film frame rate. RFF flags are not honored, i.e., pulldown is NOT performed, but the RFF flags are stored in the D2V file.
NOTE: This option is only available in DGMPGDec.
Swap Field Order - Reverses field order by swapping Top and Bottom fields.
NOTE: This option is not available in DGMPGDec. You can use the AviSynth SwapFields filter or Simon Walters' Reverse Field Dominance filter if you need to reverse the field order.
Most users should first attempt to generate a d2v project using the Force Film option. If the Video Type field in the Information window indicates FILM 95% or higher, everything is probably OK. If the percentage is lower or the Video Type indicates an NTSC percentage, you should recreate the d2v project using the None option, and then perform IVTC (Inverse Telecine) using your encoder or an AviSynth plug-in.
The Raw Encoded Frames 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 (http://www.doom9.org/ivtc-tut.htm) for additional information on using Force Film vs. IVTC (Inverse Telecine).
Q06: Which Colorspace option should I use?
A: RGB if you are going to frameserve to VFAPI. Use YUV in all other cases.
NOTE: The Colorspace option is not available in DVD2AVIdg or DGMPGDec because these versions set the colorspace automatically.
Q07: What does the "YUV -> RGB" option do?
A: First, understand that this option is ONLY used in two cases: when you use DGDecode's internal RGB conversion filters, or when a 3rd-party application requests an RGB frame.
PC Scale: YUV [16,235(Y)/240(UV)] -> RGB [0, 255]
TV Scale: YUV [16,235(Y)/240(UV)] -> RGB [16, 235]
Only use TV Scale if you are using TMPGEnc with the "Output YUV Data As Basic YCbCr Not CCIR601" option checked (it's UNchecked by default), or CCE with the "Luminance Level 0 To 255" option provided you are feeding it RGB.
Otherwise, always use PC Scale.
Q08: Should I use the Luminance Filter?
A: This is entirely up to you to decide. If you feel to video to too dark or too light, you can use this option to correct the Luminance.
NOTE: The values specified here are performed using the DGDecode (MPEG2DECx) LumaFilter filter. There is no advantage to performing this operation in DGIndex (DVD2AVI) except that you can use the GUI and visualize the output.
Q09: Should I use the Crop Filter (aka: Clipping)?
A: This is entirely up to you to decide. If you feel the need to crop the video (possibly to remove black bars) you can use this option to perform cropping.
NOTE: The values specified here are in fact performed using the AviSynth Crop filter. There is no advantage to performing this operation in DGIndex (DVD2AVI) except that you can use the GUI and visualize the output.
Part 3: Audio menu
Q10: What are the differences between Decode and Demux?
A: The Decode function will decode the raw audio (including DRC, Downmixing and Normalizing) and produce a 2 channel wav file. The Demux function will extract the raw audio format entirely and save it as a file. You can then use this file for whatever purposes you want.
Q11: What audio formats can be decoded by DGIndex (DVD2AVI)?
A: AC3 and LPCM
Q12: What audio formats can be demuxed by DGIndex (DVD2AVI)?
A: AC3, MPA, DTS (not available before v1.77.3. Read this thread (http://forum.doom9.org/showthread.php?s=&threadid=43269&highlight=AVI+DTS) for info about how to handle DTS audio.)
Q13: Why isn't the DELAY value the same when I demux an AC3 file with v1.76/1.77.3 and 1.3.0dg/DGMPGDec?
A: Because there is one or (usually) two more video frames at the start of the video in neuron2's version (See Q34 below). This will account for up to 83ms difference. But it may also mean that a different starting position is chosen for the audio, which in itself may introduce a few ms of delay and the total effect may be as much as 100ms or more.
Q14: Should I decode or process the audio in DGIndex (DVD2AVI) at all?
A:No, decoding and processing are now better handled by an external program such as BeSweet. Therefore, just have DGIndex (DVD2AVI) demux the audio to a file. This will generate one or more audio files containing "DELAYxxxms" in the filename. You can then process these files externally, if necessary.
The following questions assume that you have decided to use the internal audio processing of DGIndex (DVD2AVI) despite the previous question.
Q15: Should I use the Dynamic Range Control option?
A: This is entirely up to you to decide, but it's usually a good idea. Dynamic range is the difference between the loudest and softest sounds in an audio stream. The Dynamic Range Control option compresses the dynamic range so the quieter sounds are audible yet the louder sounds do not get distorted.
Q16: Should I use the Dolby Surround Downmix option?
A: Leaving it unchecked will only decode the two main front channels, left and right. If it is checked, the center and surround channels will be encoded into the resulting wav file, but with Pro Logic encoding. This may distort the audio somewhat when played back on a non-Pro Logic capable playback system.
Q17: Should I use the 48 -> 44.1 KHz option? (aka: Downsampling)
A: Maybe, if you are doing (S)VCD's. Read the DVD2SCVD FAQ, Q14 (http://forum.doom9.org/showthread.php?s=&threadid=21859).
Q18: Should I use the Normalize option?
A: This is entirely up to you to decide, but it's usually a good idea.
Part 1: Intro and Versions
Q01: What is DGMPGDec (DVD2AVI) and what does it do?
A: The primary function of all versions of DGMPGDec (DVD2AVI) is to create an index of the location of each frame in an MPEG2 stream and some information about each frame.
Q02: How does DGMPGDec (DVD2AVI) relate to DGDecode (MPEG2DECx)?
A: DGDecode (MPEG2DECx) reads the .d2v project file from DGIndex (DVD2AVI) and decodes the video into AviSynth (http://sourceforge.net/projects/avisynth2).
Q03: What versions of DGMPGDec (DVD2AVI) exist and which version should I use?
A: There currently are at least 9 versions of DGMPGDec (DVD2AVI):
DGMPGDec 1.2.1: (http://neuron2.net/dgmpgdec/dgmpgdec121.zip) Based on DVD2AVIdg v1.3.0. Has a new icon and naming convention: DVD2AVI.exe -> DGParse.exe; MPEG2DEC3.dll -> DGDecode.dll; VFAPI.vfp -> DGVfapi.vfp. Adds auto AVS file generation, raw PID detection, and can demux MPEG audio and AAC from transport streams. Now walks the dog and cleans your house. Plus many bug fixes. (by Don Graft (http://neuron2.net/))
ALL VERSIONS LISTED BELOW ARE OBSOLETE! STOP USING THEM!
DVD2AVIdg v1.3.0: (http://neuron2.net/fixd2v/decodefix130.zip) Greatly enhanced and updated version which combines all the features of the other various builds of DVD2AVI: GUI rebuilt, CLI, transport streams, D2F compatibility and much more. This version also fixes a number of issues affecting ALL of the other builds, such as dropped frames and incorrect LBA addresses. Based on DVD2AVI v1.77.3. (by Don Graft (http://neuron2.net/))
DVD2AVI v1.86: (http://www.divx-digest.tv/software/encode/dvd2avi186.zip) Enhanced version. (by Gloval)
DVD2AVI v1.83.6: (http://nic.dnsalias.com/DVD2AVIT3.zip) Enhanced version, based on Save-OE, which supports DVB or ATSC transport streams. It also has some nice optimizations for P4's. Should be used together with mpeg2dec3.dll v1.08+ (by trbarry (http://mywebpages.comcast.net/trbarry/) and Nic (http://nic.dnsalias.com/))
DVD2AVI v1.82: (http://www.doom9.org/Soft21/Decoders/dvd2avi_182.rar) Enhanced version which also forms the basis for the Save-OE project, a not very active Sourceforge project. (by Ogo)
DVD2AVI v1.77.4: (http://www.doom9.org/Soft21/Decoders/dvd2avi1.77.4.zip) This is a modified version of v1.77.3 that can save v1.76 style d2v files.
DVD2AVI v1.77.3: (http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/DVD2AVI_1.77.3.zip) This is a new enhanced version from Jackei that has a lot of new features and enhanced crop/resizing etc. (by Jackei (http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/))
DVD2AVI v1.76 CLI: (http://www.dvd2dvd.org/DVD2AVI%201.76%20Command-Line%201.05.zip) This version supports a Command-Line Interface, which is required for use with some GUIs like DVD2SVCD. (by DVD2SVCD (http://www.dvd2svcd.org/))
DVD2AVI v1.76: (http://www.doom9.org/Soft21/Decoders/DVD2AVI_176.zip) Original version. (by Jackei (http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/))
Part 2: Video menu
Q04: What are the different iDCT Algorithms and which one should I use?
A: First, understand what an iDCT algorithm does. iDCT stands for Inverse Discrete Cosine Transform. It is the method by which digital data in an MPEG stream is decoded into analog video data for your TV or computer screen. Which iDCT to use depends on what CPU you have and possibly on how accurately you want to decode the frames. These are the available options:
32-bit MMX - Requires at least a Pentium MMX and should be much faster than the IEEE -1180 Reference iDCT. High precision, but slightly (imperceptibly) imprecise.
32-bit SSE MMX - Requires at least a P3 or Athlon (Thoroughbred) and should be faster than 32-bit MMX or 64-bit Floating Point. High precision, but slightly (imperceptibly) imprecise.
32-bit SSE2 MMX - Requires at least P4 or Athlon64 and should be the fastest algorithm. High precision, but slightly (imperceptibly) imprecise.
64-bit Floating Point - Will work on any processor and should be faster than 32-bit MMX. Very high precision, producing output closest to the IEEE -1180 Reference iDCT.
IEEE -1180 Reference - The official standard algorithm. It is very slow, but by definition should produce nearly perfect output.
Most people will not be able to tell the difference in quality between these algorithms but they can be easily observed by using the AviSynth filters Subtract and Levels.
NOTE: DGDecode (MPEG2DECx) supports several more iDCTs which can override the specified DGIndex (DVD2AVI) value.
Q05: What are the different Field Operations and which one should I use?
A: This is a complicated question, but is perhaps the most important one to understand when using DGIndex (DVD2AVI). First, let's describe the differences:
None - Outputs constant 29.970 frames/sec. The RFF flags are honored, i.e, pulldown is performed according to the flags, and the flags are stored in the D2V file.
Force Film - Outputs constant 23.976 frames/sec. Will possibly add or delete frames to maintain this frame rate (when there are more/less RFFs than implied by exact 3:2 pulldown). The RFF flags are not honored, i.e., pulldown is NOT performed, but the RFF flags are stored in the D2V file.
Raw Encoded Frames - Outputs (possibly fluxuating) source frame rate. No frames are added or deleted to maintain a film frame rate. RFF flags are not honored, i.e., pulldown is NOT performed, but the RFF flags are stored in the D2V file.
NOTE: This option is only available in DGMPGDec.
Swap Field Order - Reverses field order by swapping Top and Bottom fields.
NOTE: This option is not available in DGMPGDec. You can use the AviSynth SwapFields filter or Simon Walters' Reverse Field Dominance filter if you need to reverse the field order.
Most users should first attempt to generate a d2v project using the Force Film option. If the Video Type field in the Information window indicates FILM 95% or higher, everything is probably OK. If the percentage is lower or the Video Type indicates an NTSC percentage, you should recreate the d2v project using the None option, and then perform IVTC (Inverse Telecine) using your encoder or an AviSynth plug-in.
The Raw Encoded Frames 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 (http://www.doom9.org/ivtc-tut.htm) for additional information on using Force Film vs. IVTC (Inverse Telecine).
Q06: Which Colorspace option should I use?
A: RGB if you are going to frameserve to VFAPI. Use YUV in all other cases.
NOTE: The Colorspace option is not available in DVD2AVIdg or DGMPGDec because these versions set the colorspace automatically.
Q07: What does the "YUV -> RGB" option do?
A: First, understand that this option is ONLY used in two cases: when you use DGDecode's internal RGB conversion filters, or when a 3rd-party application requests an RGB frame.
PC Scale: YUV [16,235(Y)/240(UV)] -> RGB [0, 255]
TV Scale: YUV [16,235(Y)/240(UV)] -> RGB [16, 235]
Only use TV Scale if you are using TMPGEnc with the "Output YUV Data As Basic YCbCr Not CCIR601" option checked (it's UNchecked by default), or CCE with the "Luminance Level 0 To 255" option provided you are feeding it RGB.
Otherwise, always use PC Scale.
Q08: Should I use the Luminance Filter?
A: This is entirely up to you to decide. If you feel to video to too dark or too light, you can use this option to correct the Luminance.
NOTE: The values specified here are performed using the DGDecode (MPEG2DECx) LumaFilter filter. There is no advantage to performing this operation in DGIndex (DVD2AVI) except that you can use the GUI and visualize the output.
Q09: Should I use the Crop Filter (aka: Clipping)?
A: This is entirely up to you to decide. If you feel the need to crop the video (possibly to remove black bars) you can use this option to perform cropping.
NOTE: The values specified here are in fact performed using the AviSynth Crop filter. There is no advantage to performing this operation in DGIndex (DVD2AVI) except that you can use the GUI and visualize the output.
Part 3: Audio menu
Q10: What are the differences between Decode and Demux?
A: The Decode function will decode the raw audio (including DRC, Downmixing and Normalizing) and produce a 2 channel wav file. The Demux function will extract the raw audio format entirely and save it as a file. You can then use this file for whatever purposes you want.
Q11: What audio formats can be decoded by DGIndex (DVD2AVI)?
A: AC3 and LPCM
Q12: What audio formats can be demuxed by DGIndex (DVD2AVI)?
A: AC3, MPA, DTS (not available before v1.77.3. Read this thread (http://forum.doom9.org/showthread.php?s=&threadid=43269&highlight=AVI+DTS) for info about how to handle DTS audio.)
Q13: Why isn't the DELAY value the same when I demux an AC3 file with v1.76/1.77.3 and 1.3.0dg/DGMPGDec?
A: Because there is one or (usually) two more video frames at the start of the video in neuron2's version (See Q34 below). This will account for up to 83ms difference. But it may also mean that a different starting position is chosen for the audio, which in itself may introduce a few ms of delay and the total effect may be as much as 100ms or more.
Q14: Should I decode or process the audio in DGIndex (DVD2AVI) at all?
A:No, decoding and processing are now better handled by an external program such as BeSweet. Therefore, just have DGIndex (DVD2AVI) demux the audio to a file. This will generate one or more audio files containing "DELAYxxxms" in the filename. You can then process these files externally, if necessary.
The following questions assume that you have decided to use the internal audio processing of DGIndex (DVD2AVI) despite the previous question.
Q15: Should I use the Dynamic Range Control option?
A: This is entirely up to you to decide, but it's usually a good idea. Dynamic range is the difference between the loudest and softest sounds in an audio stream. The Dynamic Range Control option compresses the dynamic range so the quieter sounds are audible yet the louder sounds do not get distorted.
Q16: Should I use the Dolby Surround Downmix option?
A: Leaving it unchecked will only decode the two main front channels, left and right. If it is checked, the center and surround channels will be encoded into the resulting wav file, but with Pro Logic encoding. This may distort the audio somewhat when played back on a non-Pro Logic capable playback system.
Q17: Should I use the 48 -> 44.1 KHz option? (aka: Downsampling)
A: Maybe, if you are doing (S)VCD's. Read the DVD2SCVD FAQ, Q14 (http://forum.doom9.org/showthread.php?s=&threadid=21859).
Q18: Should I use the Normalize option?
A: This is entirely up to you to decide, but it's usually a good idea.