Conditional filter for VirtualDub
Overview
This is not a filter in the usual sense: it does not perform any image processing by itself. It allows you to apply other filters to some parts of the video. You can also apply some filter to the whole video but use different settings for different parts of this video.
I have started to implement this filter because I had captured video from the camcorder with very different quality of some scenes. My camcorder produces ugly pictures by low light, so for such scenes I had to increase the saturation and apply very agressive cleaner. I had started with Steven Don's filter blender and Chris LaRosa's frame tweaker to blend out and merge together scenes with different filter's settings. It works great and I was realy happy! Afterwards I had seen the estimated processing time for the whole sequence: 2 days (yes, my computer is not the fastest one). If I frame-serve the output to some MPEG encoder with 2 pass settings on, I will have 4 days only on the VirtualDub side!
This filter acts like a proxy between VirtualDub and a particular filter. If VirtualDub runs the filter chain, conditional filter first evaluates the branches in the given order until it find the appropriate one. In that case we load the specified settings and call the selected filter as usual. Otherwise, just do nothing and give the control to the next filter in the chain.
Using conditional
Using is quite simple: add conditional to the chain, you will be promted for what filter you wish to control. After that give your condition and setup the corresponding filter.
More information you can find via following links:
Examples
frame < 100
All frames with frame numbers from 0 to 99
not stamp(120-140,150,200-210)
All frames except mentioned above. The frame number is taken from the source file (stamp),
ignoring all deleted scenes.
frame % 2 = 0
All even frames
frame / 10 % 2 = 0
All even blocks a 10 frames
rand(2) = 0
Random frames
max(luma) - min(luma) < 30
Low contrast
PS: Any comments are welcome!
Dmitri Schamschurko