I have the following mp4 file:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:04:43.66, start: 0.000000, bitrate: 1704 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1080x720 [SAR 1:1 DAR 3:2], 1573 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)

I want to scale it to 1280x720 and also change the aspect ratio to 16x9. I tried some settings from the documentation https://trac.ffmpeg.org/wiki/Scaling but to no avail.

  • 2
    Please provide the command you used, as well as more detail about what went wrong; "to no avail" is a bit vague.
    – stib
    Mar 3 '21 at 6:04
  • @stib I managed to solve it. The video had bars on the top and bottom, so in addition to using the scale filter I had to use the crop as well: -vf "crop=in_w:in_h-110,scale=1280:720,setsar=1"
    – willian.as
    Mar 4 '21 at 13:29

Your Answer

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

Browse other questions tagged or ask your own question.