View Full Version : stacking clips
trolltuning
27th December 2003, 20:16
I have 6 clips that I want to arrange from top left to right and then bottom L to R as follows:
D:\ant D:\bear D:\elephant
D:\ferret D:\girafe D:\horse
How do I use the stacking commands to achieve this? I can't seem to make more than 2 movies stack.
Andy Pollock
stickboy
27th December 2003, 21:12
What's your script?
This works for me:
red=BlankClip(width=240, height=240, color=$FF0000)
green=BlankClip(width=240, height=240, color=$00FF00)
blue=BlankClip(width=240, height=240, color=$0000FF)
yellow=BlankClip(width=240, height=240, color=$FFFF00)
magenta=BlankClip(width=240, height=240, color=$FF00FF)
cyan=BlankClip(width=240, height=240, color=$00FFFF)
StackVertical(StackHorizontal(red, green, blue),
\ StackHorizontal(yellow, magenta, cyan))
trolltuning
28th December 2003, 02:16
Thanks. I think I deleted all the scripts I tried. Its a little frustrating when you don't have scripting experience. I tried to make your script work, but I'm not sure where to add the paths for each clip.
matrix
28th December 2003, 06:52
If you have to use his words, here it is:
red=avisource("D:\ant.avi")
green=avisource("D:\bear.avi")
blue=avisource("D:\elephant.avi")
yellow=avisource("D:\ferret.avi")
magenta=avisource("D:\girafe.avi")
cyan=avisource("D:\horse.avi")
StackVertical(StackHorizontal(red, green, blue),StackHorizontal(yellow, magenta, cyan))
trolltuning
28th December 2003, 13:53
Thanks Matrix. When I use avisource I get an error telling me the heights are different. When I try and use Blankclip it says I'm using illegal arguments. Here is the last thing I tried using actual filenames.
# File: D:\web\Forrest8.avs (unsplitted)
#==============================================================
# created from [AviScript] at: 28.12.2003, 06:55
#==============================================================
# variables generated by AviScript
video = "D:\web\PSG1hiphop4.avi"
audio = ""
masktop = 0
maskbuttom = 0
maskleft = 0
maskright = 0
red=BlankClip("D:\web\PSG1hiphop4.avi",width=240, height=240, color=$FF0000)
green=BlankClip("D:\avis\hiphopBrendan25.avi",width=240, height=240, color=$00FF00)
blue=BlankClip("D:\avis\Zonaradikos.avi",width=240, height=240, color=$0000FF)
yellow=BlankClip("D:\avis\rainbow.avi",width=240, height=240, color=$FFFF00)
magenta=BlankClip("D:\avis\Blue.avi",width=240, height=240, color=$FF00FF)
cyan=BlankClip("D:\avis\ashley.avi",width=240, height=240, color=$00FFFF)
StackVertical(StackHorizontal(red, green, blue),StackHorizontal(yellow, magenta, cyan))
matrix
28th December 2003, 15:28
Well, you have to resize your clips to the same resolution. LanczosResize(240,160) , or with blankclips you have to convert the color ConverttoYUY2()
But you don't want to use blankclips right?
If your clips are the same resolution, it should work.
What video format are they?
For avi you use avisource
For d2v you use mpeg2source
For mpg you use directshowsource or mpegsource.
trolltuning
28th December 2003, 16:21
So I should put the resize command after each line like this?
red=avisource("D:\web\PSG1hiphop4.avi")
LanczosResize(240,160)
green=avisource("D:\avis\hiphopBrendan25.avi")
LanczosResize(240,160)
etc.
trolltuning
28th December 2003, 17:26
Thanks Matrix. I did get it to work by doing this (see below). Not sure if I added more steps than I needed. Most of the video is jumpy but I think that will go away when I add deinterlacing. Strangely one of the videos flashes into the space that another is playing in (Windows Media and PowerDVD but not in Virtual Dub. I suspect that is because I had diffrent audio bitrates in the originals? At any rate I think I can fix it now.
# File: D:\web\Forrest8.avs (unsplitted)
#==============================================================
# AVISynth-Script to generate Stream: [SVCD (NTSC 480x480, ratio 4:3)]
# created from [AviScript] at: 28.12.2003, 06:55
#==============================================================
# variables generated by AviScript
video = "D:\web\PSG1hiphop4.avi"
audio = ""
masktop = 0
maskbuttom = 0
maskleft = 0
maskright = 0
red=avisource("D:\web\PSG1hiphop4.avi")
LanczosResize(red,240,160)
red2=last
green=avisource("D:\avis\hiphopBrendan25.avi")
LanczosResize(green,240,160)
green2=last
blue=avisource("D:\avis\outside.avi")
LanczosResize(blue,240,160)
blue2=last
yellow=avisource("D:\avis\rainbow.avi")
LanczosResize(yellow,240,160)
yellow2=last
magenta=avisource("D:\avis\Blue.avi")
LanczosResize(magenta,240,160)
magenta2=last
cyan=avisource("D:\avis\ashley.avi")
LanczosResize(cyan,240,160)
cyan2=last
matrix
29th December 2003, 04:20
So I should put the resize command after each line like this?
No. you have to do it this way:
red=avisource("D:\web\PSG1hiphop4.avi").LanczosResize(240,160)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.