Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > VirtualDub Filters and Filter Development > A Plugin That Mirrors Video


Posted by: Denizen Aug 24 2012, 01:03 AM
I need a plugin for VDub that mirrors the video along a set line. For example, the right side of this video has a person, the left side doesn't. I set this line to mirror down the middle, now the left side also has a person except that person is a mirror image of the person on the right. Get what I'm saying?

Help would be appreciated VERY much so since these forums are kind of inactive.

Posted by: dloneranger Aug 24 2012, 05:10 AM
I don't think I've seen one of those

AviSynth can do it though
Install that and then make a new file - lets call it mirrored.txt
edit that and paste these lines into it

CODE
# put correct video name here
orig = avisource("H:\Video Output\lags\All American Girls.avi")

# keep 320 pixels wide and 480 high
# change these numbers to match the 'left' bit of your video
vidleft = orig.crop( 0,0,322,480 )
vidright = vidleft.fliphorizontal()

finished = stackhorizontal(vidleft, vidright)
return(finished)


(replace the video name with your own file)

Then rename mirrored.txt to mirrored.avs and load it with virtualdub

That should give you something like
http://imageshack.us/photo/my-images/23/95700889.jpg/


Posted by: Denizen Aug 24 2012, 03:42 PM
QUOTE (dloneranger @ Aug 24 2012, 05:10 AM)
I don't think I've seen one of those

AviSynth can do it though
Install that and then make a new file - lets call it mirrored.txt
edit that and paste these lines into it

CODE
# put correct video name here
orig = avisource("H:\Video Output\lags\All American Girls.avi")

# keep 320 pixels wide and 480 high
# change these numbers to match the 'left' bit of your video
vidleft = orig.crop( 0,0,322,480 )
vidright = vidleft.fliphorizontal()

finished = stackhorizontal(vidleft, vidright)
return(finished)


(replace the video name with your own file)

Then rename mirrored.txt to mirrored.avs and load it with virtualdub

That should give you something like
http://imageshack.us/photo/my-images/23/95700889.jpg/

That's exactly what I wanted, thanks. I was just looking for a plugin as I'm actually using VideoPad and it supports most VirtualDub plugins, but I'll just use a combo of both, thanks

Posted by: dloneranger Aug 24 2012, 05:26 PM
Yeah, it'd be a really limited use plugin though, so I can't see anyone going to the effort to be honest
Avisynth is brilliant at that kind of thing though, just doing a mirror effect barely scrapes the surface of it

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