View Single Post
Old 27th June 2017, 11:05   #9  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Richard1485 View Post
Is there a way to stretch a clip so that it returns the original number of frames +1 (or 2 or whatever) with video and audio still in sync?
You can easily change the ratio to suit any requirement.
Code:
n = 1 # or 2, 3, ... (no of frames to add)

whateversource()
trim(...)
fc = Framecount()
m = float(fc+n)/fc
timestretch(tempo=100/m)
changefps(m*last.framerate)
assumefps(24000,1001)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote