0

I got a simple code that cuts a video into multiple clips based on given frame numbers but the video always gets altered (images attached) If someone could provide me with some insight I would really appreciate it Result Original video

og_clip = mp.VideoFileClip(video)  # original video
start_frames, end_frames = get_clip_boundaries(video)  # returns frame numbers

og_clip.set_fps(fps)

clips = []
for i in range(len(start_frames)):
    start_time = start_frames[i] / fps  # corresponding timestamps to frame numbers
    end_time = end_frames[i] / fps

    clip = og_clip.subclip(start_time, end_time)
    clips.append(clip)

I tried resizing the subclips already, nothing changed. After that I checked the dimensions of the subclips and it seems that it's something else that gets altered

Shahar
  • 1
  • 1
  • note: from the pictures this is not video resolution this looks like aspect ratio – testfile Dec 19 '22 at 11:18
  • If you know your original aspect ratio, (which you can find with a tool called MediaInfo) you can force a particular aspect ratio using the code in [this answer](https://stackoverflow.com/questions/75656843/why-does-moviepy-stretch-my-output-after-cutting-and-putting-back-together-a-vid/75657002#75657002) – Nick ODell Mar 07 '23 at 00:27

0 Answers0