Log in

View Full Version : Need help with Dissolve filter


Mr.Radar
20th September 2003, 04:10
I am trying to transition 2 clips using dissolve with the following script:

t1 = AviSource("tunnel.avs")
t2 = AviSource("tunnel2.avs")
Dissolve(clip1=t2, clip2=t1, 50)

When I open this script in VDub only the first clip is there.

BTW, both inputs are AVS scrits because I am trimming an AVI.

Dark-Cracker
20th September 2003, 05:38
perhaps could u try somethink like :

t1=import("xxx.avs")
t2=import("xxx.avs")
res=dissolve(t2,t1,50)
return res

hope this will help u :)

++

Mr.Radar
20th September 2003, 19:38
Ah! I, in my newbieness, didn't know that the return function existed. That should solve my problem.

*Looks at AviSynth Manual*

Wow, there are A LOT of functions! This is almost like programming C without having to use any semicolons.

stickboy
20th September 2003, 19:59
You shouldn't need an explicit return nor need to use import. If you don't use have an explicit return statement, there is an implicit "return last".

What do the tunnel.avs and tunnel2.avs scripts look like? I assume they have the same clip properties (frame size, color-space, framerate, etc.)?

Mr.Radar
20th September 2003, 20:49
After reading the AviSynth manual I consolidated the three scripts into this one:

t1 = Trim(AVISource("hl2-tunnels.avi"), 150, 1657)
t2 = Trim(AVISource("hl2-tunnels.avi"), 2446, 3226)
output = Dissolve(t1, t2, 50)
return output

but it is still only giving me the first input(t1).

stickboy
20th September 2003, 20:58
I don't see anything wrong with your script. What's the length of the output clip?

Are you sure Dissolve does what you think it does?

Mr.Radar
22nd September 2003, 21:36
From the description in the AVISynth manual it seems that the dissolve filter will fade between 2 or more different clips(say 1 clip is black and the other is white then it would go through as many shades of gray as you specify in the overlap setting transitioning from one to the other). I searched and found a thread talking about this problem in AVISynth 1.x with a link to a fixed DLL and they also linked to a thread dissussing alterntatives to Dissolve however it is 404ing when I click it.

stickboy
23rd September 2003, 03:44
Again, what does VirtualDub report as the length of the output clip?

What version of AviSynth are you using? Dissolve seems to work fine for me in 2.5x ...