Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Multiple Input Streams In One Filter?, Like in DirectX?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
jrest
Posted: Mar 28 2003, 09:29 AM


Unregistered









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?
 
  Top
ChristianHJW
Posted: Mar 29 2003, 11:49 AM


Advanced Member


Group: Moderators
Posts: 1768
Member No.: 2
Joined: 7-July 02



Because you were lazy and didnt send in your existing code that will allow us to do this ?

--------------------
Visit the unofficial Virtualdub support forum on http://forums.virtualdub.org - help to reduce the big number of emails Avery Lee is getting every day !!
Support matroska as container and Gstreamer as the only truely open, x-platform multimedia platform ....
 
       Top
jrest
Posted: Mar 31 2003, 07:02 AM


Unregistered









Please allow me to prevent re-inventing the wheel. I take it this means it is not possible? And what about AviSynth?

Regards,

Jeroen
 
  Top
Pamel
Posted: Mar 31 2003, 07:20 AM


matroska team member


Group: Moderators
Posts: 151
Member No.: 1353
Joined: 15-December 02



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.

--------------------
Please take anything I say with many many grains of salt. I can't tell the difference between my AVI and a hole in the ground.
 
      Top
phaeron
Posted: Mar 31 2003, 07:31 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



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.
 
    Top
fccHandler
Posted: Mar 31 2003, 08:10 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



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.

--------------------
May the FOURCC be with you...
 
     Top
Pamel
Posted: Mar 31 2003, 03:34 PM


matroska team member


Group: Moderators
Posts: 151
Member No.: 1353
Joined: 15-December 02



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.

--------------------
Please take anything I say with many many grains of salt. I can't tell the difference between my AVI and a hole in the ground.
 
      Top
endorphin
Posted: Apr 6 2003, 07:08 PM


Advanced Member


Group: Members
Posts: 112
Member No.: 3488
Joined: 4-April 03



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.
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
7 replies since Mar 28 2003, 09:29 AM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Filters and Filter Development