# Two Video Clips Side by Side

1. Is there a way to make one video clip/file which contains two video files running side by side? (In sort of a split screen.)
2. Several ways. Many editor support picture in picture type effects. Avisynth has the StackHorizontal statement.

What tools do you have, and what output do you want ?
3. AVISynth and the StackHorizontal() command should do it.

A sample script would be something like the following:

Code:
clip1=AVISource("c:\path\to\file1.avi")
clip2=AVISource("c:\path\to\file2.avi")
StackHorizontal(clip1, clip2)

This produces:

4. Please excuse my ignorance, but the script that I was trying to use is giving me an error when I try to use it in virtual dub.

This is what I was trying to use:

clip1=AVISource("c:\1.avi")
clip2=AVISource("c:\2.avi")
StackHorizontal(clip1,clip2)

What am I missing here?

5. It is looking in the root directory of Drive C: and not finding the clip. You need to edit your script to where the files really are.

Plus that is a bad place to put any files. You should keep the root directory of any hard drive free of clutter. Be very careful deleteing any files from C:\ or you could end up not booting as there are hidden files there that are needed to boot windows.
6. Originally Posted by TBoneit
It is looking in the root directory of Drive C: and not finding the clip. You need to edit your script to where the files really are.

Plus that is a bad place to put any files. You should keep the root directory of any hard drive free of clutter. Be very careful deleteing any files from C:\ or you could end up not booting as there are hidden files there that are needed to boot windows.
I understand what you are saying, but the location of the files on the script is were the files are located. I tired putting them in a dfferent location on my computer, but I thought maybe I was messing the location of the files up on the 1st time I tried it. So that is why I just moved them to C:\ so there would be no way that I could get the location of the files wrong.
7. clip1=AVISource("F:\video1.avi")
clip2=AVISource("F:\video2.avi")
StackHorizontal(clip1, clip2)

Mine works.
8. Silly question, and no offense intended, but have you installed avisynth ?
9. Is there any way to accomplish this with Vegas 6?
10. Load the two clips onto separate timelines and use Track Motion to position each frame within the visible screen
11. Sweet. Thanks.
12. Originally Posted by guns1inger
Silly question, and no offense intended, but have you installed avisynth ?
13. Originally Posted by guns1inger
Silly question, and no offense intended, but have you installed avisynth ?

Yes........
14. I use AvsP. AvsP is a text editor built for AviSynth and has a built-in preview window so you can see the results.

Simply right-click - insert source - browse and double click on your video1.avi.
Click the start of that line and type in clip1 =.
Right-click - insert source - browse and double click on your video2.avi.
Click the start of that line and type in clip2 =.

Right click - select Show Function Definition - then cancel - then scroll down and find StackHorizontal then click-click then select copy. Close box. Paste command into script. Type (clip1, clip2)

Click the black up arrow at the bottom of screen to view your stacked videos (scroll --> to see the second video if needed)

Makes writing scripts a lot easier....

Good luck.
15. Thanks!!!

Is there a way to stack 4 videos
2x2
16. Yep. There's a guide in the guides section written by Truman that has a number of AVISynth examples, including a 2x2 stack. You might have to change the search criteria from new guides to all guides to find it though.

Basically you create two seperate horizontal stacks as shown in this thread, then vertically stack them together (or vice-versa).
17. Can you please give an example, cos I got nfi how I'd go about writing script for stacking twice vertically and horizontally.

I'm fine doing it once.
18. A=AVISource("C:\Path\To\Video1.avi")
B=AVISource("C:\Path\To\Video2.avi")
C=AVISource("C:\Path\To\Video3.avi")
D=AVISource("C:\Path\To\Video4.avi")
StackVertical(StackHorizontal(A,B),StackHorizontal (C,D))
19. Originally Posted by spanky123
Can you please give an example, cos I got nfi how I'd go about writing script for stacking twice vertically and horizontally.

I'm fine doing it once.
I don't know what part of
Originally Posted by jimmalenko
There's a guide in the guides section written by Truman that has a number of AVISynth examples, including a 2x2 stack.
you didn't understand, but ...

Here is the guide I was talking about:
http://www.videohelp.com/guides.php?guideid=120#120

And here is the code in question:
http://forum.videohelp.com/viewtopic.php?t=99389#crop

Although it should be mentioned that this is for showing the same video in the 4 quadrants. Manono's script is for 4 seperate videos.
20. Thanks. Sorry.

Statistics