Additionally, the original DVD2AVI project was not updated in some time, and it stood in need of some fixes and upgrades. My version addresses a lot of the irritating features of the original project, as well as adds many new and useful features.
There are three causes for the frame loss in the faulty versions.
So, for example, if you edit a VOB and the resulting file has an IBBPBBP... opening GOP, you will lose a total of 5 frames, with 2 lost at the start and 3 lost at the end.
In addition to the lost frames, MPEG2DEC does not implement random frame access correctly. In fact it always throws away the first B frames in the GOP prior to the first P frame. If they are (say) frames 12 and 13 (in display order) and you try to seek to 12, MPEG2DEC will toss them and return frame 14 to you, without any warning or indication about it.
Finally, when 3 above applies the TFF/RFF flags in the D2V file are misaligned to the frames.
I have created fixed versions of DVD2AVI and MPEG2DEC3 that solve these problems. To avoid confusion, I have mutated the names as follows:
DVD2AVI -> DGIndex
MPEG2DEC3 -> DGDecode
I modified DGDecode to not truncate B frames prior to the first P frame and to not unconditionally reduce the frame count by two. I rewrote the decoding and random access code to work correctly with the D2V files generated by the fixed DGIndex.
For DGIndex, if your input stream starts with an open GOP, a message box will pop up warning you that the first few frames may not be decoded properly, but the frames will be retained. To avoid this problem, always cut your VOBs on cell boundaries. Do not make arbitrary VOB cuts with a binary splitter (such as VOBSplit).
These fixes currently apply only when Save Project is used in DGIndex and then DGDecode.dll or DGVfapi.vfp (VFAPI) is used for decoding. Future versions may add support for Preview.
DGIndex and DGDecode are intended to be used as a pair. If you use faulty versions of either of them, incorrect and/or undefined behavior may result.
DGIndex is baselined off DVD2AVI version 1.77.3. DGDecode is baselined off MPEG2DEC3 1.10.
The author appreciates and acknowledges the assistance of the members of the Doom9 forum (http://www.doom9.org) in the development and testing of this software.
Copyright (C) 2003, 2004 Donald A. Graft, All Rights Reserved.