How can i use ffmpeg to crop a video

ffmpeg -i in.mp4 -filter:v "crop=500:500:20:20" Vid-out.mp4
ffmpeg -i in.mp4 -filter:v "crop=W_:H_:W_:H_"   Vid-out.mp4

what I'm trying to figure out is, how does anyone know where 500:500 is or where 20:20 is in the video or picture, where does 0 or 500 start on a picture or video, and how can i find out easily


Here is a diagram that might help illustrate how the crop works ( taken from FFmpeg Basics by Frantisek Korbel) :

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy