I'm looking for a way to remove some frames of video or cut some sequences of video clips and then concatenate them. Is there any way to do so in Moviepy?
I know one possible solution is to compute the duration of each frame based on the fps of the video and use it as a time unit in the subclip
method of the VideoFileClip
object, but it's not too accurate and there are some situations that the result is not correct.
clip = VideoFileClip('sample.mp4')
fps = clip.fps
frame_duration = 1 / fps
# subclip from second frame to fifth frame
clip.subclip(t_start=2*frame_duration, t_end=5*frame_duration)