pancserzso
14th July 2011, 19:30
I am trying to compose about 100 layers on top of each other using the Layer command. My script looks like this:
clip1 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
blank = BlankClip(clip1, length=24)
long = BlankClip(clip1, length=7500)
clip1d = clip1
clip1m = Layer(long, clip1, "lighten")
clip2 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
clip2d = blank.loop(1) + clip2 + blank
clip2m = Layer(clip1m, clip2d, "lighten")
clip3 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
clip3d = blank.loop(2) + clip3 + blank
clip3m = Layer(clip2m, clip3d, "lighten")
...
clip97 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
clip97d = blank.loop(96) + clip97 + blank
clip97m = Layer(clip96m, clip97d, "lighten")
return clip97m.Trim(2800,0).ConvertToYV12()
I know its not an everyday task to compose 100 layers in Avisynth, but I found that it works perfectly, so why change.
My only problem is that it is extremely slow. I mean on a 3.6 Ghz quad core machine, I get 0.62 fps for a 640x360 ultra low res clip. Better not imagine what happens in 1080p.
My question is that I have never used Avisynth MT, or 2.60 Alphas or any tweaks, I am just using the latest official 2.58 non-MT. Could someone recommend me some tweaks or ideas to make Avisynth faster in this situation? All the sources are ImageSources linking to images that are PNGs. I will try converting them to TIFFs, but it would explode the file sizes.
Any other idea how to do things like this?
clip1 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
blank = BlankClip(clip1, length=24)
long = BlankClip(clip1, length=7500)
clip1d = clip1
clip1m = Layer(long, clip1, "lighten")
clip2 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
clip2d = blank.loop(1) + clip2 + blank
clip2m = Layer(clip1m, clip2d, "lighten")
clip3 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
clip3d = blank.loop(2) + clip3 + blank
clip3m = Layer(clip2m, clip3d, "lighten")
...
clip97 = ImageSource(...).ConvertToRGB32.FadeIn(72).loop(100)
clip97d = blank.loop(96) + clip97 + blank
clip97m = Layer(clip96m, clip97d, "lighten")
return clip97m.Trim(2800,0).ConvertToYV12()
I know its not an everyday task to compose 100 layers in Avisynth, but I found that it works perfectly, so why change.
My only problem is that it is extremely slow. I mean on a 3.6 Ghz quad core machine, I get 0.62 fps for a 640x360 ultra low res clip. Better not imagine what happens in 1080p.
My question is that I have never used Avisynth MT, or 2.60 Alphas or any tweaks, I am just using the latest official 2.58 non-MT. Could someone recommend me some tweaks or ideas to make Avisynth faster in this situation? All the sources are ImageSources linking to images that are PNGs. I will try converting them to TIFFs, but it would explode the file sizes.
Any other idea how to do things like this?