How can I rotate and scale a video with ffmpeg?

I want to scale a video from 1920x1080 to 640x480 and rotate by 90 degree in clockwise order.

Which options must be used with ffmpeg?

You must use scale and transpose options within same -vf parameters like that:

ffmpeg -i input.mp4 -vf "scale=640:480,transpose=1" output.mp4

For rotation operations, transpose keyword must be used. Available parameters:

  • 0 for rotate 90-deg counter-clockwise and vertically flip
  • 1 for rotate 90-deg clockwise
  • 2 for rotate 90-deg counter-clockwise
  • 3 for rotate 90-deg clockwise and vertically flip