2 video sources in 1 .avs script?

The old Video Software Help forum, left visible as an archive.
User avatar
delirium_sj
Joined: Thu Feb 12, 2004 1:02 am
Location: WA
Contact:
Org Profile

2 video sources in 1 .avs script?

Post by delirium_sj » Tue Aug 08, 2006 1:00 am

I'm in the process of getting my KH2 footage ready (pain in the ass, not much footage to get & still no sound :evil: ).

Anyway, I had 2 .m2v files where one had the beginning cut off and the other had the end cut off of the same FMV. So I made a .d2v of both, one with just the beginning cut where it faded to black, and another .d2v with the rest.

I wanted to put them together to make an .avi of the complete FMV in VirtualDubMod. I'm fairly new to avisynth and need some direction. :oops: Is there a way to put multiple video sources in a single .avs script and have them run consecutively? Help please?

User avatar
Willen
Now in Hi-Def!
Joined: Sun Jul 10, 2005 1:50 am
Status: Melancholy
Location: SOS-Dan HQ
Org Profile

Post by Willen » Tue Aug 08, 2006 5:12 am

I'm not sure that you can.

One way of doing this is to load each d2v file separately and output each as an AVI file. Then load the first AVI into VirtualDubMod and use Append Segment... to add the second one. Use Save As... and Direct Stream Copy to output the joined video.
Having trouble playing back videos? I recommend: Image

User avatar
sysKin
Joined: Fri Mar 26, 2004 6:37 am
Org Profile

Re: 2 video sources in 1 .avs script?

Post by sysKin » Tue Aug 08, 2006 6:58 am

delirium_sj wrote: Is there a way to put multiple video sources in a single .avs script and have them run consecutively? Help please?
But of course :)

clip1=mpeg2source(...)
clip2=mpeg2source(...)
return clip1+clip2

Although dgindex is *meant* to open multiple files (usually vobs) and create only one d2v file from them all, you could just do that.

User avatar
Gepetto
Mr. Poopy Pants
Joined: Thu Jun 10, 2004 10:11 pm
Status: Bored to tears
Location: The Tokyo Settlement
Contact:
Org Profile

Re: 2 video sources in 1 .avs script?

Post by Gepetto » Tue Aug 08, 2006 8:21 am

simpler way: (AviSynth 2.5.5 and above)

Code: Select all

mpeg2source(...)+mpeg2source(...)
The input has to be in the same colorspace and resolution (as well as in sysKin's method) but from what you said it probably is.

If you don't know the version of your AviSynth, create a new script and type in

Code: Select all

Version()
then play the script.

However...
sysKin wrote:Although dgindex is *meant* to open multiple files (usually vobs) and create only one d2v file from them all, you could just do that.
He is right.
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile

User avatar
delirium_sj
Joined: Thu Feb 12, 2004 1:02 am
Location: WA
Contact:
Org Profile

Post by delirium_sj » Tue Aug 08, 2006 10:39 am

Thank you! I'll be trying the script in a minute and if it doesn't work will do what Willen suggested.
sysKin wrote:
Although dgindex is *meant* to open multiple files (usually vobs) and create only one d2v file from them all, you could just do that.
Normally, this is what I would do & I did try it, but since the files were *broken* it just wouldn't work.

Thanks again guys. Will be right back and let y'all know how it worked out! :D

User avatar
delirium_sj
Joined: Thu Feb 12, 2004 1:02 am
Location: WA
Contact:
Org Profile

Post by delirium_sj » Tue Aug 08, 2006 10:55 am

:D Yay! It worked! I tried both script suggestions, and went with just adding the +. (the words clip were red, and although I didn't get an error with it...seeing red there just freaks me out :lol:) Wouldn't let me put it in my old script though, I didn't get a script error but VDubMod wouldn't play the part I added. :P But putting it all in a new script works. :D Thanks!!!!!!!!

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Tue Aug 08, 2006 11:38 am

delirium_sj wrote:Wouldn't let me put it in my old script though
You can use Import() to open scripts inside other scripts.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Melanchthon
Joined: Thu Sep 02, 2004 11:12 am
Org Profile

Post by Melanchthon » Tue Aug 08, 2006 12:26 pm

It ate my post... :evil:
delirium_sj wrote:(the words clip were red, and although I didn't get an error with it...seeing red there just freaks me out :lol:)
Oh, you learn to ignore that after a while. It doesn't mean any more than having the letters in any other colour.

I still haven't worked out what it thinks 'clip' is a misspelling of.
Qyot27 wrote:You can use Import() to open scripts inside other scripts.
How do you call the scripts? So far all I've managed to get is 'invalid arguments to [function that works fine when part of the main script]'.

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Tue Aug 08, 2006 2:22 pm

Melanchthon wrote:
Qyot27 wrote:You can use Import() to open scripts inside other scripts.
How do you call the scripts? So far all I've managed to get is 'invalid arguments to [function that works fine when part of the main script]'.
What are you trying to do? For instance, I have this script (saved as haruhiep3_1.avs):

Code: Select all

MPEG2Source("haruhiep3_1.d2v", ipp=true, cpu=4)
TFM(order=-1,mode=5,PP=7,field=-1,slow=2)
TDecimate()
Crop(4,0,-4,0)
deen("w3d",2,8,8)
Lanczos4Resize(848,480)
ConvertToRGB24()
AssumeFPS(24)
and I make another script to do some more things to it:

Code: Select all

Import("haruhiep3_1.avs")
Invert()
FlipVertical()
Is it something along those lines that you're trying to do, or something different?
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Melanchthon
Joined: Thu Sep 02, 2004 11:12 am
Org Profile

Post by Melanchthon » Tue Aug 08, 2006 2:37 pm

Yeah, that's the one. Thankns for clearing that up. Guess my mind still hasn't grasped that there's really no difference between .avs filters and the stuff in the main script, or maybe I was getting my wires crossed somewhere when it came to .avs filters and .dll filters.

I'm overthinking things again. :/

Locked

Return to “Video Software Help Archive”