Cropping video files in FFmpeg
The syntax for FFmpeg video cropping is like:
ffmpeg -i input.avi -vf crop=439:455:73:15 -c:v mjpeg -q:v 1 output.avi
-q:v 1
- makes low compression (best possible MJPEG quality).
q:v
can go from 1 to 31.
The assumptions made above were that you wanted Motion JPEG video output of:
width | height | left | top |
---|---|---|---|
439 | 455 | 73 | 15 |
Obviously, change these pixel parameters to suit your particular video.