View Full Version : Help Needed With Time lapse
BlockABoots
1st October 2016, 12:42
Im trying to make a time lapse video and need to remove certain parts of the video. This is my current script in AvsPmod.....
video=DirectShowSource("F:\Video Captures\2016-09-28_17-39-08.flv",audio=false).trim(164960,248037).trim(250614,272335).trim(272511,496443).trim(497934,515556).trim(515737,522800).selectevery(35,0).assumefps(29.97)
return=video
but the video clip is only like half a second long, im guessing its to do with the 'trims' ive made but not sure why its only make the video click half a second when it should be approx 5 minutes long??
Groucho2004
1st October 2016, 12:55
Try something like this:
v=XXSource()
a = v.trim(164960,248037)
b = v.trim(250614,272335)
c = v.trim(272511,496443)
d = v.trim(497934,515556)
e = v.trim(515737,522800)
a++b++c++d++e
StainlessS
1st October 2016, 13:11
As G2K4 said.
blockaboots, your script acts sort of like this (leaving out a few things)
DirectShowSource("F:\VideoCaptures\2016-09-28_17-39-08.flv",audio=false)
a=trim(164960,248037)
b=a.trim(250614,272335)
c=b.trim(272511,496443)
d=c.trim(497934,515556)
d.trim(515737,522800) # assign to last
eg b is result of trimming already trimmed a, and not result of trimming original clip.
BlockABoots
2nd October 2016, 17:50
Hmmm, ok i have tried...
video=DirectShowSource("F:\Video Captures\2016-09-28_17-39-08.flv",audio=false)
video0=trim(164960,248037)
video1=trim(250614,272335)
video2=trim(272511,496443)
video3=trim(497934,515556)
video4=trim(515737,522800).selectevery(35,0).assumefps(29.97)
return video4
but when i press F5 i get the error message...
Script error: invalid arguments to function "trim"
whats the issue?
StainlessS
2nd October 2016, 18:06
You are not trimming 'video', you are trimming Last (which has not been assigned any value at all).
[EDIT: Also, you are using selectevery(35,0).assumefps(29.97) on only the last trim, not on a spliced result clip.]
try
DirectShowSource("F:\Video Captures\2016-09-28_17-39-08.flv",audio=false) # assign to last
a=trim(164960,248037) # Trim from Last
b=trim(250614,272335) # Trim from Last
c=trim(272511,496443) # Trim from Last
d=trim(497934,515556) # Trim from Last
e=trim(515737,522800) # Trim from Last
a++b++c++d++e # assign spliced clips to Last
selectevery(35,0).assumefps(29.97)
return Last
EDIT: Or as you seem to like typing
video=DirectShowSource("F:\Video Captures\2016-09-28_17-39-08.flv",audio=false) # assign to video
video0=video.trim(164960,248037)
video1=video.trim(250614,272335)
video2=video.trim(272511,496443)
video3=video.trim(497934,515556)
video4=video.trim(515737,522800)
videoSpliced=video0++video1++video2++video3++video4
videoOut=videoSpliced.selectevery(35,0).assumefps(29.97)
return videoOut
BlockABoots
2nd October 2016, 19:53
Ok thanks
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.