1

I know that the below command will crop 25 from top and bottom

ffplay -i input.mp4 -vf "crop=in_w:in_h-50"

However I just want to crop 25 from bottom(not top). Also How can i remove the black portion in the output so that the output video appears as full screen?

EDIT

Here is the screenshot of the black portion after crop

aftercrop

Before crop

Before crop

  • Where is the black portion? Share a screenshot. – Gyan Aug 13 '17 at 15:30
  • Thanks Mulvya... I will share a screenshot..Could you let me know how to remove the bottom portion alone – Suresh Aug 13 '17 at 15:37
  • crop=in_w:in_h-25:0:0 – Gyan Aug 13 '17 at 15:38
2

Use

ffplay -i input.mp4 -vf "crop=in_w:in_h-25:0:0"

If you're watching this full screen, then the display will show black bars if the resized video is not the same aspect ratio as your monitor. To achieve that, you'll have to crop horizontally as well. If your crop X pixels vertically, you'll have to crop (16/9)*X pixels horizontally.

To do this, use

(left and right)

ffplay -i input.mp4 -vf "crop=in_w-25*16/9:in_h-25:(ow-iw)/2:0"

(right only)

ffplay -i input.mp4 -vf "crop=in_w-25*16/9:in_h-25:0:0"
| improve this answer | |
  • Thanks... What is the command to crop horizontally, I mean If I want to achieve that in a single command? 1) Crop 25 pixels from bottom vertically and crop (16/9)*25 pixels horizontally from right and left in a single command? 2) Crop 25 pixels from bottom vertically and crop (16/9)*25 pixels horizontally from right alone in a single command? – Suresh Aug 14 '17 at 9:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.