Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Avi Script Help, Layer
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Toxic
Posted: Aug 2 2003, 10:07 PM


Unregistered









Can anyone tell me what I'm doing wrong here, Vdub and vdubmod won't open a Layer AVS script..

Layer("C:\***.avi")+("C:\***.avi") string "fast" int "122" int "0" int "0" int "threshold" bool "true"

Trying to layer two differen't clips, I'm probably screwing up the code though.

Script error: Invalid Arguments to fuction "layer"

Also when I try to run a dissolve script with 2 differen't clips the screen just flashes really fast back and forth between clips :\

Thanks for any help you can give me, If you can write me exactly what the code "should" look like to layer 2 avi's together for a few seconds that would be a great help aswell.

 
  Top
fccHandler
Posted: Aug 2 2003, 11:13 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Remember you have to load the AVIs first with a "source" type filter, before you can apply a filter (like Layer) which works with clips. The way I would do it is:

CODE
clip1 = AVISource("C:\***.avi")
clip2 = AVISource("C:\***.avi")
Layer(clip1, clip2, "fast", 122, 0, 0, 0, true)


Hope that helps. smile.gif

--------------------
May the FOURCC be with you...
 
     Top
Toxic
Posted: Aug 2 2003, 11:47 PM


Unregistered









That helps thanks smile.gif exactly what I wanted.

But "Remember you have to load the AVIs first with a "source" type filter"

I'm new, what do you mean by that?
 
  Top
fccHandler
Posted: Aug 3 2003, 12:20 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Filters like Layer() work with clips, not files. You must always start with a source filter to connect to a file on your hard drive. The return value from the source filter is a "clip" which the other filters can use. Examples of source filters are AviSource(), DirectShowSource(), WavSource(), and so on. Think of them as functions; each one takes a filename as an argument, and returns a "clip." But notice how the following one-line script will work just as well as what I posted above:

CODE
Layer(AviSource("C:\***.avi"), AviSource("C:\***.avi"), "fast", 122, 0, 0, 0, true)


Instead of assigning the return of AviSource to variables (as I did in my previous post), you can use the return value directly in arguments to Layer. I find the other syntax is easier to follow, though.

--------------------
May the FOURCC be with you...
 
     Top
Toxic
Posted: Aug 3 2003, 12:29 AM


Unregistered









AHH ok I understand smile.gif

Thanks for all your help I really appreciate it!

Edit: woot it works.. ! But just like dissolve the screen flickers between them really fast ! Is that because the backgrounds are somewhere different or is there a way to make the layer flow the two scenes together softly? They play very jumpy atm!

Or maybe a way to darken the over laying scene gradually so it becomes the main scene?
 
  Top
fccHandler
Posted: Aug 3 2003, 03:18 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Sorry, I don't know; I've never seen that phenomenon. If you have a script that demonstrates the flicker, please post it in its entirety so we can see it.

BTW, there is a very detailed Avisynth manual here.

--------------------
May the FOURCC be with you...
 
     Top
Toxic
Posted: Aug 3 2003, 05:40 AM


Unregistered









I'm just using the same thing you posted for the script, or do you mean post the test AVI?

Dunno where I can host that, maybe geocities, if that's what you're talking about let me know and i'll post it.

as for the entire script exactly as i'm using it

CODE
clip1 = AVISource("C:\Jay\Movies\APPS\Clips\ACa.avi")
clip2 = AVISource("C:\Jay\Movies\APPS\Clips\ACb.avi")
Layer(clip1, clip2, "add", 120, 0, 0, 0, true)


no more no less :\

Edit: I went to that manual site you said to and it had an extra line : .ConvertToYUY2 (whatever that is) as well as listing the function as "return Layer" instead of "layer"
So for example it turned to this

CODE
clip1 = AviSource("C:\Jay\Movies\APPS\Clips\ACa.avi") .ConvertToYUY2
clip2 = AviSource("C:\Jay\Movies\APPS\Clips\ACb.avi") .ConvertToYUY2
return Layer(clip1, clip2, "fast")


And flicker is gone!!!!! smile.gif Have no idea why but gone is gone!

Thanks again Fcc!
 
  Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
6 replies since Aug 2 2003, 10:07 PM Track this topic | Email this topic | Print this topic

<< Back to Avisynth Filtering, Processing and Scripts Discussion