PDA

View Full Version : How to remove false dropped frames?


videoFred
3rd October 2008, 14:40
Hello,

I have asked this on the VirtualDub forum, but no one answers, so I try it again here:


I am using VDub to edit my captured 8mm film files. I am not using VDub for the capturing itself (see below). I capture these films with a machine vision camera with a trigger. I have modified an old film projector for this.

I am using special software for this. The software comes with the camera. Every time the camera gets a trigger pulse, it sends a frame to the computer. The software is then writing a frame to a 'growing' AVI file. Works like a charm.. I capture in uncompressed RGB24.

So far so good. But now I'm testing other software. Works fine too.. But! This software creates AVI files with lots of 'D' frames. Dropped frames, yes, but actualy those are not real dropped frames. The key frames are ok. If I capture 100 film frames, I get 100 key frames but also lots of 'D' frames.

I am examining why this is so, but in the mean time I need some tool to just remove those 'D' frames. Then I can use these files, because there are actualy no frames missing at all.

So the question is:
Is there a way to remove 'D' frames (not manual of cource)?

Thank you all in advance,

PS: it looks like the problem is DirectShow related. We will soon find a solution for this. But I still would like to know how to remove the (empty) "d" frames.


Fred.

scharfis_brain
3rd October 2008, 15:17
neuron2 has a filter called multidecimate that is able to only keep differnet frames.

videoFred
3rd October 2008, 18:21
Thank you for the hint, Scharfis.
I will give it a try.

Fred.

squid_80
3rd October 2008, 18:34
Tritical's cfr2tc utility (from the avi_tc_package (http://web.missouri.edu/~kes25c/#c3)) can strip null/drop frames from avi files. I guess you don't need the timecode file it generates, just the new avi file.

(The default directshow avi writer is prone to this sort of behaviour, it's bitten me in the past too.)

videoFred
3rd October 2008, 18:44
(The default directshow avi writer is prone to this sort of behaviour, it's bitten me in the past too.)


This is very interesting information for me, Squid!
Can I talk with you about this later?
I must go now.. I'l be back on monday.

Fred.

squid_80
3rd October 2008, 23:09
I don't remember the specifics, I just remember when using graphedit to run tests on directshow encoders the avi files created using the AVI Mux/File writer filters would nearly always end up with way more frames than they should (lots of drop frames) and a stupidly high framerate. So the files still played back correctly... unless the player tried to force vsync, at which point everything started to get jerky since the monitor had a lower refresh rate than the framerate and couldn't possibly keep up. To fix it I ran them through virtualdub using direct stream copy mode and frame rate conversion->convert to fps to get back to the original framerate.

I don't know for sure but maybe the AVI Mux filter decides on a framerate for the destination AVI file based on the AvgTimePerFrame value from the VIDEOINFOHEADER of the input stream, and if that value isn't set it just makes something up. Then it has to insert the drop frames to match that framerate.

videoFred
6th October 2008, 07:34
Yes, it must be something with the frame rate.
Thank you for the information, Squid!

Fred.