Skip to content

Instantly share code, notes, and snippets.

@jrichardsz
Forked from cmlewis/ Rotate Videos using ffmpeg
Created December 17, 2018 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrichardsz/ade9b1eb44fbd74873ba57f2675ff3ae to your computer and use it in GitHub Desktop.
Save jrichardsz/ade9b1eb44fbd74873ba57f2675ff3ae to your computer and use it in GitHub Desktop.
Rotate videos 90 or 180 degrees using ffmpeg
Rotate videos 90 or 180 degrees using ffmpeg.
rem For the transpose parameter you can pass:
rem 0 = 90CounterCLockwise and Vertical Flip (default)
rem 1 = 90Clockwise
rem 2 = 90CounterClockwise
rem 3 = 90Clockwise and Vertical Flip
rem To rotate 180 degrees, instead use "transpose=2,transpose=2"
rem Using -codec:a copy will simply copy the audio instead of reencoding it.
ffmpeg -i in.mp4 -vf "transpose=1" -codec:a copy out.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment