VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Hello guys

    i havent work with avisynth for very long time and i need your help!

    I need Fade In and Out effect in a video many times in different frames!

    For example
    Fade In - from frame 1 to 20
    Fade Out - from frame 280-300
    Fade In - from 300-320
    FadeOut - 600-630
    and so on?

    how must the script look like for that?
    Quote Quote  
  2. This will give you 20 frame fade in and fade out on each segment:

    Code:
    WhateverSource(...)
    v1=Trim(0,299).FadeIO0(20)
    v2=Trim(300,599).FadeIO0(20)
    v3=Trim(600,0).FadeIO0(20)
    v1++v2++v3
    If you want different length fades you need to use separate FadeIn0() and FadeOut0().

    Code:
    WhateverSource(...)
    v1=Trim(0,299).FadeIn0(20).FadeOut0(20)
    v2=Trim(300,599).FadeIn0(20).FadeOut0(30)
    v3=Trim(600,0).FadeIn0(20).FadeOut0(30)
    v1++v2++v3
    Quote Quote  
  3. thanks for the fat reply
    !works great!
    Quote Quote  
  4. You might find this function useful. It fades out at the selected cut point, then back in. You can specify the number of frames for the fadeout and the fadein.

    Code:
    ########################################################################
    #
    # Cut a clip into two parts at the indicated CutPoint.  FadeOut0() the
    # first part over OutFrames (or 20 if not specified).  FadeIn0() the
    # second part over InFrames (or same as OutFrames if not specified).
    # Then join them back together.
    #
    #######################################################################
    
    function FadeOutIn(clip v, int CutPoint, int "OutFrames", int "InFrames")
    {
      OutFrames = default(OutFrames, 20)
      InFrames = default(InFrames, OutFrames)
    
      v.Trim(0,CutPoint).FadeOut0(OutFrames)++v.Trim(CutPoint+1,0).FadeIn0(InFrames)
    }
    
    #######################################################################
    
    WhateverSource(...)
    FadeOutIn(300) # fade out over 20 frames, in over 20 frames, at frame 300
    FadeOutIn(600, 30)  # fade out over 30 frames, in over 30 frames at frame 600
    FadeOutIn(900, 30, 5) # fade out over 30 frames, in over 5 frames, at frame 900
    Quote Quote  
  5. Originally Posted by jagabo View Post
    You might find this function useful. It fades out at the selected cut point, then back in. You can specify the number of frames for the fadeout and the fadein.

    Code:
    ########################################################################
    #
    # Cut a clip into two parts at the indicated CutPoint.  FadeOut0() the
    # first part over OutFrames (or 20 if not specified).  FadeIn0() the
    # second part over InFrames (or same as OutFrames if not specified).
    # Then join them back together.
    #
    #######################################################################
    
    function FadeOutIn(clip v, int CutPoint, int "OutFrames", int "InFrames")
    {
      OutFrames = default(OutFrames, 20)
      InFrames = default(InFrames, OutFrames)
    
      v.Trim(0,CutPoint).FadeOut0(OutFrames)++v.Trim(CutPoint+1,0).FadeIn0(InFrames)
    }
    
    #######################################################################
    
    WhateverSource(...)
    FadeOutIn(300) # fade out over 20 frames, in over 20 frames, at frame 300
    FadeOutIn(600, 30)  # fade out over 30 frames, in over 30 frames at frame 600
    FadeOutIn(900, 30, 5) # fade out over 30 frames, in over 5 frames, at frame 900
    thanks again
    THis looks better because i had some issues with the Trim function...

    btw does the first script also fadeio the audio?
    Quote Quote  



Similar Threads