Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > VirtualDub Filters and Filter Development > Multiple Input Streams In One Filter?


Posted by: jrest Mar 28 2003, 09:29 AM
In DirectX one filter can have more than one input- and more than one output pin. This is very convenient in the following type of set up:

One filter computes the "background" of a scene. This is done for example with an average over all the pixels. This background will change over the duration of the video. For example, it can be reset after each shotbreak.

Another filter uses this realtime background and subtracts it from the current frame to leave only the moving parts. These parts can then be used for further analysis. This filter needs to have two input streams.

Similar examples can be arranged for multiple output streams.

Is such an arrangement possible in VirtualDub? If not, why not?

Posted by: ChristianHJW Mar 29 2003, 11:49 AM
Because you were lazy and didnt send in your existing code that will allow us to do this ?

Posted by: jrest Mar 31 2003, 07:02 AM
Please allow me to prevent re-inventing the wheel. I take it this means it is not possible? And what about AviSynth?

Regards,

Jeroen

Posted by: Pamel Mar 31 2003, 07:20 AM
This isn't possible with virtualdub because of the nature of vfw. It only has a single path for each stream. I believe that AVISynth works the same way.

Your best bet would be to create your tool using Directshow.

Posted by: phaeron Mar 31 2003, 07:31 AM
Bull.

The design of VFW has nothing to do with it. VFW is not a flowgraph system like DirectShow -- a VFW app controls the flow of data directly rather than being forced to work through an external system. The reason why VirtualDub doesn't support video filters with multiple inputs/outputs is very simply that I didn't have a need for it when I designed the original system. In fact, DirectShow itself is the proof that VFW is not an obstacle, since its use of VFW codecs serves as a constructive proof that such a system can be built on top of VFW!

The VirtualDub audio system does support multiple inputs and outputs, and in fact, some components that were introduced in 1.5 to support audio filtering were designed to be reusable for a future video system upgrade, most notably the filter graph control. Unfortunately, such a video upgrade wouldn't use that useful without the support for multiple inputs/outputs or external sources (images, etc) in the graph. It's not that useful in the audio system either for the same reasons, but I figured I should add the support since I was ramping up a new system and didn't have backward compatibility obstacles.

Posted by: fccHandler Mar 31 2003, 08:10 AM
QUOTE (jrest @ Mar 31 2003, 03:02 AM)
Please allow me to prevent re-inventing the wheel.

My advice: Don't ever let yourself be dissuaded by the idea that you might be re-inventing the wheel. Who knows, your wheel may turn out better than the original. Even if it doesn't, you'll learn a lot from the experience.

Posted by: Pamel Mar 31 2003, 03:34 PM
QUOTE (phaeron @ Mar 31 2003, 01:31 AM)
Bull.

I understand how it works, I was just trying to condense down an answer because I was really tired. I am sorry that I didn't porper convey my ideas. I should have waited for the morning.

Posted by: endorphin Apr 6 2003, 07:08 PM
I'd be really impressed and pleased to see a filter graph control.

While most of my video processing is done for clarity and fidelity, a percentage of it is done for fun and effects. One of my favorites so far is intentionally weird use of Donald Graft's Windowed Histogram Equalizer. It really plays with human psychovisual quirks. In some cases it creates video output that almost looks more "true" in a poetic way than the original footage.

In terms of special effects, the possibilities of what can be done by splitting video streams, filtering them separately and recombining them, are terrific.

Anyone here ever played with a Unix/X11 app called Cantata, from the University of ____ (i forget) back in about 1992? In cantata you apply all your filters in visual form on a graph, connecting inputs and outputs at will.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)