PDA

View Full Version : Need a plugin that spots (and strips) "stray" frames


yukichigai
3rd December 2007, 23:58
I've been capturing video with a USB HD tuner I snagged on black friday. It works reasonably well, except that when capturing via the S-Video inputs it occasionally includes a "stray" frame from video a few seconds prior. (Presumably to make up for a dropped frame) It's just noticeable enough to be annoying. I convert what I record to a smaller format anyway, so I usually take the time to strip out any "stray" frames I find and replace 'em with duplicates of the previous frame, but I'm sure there are strays I've missed. To that end I'm hoping there's an avisynth plugin which basically can spot "stray" frames for me and then replace them with either a duplicate of the previous frame or (even better) a blended or motion estimated frame based on the previous and next frames. It'd also be nice if it could detect two-frame sequences of strays, rather than just solo strays, as it would probably wind up looking better if I used it after TFM and before whatever IVTC process I use on the specific video.

Does anybody happen to know of a plugin which can do this?

Dark Shikari
4th December 2007, 01:36
What you could do is have some way of checking the following:

IF The prior frame and next frame are within some similarity threshold of each other.
{
IF the current frame's difference between those two frames is vastly higher than those two frames' difference from each other
{
REPLACE the frame.
}
}

yukichigai
5th December 2007, 09:01
That would probably be how I'd do it if I knew how (or was able to) write a plugin to do that. If it comes down to it I might make my first crack at avisynth plugin creation making said plugin. In the meantime though I'm hoping that someone else has already done that. :P

Blue_MiSfit
5th December 2007, 22:32
could decimate() or tdecimate() maybe do this? IIRC their purpose is to detect and annhilate dupes. These dupes are generally created by telecide() or TFM(), which are field matchers, but decimate() or tdecimate() shouldn't care.

I'm no expert though. :)

~misfit