VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Hi, I'm facing what I think is a problem with AviSynth or me, I do not know XD

    The thing is, I make a typesetting in After Effects applying a fadeout, and it's perfect as you can see in the screenshot below:



    And when I apply the AVI on video using the Avi Synth, it gets this way, kinda darkened:



    My script:
    Code:
    LoadPlugin("G:\Programas\MEGUI\tools\ffms\ffms2.dll")
    Import("G:\Programas\MEGUI\tools\avisynth_plugin\easylayer.avsi")
    
    FFVideoSource("G:\Encode\01.mkv", fpsnum=24000, fpsden=1001, threads=1).converttoyv12
    LG = FFVideosource("G:\Encode\cred.avi").ChangeFPS(23.976)
    easyLayer(LG, 2952, flip=false)
    Easy Layer avsi script:
    Code:
    # easyLayer, by mrm < mrm@aunder.es >
    
    # v0.5
    # ----
    
    # Contiene:
    # 	easyLayer(clip o, clip e, int "f_in", int "f_out", bool "flip") 
    #	easyLayerS(clip o, string s, int "f_in", int "f_out", bool "flip")
    #	easyLayerIMG(clip o, string s, int f_in, int "f_out", int "x", int "y")
    
    
    function easyLayer(clip o, clip e, int "f_in", int "f_out", bool "flip")
    {
    	f_in = Default(f_in, 0)
    	flip = Default(flip, true)
    	e_len = e.framecount
    	o_len = o.framecount
    	f_out = Default(f_out, f_in+e_len)
    
    	v_antes = o.trim(0,f_in-1)
    	v_durante = flip==true? layer(o.trim(f_in,f_out).converttorgb32, e.flipvertical).converttoyv12 : layer(o.trim(f_in,f_out).converttorgb32, e).converttoyv12
    	v_despues = o.trim(f_out+1,o_len)
    
    	res1 = f_in==0? v_durante : v_antes+v_durante	
    	res2 = f_out==0? res1 : res1+v_despues
    	
    	return res2
    
    }
    
    function easyLayerS(clip o, string s, int "f_in", int "f_out", bool "flip")
    {
    	e = avisource(s)
    	flip = Default(flip, true)
    	f_in = Default(f_in, 0)
    	e_len = e.framecount
    	o_len = o.framecount
    	f_out = Default(f_out,f_in+e_len)
    	
    	return o.easyLayer(e,f_in,f_out,flip)
    }
    
    function easyLayerIMG(clip o, string s, int f_in, int "f_out", int "x", int "y")
    {
    	f_out = Default(f_out, f_in)
    	img_x = Default(x, 0)
    	img_y = Default(y, 0)
    
    	o_len = o.framecount
    	o = o.converttorgb32
    	e = imagesource(s).converttorgb32
    
    	v_antes = o.trim(0,f_in-1)
    	v_durante = o.trim(f_in,f_out).layer(e,x=img_x,y=img_y)
    	v_despues = o.trim(f_out+1,o_len)
    
    	res1 = f_in==0? v_durante : v_antes+v_durante	
    	res2 = f_out==0? res1 : res1+v_despues
    
    	return res2.converttoyv12
    }
    Is it possible to fix this? I appreciate any help.
    Quote Quote  
  2. Assuming you have created clip LG properly (as RGB32 with alpha), my next guess would be it's an alpha premulitply issue (AviSynth does straight alpha blending; I think there is an option to export from After Effects that way so as to be compatible)
    https://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7f7ea.html
    Quote Quote  
  3. Originally Posted by raffriff42 View Post
    Assuming you have created clip LG properly (as RGB32 with alpha), my next guess would be it's an alpha premulitply issue (AviSynth does straight alpha blending; I think there is an option to export from After Effects that way so as to be compatible)
    https://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7f7ea.html
    Thanks! I encoded selecting "straight" in after effects and it worked perfectly.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!