Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VirtualDub, VDubMod & AviDemux

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd August 2011, 09:02   #1  |  Link
HeatM1ser
Registered User
 
Join Date: Jan 2005
Posts: 21
Need help!Can this be done?2 videos,one on top of the other in sync with each other?

I play World of Warcraft, and I have 2 files that are 7:30 long. I'd like to be able to combine them so that you can see both at the same time...like a split screen view. One is a part of the boss fight from one part of the room, while another video is of the fight from a different part of the room. Can I make a video where they both play at the same time on the same screen? If so, what will I need, and what will I need to do? I've already converted the 2 avi files to the same resolution, then shrunk each by 50% as a starter(hopefully that's one of the steps I would have to do anyway)I would also like to place a thing black line between the two videos to make it more appealing to viewers.

Here is an example of what I mean:


Thanks in advance for your help!

Last edited by HeatM1ser; 23rd August 2011 at 09:41.
HeatM1ser is offline   Reply With Quote
Old 23rd August 2011, 10:34   #2  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
You can easily do it in Avisynth, including scaling your clips.
The audio is taken from the first clip ("vid1.avi"). Change the parameters "start_1" or "start_2" to have the two clips aligned in time.

Quote:
#Avisynth script
start_1=0
start_2=0
clip_width=400
clip_height=222
line_thickness=4
vid_1=AviSource("C:\vid1.avi").ConvertToYV12().trim(start_1,0)
vid_2=AviSource("C:\vid2.avi").ConvertToYV12().KillAudio().trim(start_2,0)
vid_1=Spline36Resize(vid_1,clip_width,clip_height)
vid_2=Spline36Resize(vid_2,clip_width,clip_height)
clip_length=Min(Framecount(vid_1),Framecount(vid_2))
vid_3=BlankClip(length=clip_length,width=clip_width,height=line_thickness,fps=FrameRate(vid_1),color=$000000).ConvertToYV12().KillAudio()
StackVertical(vid_1, vid_3, vid_2)
trim(0,clip_length-1)

Last edited by Ulf; 23rd August 2011 at 10:37.
Ulf is offline   Reply With Quote
Old 23rd August 2011, 16:31   #3  |  Link
HeatM1ser
Registered User
 
Join Date: Jan 2005
Posts: 21
Quote:
Originally Posted by Ulf View Post
You can easily do it in Avisynth, including scaling your clips.
The audio is taken from the first clip ("vid1.avi"). Change the parameters "start_1" or "start_2" to have the two clips aligned in time.

I don't want to do it with audio...I want to do it with 2 video's in sync---kind of like picture-in-picture, only I want bother videos to take up half the screen. They are both 7:30 long, and I was hoping to combine them so that one half of the screen showed one video while the other half showed the other video in sync with each other.

Also, I installed Avisynth 2.5, but I see no executable file...did I do something wrong? Is it a separate program, or just kind of like a codec that works with another program?

What would I need to do to make this happen, and what software would I use?

Ok...I think I figured out part of it....I opened the script editor in VirtualDubMod and copied and pasted everything you posted. The only changes I made were to the width and height. I made it 1900x1080. And I changed the directories for the videos....but when I chose to save and refresh the script, VirtualDubMod crashed.

Ok...this is what I did:
Quote:
#Avisynth script
start_2=0
clip_width=1920
clip_height=1080

line_thickness=4
vid_1=AviSource("C:\vid1.avi").ConvertToYV12().trim(start_1,0)
vid_2=AviSource("C:\vid2.avi").ConvertToYV12().KillAudio().trim(start_2,0)
vid_1=Spline36Resize(vid_1,960,540)
vid_2=Spline36Resize(vid_2,960,540)
clip_length=Min(Framecount(vid_1),Framecount(vid_2))
vid_3=BlankClip(length=clip_length,width=1920,height=1080line_thickness,fps=FrameRate(vid_1),color=$000000).ConvertToYV12().KillAudio()
StackVertical(vid_1, vid_3, vid_2)
trim(0,clip_length-1)
Each video was at 1920x1080, so I shrunk them down to 960x540 each. The changes I made to the code you gave me are in bold. I renamed both videos to vid1.avi and vid2.avi and put them in the c: directory...but I still get VirtualDubMod crashes(runtime errors) when I select "save and open as AVI." What am I doing wrong?

Last edited by HeatM1ser; 23rd August 2011 at 17:20.
HeatM1ser is offline   Reply With Quote
Old 23rd August 2011, 19:24   #4  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 3,597
I think you just did a few typos in the script, be careful not to change resolution numbers when you aren't sure what they are for.

you want clip_width and height to be what you want each part of the split screen at, not the total file. Also start with your original files, encoding twice will lose quality.

Quote:
#Avisynth script
start_1=0
start_2=0
clip_width=960
clip_height=540
line_thickness=4
vid_1=AviSource("C:\vid1.avi").ConvertToYV12().trim(start_1,0)
vid_2=AviSource("C:\vid2.avi").ConvertToYV12().KillAudio().trim(start_2,0)
vid_1=Spline36Resize(vid_1,clip_width,clip_height)
vid_2=Spline36Resize(vid_2,clip_width,clip_height)
clip_length=Min(Framecount(vid_1),Framecount(vid_2))
vid_3=BlankClip(length=clip_length,width=clip_width,height=line_thickness,fps=FrameRate(vid_1),color=$000000).ConvertToYV12().KillAudio()
StackVertical(vid_1, vid_3, vid_2)
trim(0,clip_length-1)
If you don't want a black line between the top and bottom video just comment out (# at the start of the line) or delete the vid_3= line and just use StackVertical(vid_1, vid_2) instead of StackVertical(vid_1, vid_3, vid_2).

Last edited by Asmodian; 23rd August 2011 at 19:29.
Asmodian is offline   Reply With Quote
Old 23rd August 2011, 19:47   #5  |  Link
HeatM1ser
Registered User
 
Join Date: Jan 2005
Posts: 21
Quote:
Originally Posted by Asmodian View Post
I think you just did a few typos in the script, be careful not to change resolution numbers when you aren't sure what they are for.

you want clip_width and height to be what you want each part of the split screen at, not the total file. Also start with your original files, encoding twice will lose quality.



If you don't want a black line between the top and bottom video just comment out (# at the start of the line) or delete the vid_3= line and just use StackVertical(vid_1, vid_2) instead of StackVertical(vid_1, vid_3, vid_2).
I copied and pasted the code you gave me, then chose "save & refresh", then chose "save and open avi"---when I named it vid3.avi and tried to save and open it, I got a runtime error again. So, I tried it all over again, but I removed the line "start_1=0" and I still got a runtime error...what am I doing wrong? Oh, and I would like a thin line between the two videos


Appreciate your help! As you can see, I am new to this.

PS--I even copied the original code that was given without any modifications and got a runtime error

Last edited by HeatM1ser; 23rd August 2011 at 19:49.
HeatM1ser is offline   Reply With Quote
Old 23rd August 2011, 20:40   #6  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
You should save the Avisynth script with the suffix .avs, then open the script in Virtualdub (e.g. save it as video.avs).

There is no need to move and rename your avi files - just put the correct path and names into the script.

The variable line_thickness sets the height of the black border between your avi files.
Ulf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.