Crop a video in python

0 votes

I am wondering to create a function which can crop a video in a certain frame and save it on my disk (OpenCV,moviepy,or something like that)

I am specifying my function with parameters as dimension of frame along with source and target name (location)

def vid_crop(src,dest,l,t,r,b):
  # something
  # goes
  # here

left = 1    #any number (pixels)
top = 2     # ''''
right = 3   # ''''
bottom = 4  # ''''

vid_crop('myvideo.mp4','myvideo_edit.mp4',left,top,right,bottom)

Any suggestions and ideas are really helpful

Mar 16, 2023 in Python by anonymous
• 990 points

edited 4 days ago 17 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP