Script + Script + Script

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Script + Script + Script

Post by Bauzi » Sun Aug 17, 2008 6:09 am

Hi!

I know that you can add together video clips with functions like
AviSource()+AviSource()+AviSource()

Well I would like to add together scripts with videos in them, like
AVSSource()+AVSSource()+AVSSource()

Can I do something like that and how can I do it?


thx in advice
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Scott Green
Greenwhore
Joined: Thu Mar 23, 2006 1:25 pm
Status: The Dark Tower
Location: Austria
Org Profile

Post by Scott Green » Sun Aug 17, 2008 7:16 am

directshowsource("filepath/script.avs")+directshowsource("filepath/script.avs")+directshowsource("filepath/script.avs")

should do the trick... i believe

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Post by mirkosp » Sun Aug 17, 2008 7:25 am

Actually, avisource is able to import avs scripts. :P
So yeah, you could just do
avisource("script1.avs")+avisource("script2.avs")+avisource("script3.avs")

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Sun Aug 17, 2008 8:04 am

Yes, both AviSource and DirectShowSource (and DSS2, for that matter) can typically import AviSynth scripts just fine, although the 'proper' way to import scripts would be to use the Import filter. It is unlikely to make much of a difference which method you use, but I personally always use Import. One added benefit is that anything you loaded or declared in the imported script is available to the new script too.

As a side note: if you're working with audio in AviSynth too, it might be worth checking out the difference between + and ++ for joining the scripts.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Post by mirkosp » Sun Aug 17, 2008 8:15 am

Mosc wrote:As a side note: if you're working with audio in AviSynth too, it might be worth checking out the difference between + and ++ for joining the scripts.
Yeah, ++ will mantain audio sync, the single + won't mind it... but since generally when importing scripts in a video editor we just need the video stream, as the audio stream is going to be the song, it's generally unnecessary. :P

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Post by Bauzi » Sun Aug 17, 2008 2:50 pm

*sigh*
Beside the + and ++ stuff you don´t really tell me something new, but you know what? It works now. There must be a difference between my video settings, because they don´t work together. I´ll have a closer look on it -.-'

thx
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Post by Bauzi » Sun Aug 17, 2008 3:51 pm

Alright. My problem are the different audio settings. I need those scipts to combine different amvs for one DVD. With titels and stuff.
Yeah I don´t have the time nor the harddisc to render 120 min in lossless or MPEG-2 so that´s why I need the scripts.

Oh well at least I know now that it works. That´s cool. ^^
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Phantasmagoriat
Joined: Mon Feb 06, 2006 11:26 pm
Status: ☁SteamPunked≈☂
Contact:
Org Profile

Post by Phantasmagoriat » Sun Aug 17, 2008 11:05 pm

I would probably try to keep it more organized using variables like this:

Code: Select all

a1 = avisource("script1.avs")
a2 = avisource("script2.avs")
a3 = avisource("script3.avs")

a1+a2+a3
and if you want, you can extend your script on one line like this:

Code: Select all

a1 = avisource("script1.avs").trim(2833, 2874).tweak(sat=1.2)
a2 = avisource("script1.avs").trim(2875, 3000).tweak(sat=2.0)
a3 = avisource("script1.avs").trim(3001, 4013).fastlinedarken()

a1+a2+a3
[which is useful with trim() to apply filters to only certain areas of a video]


...as for combining amv's with different audio types, maybe there's a way using these.
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Post by Bauzi » Mon Aug 18, 2008 3:30 am

Yeah I thought about variables for the last script. It would be some kind of playlist for my final dvd.

Code: Select all

a1 = avisource("script1.avs").trim(2833, 2874).tweak(sat=1.2)
a2 = avisource("script1.avs").trim(2875, 3000).tweak(sat=2.0)
a3 = avisource("script1.avs").trim(3001, 4013).fastlinedarken()

a1+a2+a3
Now that´s something new and usefull thought :)

There would be still the problem with the different framerates. I tried it with the sync_audio = true parameter, but that messes up the audio. So maybe your link will help me here.
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Mon Aug 18, 2008 7:15 am

Simply using ChangeFPS would be the best solution, I guess. It adds and removes frames to achieve a certain framerate and doesn't mess with the audio. Something like this:

Code: Select all

Import("a.avs").ChangeFPS("ntsc_film")++\
Import("b.avs").ChangeFPS("ntsc_film")++\
Import("c.avs").ChangeFPS("ntsc_film")

Locked

Return to “AviSynth Help”