Log in

View Full Version : Cute VirtualDub timeline bug


Guest
18th May 2003, 14:44
Make a frame-numbered HUFYUV file by running this Avisynth script and saving the result to HUFYUV:

blankclip(300)
showframenumber()

Then open this frame-numbered HUFYUV file and start playing for a bit. Hit stop. The frame number shown by VirtualDub on the timeline will not match the actual frame number. Usually it stops with the frame number one too high, but with some files it can stop as many as four numbers too high! You don't actually have to make the AVI to see it. You can just play the AVS file.

It's not a big issue but I lost an hour thinking my filter was broke
before finding that it was VirtualDub.

Belgabor
18th May 2003, 15:17
Donald, is this bug in all VDub versions?

Guest
18th May 2003, 15:37
All that I have tried, including VirtualDubMod.

Belgabor
18th May 2003, 19:00
Damn, I hoped it was caused/mended by the architecture change in 1.5.2 :/

Guest
19th May 2003, 01:00
I haven't tried 1.5.2. :p

EDIT: Avery Lee commented as follows:

"Hmm... not sure which version you were testing against, but I can
explain why it would be off by one output frame. VirtualDub's
playback engine has a one-frame FIFO between processing and blit, to
allow computation to overlap waiting for the next frame time. When an
abort is signaled, the processing engine is not aware if the frame in
the FIFO has retired or not and thus it may update the frame slider to
a frame that was processed and queued but never displayed. The only
way I can think of that the slider would be more than one frame off is
if the stream were being played at lower than full frame rate, either
via decimation or real-time frame dropping."