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

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

1 Answer 1

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"
1
  • 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
    Commented Aug 14, 2017 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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