2 video sources in 1 .avs script?

The old Video Software Help forum, left visible as an archive.

2 video sources in 1 .avs script?

Postby 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
delirium_sj
 
Joined: 12 Feb 2004
Location: WA

Postby 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
Willen
Now in Hi-Def!
 
Joined: 10 Jul 2005
Location: SOS-Dan HQ
Status: Melancholy

Re: 2 video sources in 1 .avs script?

Postby 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
sysKin
 
Joined: 26 Mar 2004

Re: 2 video sources in 1 .avs script?

Postby 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
Gepetto
Mr. Poopy Pants
 
Joined: 10 Jun 2004
Location: The Tokyo Settlement
Status: Bored to tears

Postby 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: 12 Feb 2004
Location: WA

Postby 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
delirium_sj
 
Joined: 12 Feb 2004
Location: WA

Postby 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
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Postby 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
Melanchthon
 
Joined: 02 Sep 2004

Postby 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
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Postby 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. :/
User avatar
Melanchthon
 
Joined: 02 Sep 2004

Postby Qyot27 » Tue Aug 08, 2006 3:16 pm

Basically, Import treats AviSynth scripts like AVISource treats AVIs, MPEG2Source treats d2v files, etc. There are only two instances where I remember using Import. The first is when I need to filter two or more distinctly different parts of the same video but there are other operations I need to take of first, in which case I set up the main script to do general filtering, and then another script that uses Import, Trim, the specific filtering, and splicing (the + and ++ arguments) commands to fit it back together.

The other instance is when doing a pseudo bait-and-switch technique where there are simple scripts opening the MJPEG files (these simple scripts would have the same exact filenames as the ones that work with the vobs), and a bunch of scripts that Import one of the MJPEG loading scripts and use Trim to isolate individual clips, so you don't have to open the whole episode in the editor at once (I learned the hard way that Premiere 6.5 does not like this, although if it's kept below ~70 'clips' there shouldn't be a problem - mileage may vary with newer computers or Premiere Pro). On a simpler level, it could just be used in that capacity to automate generating AVI clips from the master vob scripts using VirtualDub's Job Control (the Process Directory option, to be exact).
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs


Return to Video Software Help Archive

Who is online

Users browsing this forum: No registered users and 1 guest