Thread: ApplyRange Bug?
View Single Post
Old 17th August 2014, 21:44   #8  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 357
You can write a function that does the trimming.

Code:
...
Insert_FadeOut(1000)


function Insert_FadeOut(clip c, int i, int "NumberOfFrames")  {
        c
        NumberOfFrames = default(NumberOfFrames, round(FrameRate * 2))    # ca. 2 seconds
        p1 = Trim(0, -i).FadeOut(NumberOfFrames).Trim(0, -i)              # FadeOut adds a blank frame
        p2 = Trim(i,  0)
        p1 + p2
#       (c.HasAudio)  ?  last.AudioDub(c)  :  last                        # uncomment this line if you don't want the audio to fade
}
(note that i cannot be <= 0; this simple function has no error handling)

Last edited by creaothceann; 17th August 2014 at 22:41.
creaothceann is offline   Reply With Quote