I have a video device which gets 4 video inputs and gives one single output made up of a sequence of the 4 inputs, 2 seconds per each one.
Does it exist a SW which can separate the 4 inputs and show them on the monitor at the same time? For example a virtualdub plugin?
Is it complex to write a VD plugin? I'm a VB developer...![]()
+ Reply to Thread
Results 1 to 10 of 10
-
-- Jumpjack --
-
AviSynth could do it. But there would have to be exactly the same number of frames in the sequences, throughout the video. See SelectEveryRange(), StackHorizontal(), and StackVertical(). For example, with 30 fps material and 2 second segments (ie, 60 frames per segment):
src = WhateverSource("filename.ext")
a = SelectEveryRange(240, 60, 0)
b = SelectEveryRange(240, 60, 60)
c = SelectEveryRange(240, 60, 120)
d = SelectEveryRange(240, 60, 180)
StackVertical( StackHorizontal(a,b),StackHorizontal(c,d))Last edited by jagabo; 30th Mar 2010 at 16:36.
-
Using avisynth you can use this function:
Code:vid = AVISource("input.avi") Quad(vid, 24, 2) Function Quad(clip v, float fps, int seconds) { every = fps * seconds ul = SelectRangeEvery(v, every, every, 0) ur = SelectRangeEvery(v, every, every, every) ll = SelectRangeEvery(v, every, every, every * 2) lr = SelectRangeEvery(v, every, every, every * 3) up = stackhorizontal(ul,ur) dn = stackhorizontal(ll,lr) return stackvertical(up,dn) }
-
It's possible to use a GraphEdit capture graph as the source in AviSource(). I've done this to view live video with AviSynth filtering. I don't know if this exact script will work with a live source though -- because different parts of the final picture come from different points in time in the original video stream.
AviSynth only works in the background. It requires that you use some other program to do the actual display or saving of the video. But the program can't modify AviSynth's behavior as it's running. For example, you won't be able to switch between a normal display and a quad display.
You should also keep in mind that this will create an frame that is twice the horizontal and vertical dimensions of the source. If your source is 720x480 you will end up with a 1440x960 image. You can reduce that back to 720x480 by adding a resize filter before or after stacking. Before stacking:
a = SelectEveryRange(240, 60, 0).BilinearResize(360,240)
b = SelectEveryRange(240, 60, 60).BilinearResize(360,240)
c = SelectEveryRange(240, 60, 120).BilinearResize(360,240)
d = SelectEveryRange(240, 60, 180).BilinearResize(360,240)
StackVertical( StackHorizontal(a,b),StackHorizontal(c,d)).Bilinea rResize(720,480) -
-- Jumpjack --
-
Ah yes, of course you could do that:
src = AviSource("filename.avi").BilinearResize(360,240)
src=AviSource("filename.avi").BilinearResize(360,2 40)
a = SelectRangeEvery(src,240, 60, 0)
b = SelectRangeEvery(src,240, 60, 60)
c = SelectRangeEvery(src,240, 60, 120)
d = SelectRangeEvery(src,240, 60, 180)
StackVertical( StackHorizontal(a,b),StackHorizontal(c,d))
src=DirectShowSource("capture.grf", audio=false, fps=29.97, framecount=99999).BilinearResize(360,240)
a = SelectRangeEvery(src,240, 60, 0)
b = SelectRangeEvery(src,240, 60, 60)
c = SelectRangeEvery(src,240, 60, 120)
d = SelectRangeEvery(src,240, 60, 180)
StackVertical( StackHorizontal(a,b),StackHorizontal(c,d))
The media player or editor crashes when opening the AVS script. The same graph and a simple DirectShowSource("capture.grf", audio=false, fps=29.97, framecount=99999).BilinearResize(360,240) works fine.
I'm not exactly sure, but I think this doesn't work because AviSynth needs to seek within the frames to SelectRangeEvery(). That's no problem with a file but with a capture the future frames don't exist. There may be a way around this with the Animate() or ApplyRange() filters. But you'll have to find someone who knows how to use those filters better than me!Last edited by jagabo; 31st Mar 2010 at 09:54.
-
doesn'tit exist in Avisynth any kind of sleep() function to pause the program for some milliseconds?
and what about interfacing Avisynth to the world? I'm not sure my device timing is very precise, so I guess I'll eventually get out of synch, hence I was thinking about controlling the device through the serial port, to tell it when to switch channel exactly (it has a manual swithcing button).
Does avisynth have kind of an exec() or run() function to run external applications, so I could write an external application to control the serial port?-- Jumpjack --
Similar Threads
-
4-channel DV switcher software available for download
By JohnnyMalaria in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 54Last Post: 14th Sep 2010, 17:07 -
Using video presence detector to detect blank video signal from switcher.
By rabbi in forum Newbie / General discussionsReplies: 0Last Post: 6th Jul 2010, 01:30 -
software video switcher for DV cams
By sander815 in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 3Last Post: 13th Jan 2010, 09:09 -
ANY conversion software with Quad Core support
By Bacender in forum Newbie / General discussionsReplies: 3Last Post: 1st Nov 2008, 19:13 -
Video Mixer/Switcher
By max67 in forum Software PlayingReplies: 1Last Post: 16th Jun 2008, 10:51