0

I have an HD video (1920x1080). I am trying to crop the video from the center so the resolution is (960x1080) and looks like a portrait video. I have tried the following command with no luck:

ffmpeg -i in.mp4 -filter:v "crop=960:1080:480:0" -c:a copy out.mp4

This just outputs a video at the same size: 1920x1080

Any suggestions would be appreciated.

1
  • 1
    Share full log.
    – Gyan
    Nov 6 '20 at 12:59
0

Your command is doing fine, and ffprobe will show the resolution as 960x1080

  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:10:45.14, start: 0.000000, bitrate: 1969 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x1080 [SAR 1:1 DAR 8:9], 1838 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler

My suggestion is to go through some of the examples from https://ffmpeg.org/ffmpeg-filters.html#Examples-52 to see if you have any expected result.

Good luck.

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.