Moviepy subclip captures extra 4 seconds at the end

Viewed 139

Iam trying to clip a video and save the clipped video. In this case the first 5 seconds of the video. While the video is getting clipped correctly. However the length of the clipped video is still 9 seconds instead of 5 seconds. For some reason an addition 4 seconds keep getting added with no content. Can someone help me with this. I tried to read through various topics on the issue but couldnt figure out.

# Import everything needed to edit video clips
from moviepy.editor import *
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
# loading video dsa gfg intro video
clip = VideoFileClip("file.mp4")

filename = "fileclipped.mp4"
ffmpeg_extract_subclip("file.mp4", 0, 5, targetname=filename)
0 Answers
Related