Page 1 of 1

Blending Frame

Posted: Thu Nov 22, 2012 2:24 pm
by shakana
I'm looking for the best way to blend one frame at a time. Below is what I was thinking:

source=avisource("fullclip.avi")

# select frames to blend
frame1 = trim(source, frame, length=1)
frame2 = trim(source, frame+1, length=1)

frame1 = Overlay(frame1, frame2, mode="blend", opacity=0.5) #blend frames
source=trim(source, 0, frame) + frame1 + trim(source, frame+1) #insert blended frame

What is the impact to the audio using this approach?

Re: Blending Frame

Posted: Thu Nov 22, 2012 5:54 pm
by Nick007
For the audio to stay in synch, you would have to discard 1 frame (either frame1 or frame2):

source=trim(source, 0, frame) + frame1 + trim(source, frame+2, 0) #insert blended frame