When I decode a video VOB using VirtualDub FilterMod (MPEG-2 plugin 4.5), I get the number of a certain frame - 6. When I decode a video using DGDecode in AviSynth, number of this frame is 8. It turns out that Avisynth adds 2 extra frames the beginning of the video? Or VirtualDub did not show these frames?
+ Reply to Thread
Results 1 to 6 of 6
-
Last edited by Megafox; 15th Sep 2018 at 07:21.
-
You probably have leading B frames that cannot be validly decoded. Different decoders handle this differently. Some just discard them. DGDecode replaces them with a copy of the first decodable frame. The DGDecode way keeps audio sync unaffected, while discarding the frames changes the sync.
-
I found reason, VirtualDub does not see first two frames, now I have to +2 to all my measurements before moving to AviSynth.
-
Yes, as I mentioned, many decoders discard the leading orphaned B frames.
Note that you will have this issue only if your stream in fact has leading orphaned B frames. So do not apply your workaround unconditionally.
Also, not all Avisynth decoders will preserve the leading frames like DGDecode. So watch out if you decide to use a different source filter.
Finally, there can be more or less than 2 orphaned frames, so you can't use the number 2 unconditionally. -
Note that the leading B frames are probably there because the video was cut from a source with open GOPs. With an open GOP the last B frames of a GOP can reference the I frame of the next GOP. So, in presentation order (the order they are to be viewed) you have a sequence that looks like:
Code:...PBBI...
Code:...PIBB...
When you cut such a sequence at the I frame you are left with:
Code:IBB...
Code:BBI...
So this isn't a matter of VirtualDub vs AviSynth. It's a matter of what MPEG2 decoder is being used.
Similar Threads
-
Display Optional Frame Numbers?
By jfharper in forum EditingReplies: 3Last Post: 8th Feb 2017, 23:38 -
Virtualdub Capture: Inserted frame every 41st frame when capturing
By sventamyra in forum Capturing and VCRReplies: 14Last Post: 20th Apr 2016, 08:21 -
Can ffmpeg use frame numbers to cut a video?
By yetanotherlogin in forum EditingReplies: 4Last Post: 26th Jan 2015, 05:12 -
Easiest way to see frame numbers
By Freodon in forum Software PlayingReplies: 2Last Post: 26th Dec 2014, 21:29 -
AVISynth TRIM results in wrong frame number in VirtualDub
By Budman1 in forum Video ConversionReplies: 33Last Post: 15th Jun 2014, 15:24