Skip to content

Instantly share code, notes, and snippets.

@jskherman
Last active February 11, 2021 17:08
Show Gist options
  • Save jskherman/98ed0246621eddfe85754db48356f0fc to your computer and use it in GitHub Desktop.
Save jskherman/98ed0246621eddfe85754db48356f0fc to your computer and use it in GitHub Desktop.
A command for using ffmpeg to rotate a video

The Command

A command for using ffmpeg to rotate a video:

ffmpeg -i /path/to/input/video.mp4 -vf 'transpose=2' -c:v libx264 -c:a copy -crf 20 /path/to/output/video.mp4
  • transpose=2 means to rotate the video counterclockwise
  • transpose=1 means to rotate the video clockwise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment