Skip to content

Instantly share code, notes, and snippets.

@johnjohndoe
Created January 14, 2021 22:09
Show Gist options
  • Save johnjohndoe/94d1572c2d593f2c70bccd947405ccf0 to your computer and use it in GitHub Desktop.
Save johnjohndoe/94d1572c2d593f2c70bccd947405ccf0 to your computer and use it in GitHub Desktop.
Resize / scale a video with FFmpeg

Resize / scale a video with FFmpeg

  • Scale the input.mp4 to a height of 600px.
  • Let FFmpeg choose a number which is divisible by 2 to avoid the not divisible by 2 error.
ffmpeg -i input.mp4 -vf scale=-2:600,setsar=1:1 ouput.mp4

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment