Rotate videos with FFmpeg

90 Clockwise

ffmpeg -i input.mp4 -vf "transpose=1" -c:a copy output.mp4

or you can use:

ffmpeg -i input.mp4 -vf "transpose=clock" -c:a copy output.mp4

90 Counter clockwise and vertical flip (inverted)

ffmpeg -i input.mp4 -vf "transpose=0" -c:a copy output.mp4

or you can use

ffmpeg -i input.mp4 -vf "transpose=clock_flip" -c:a copy output.mp4

90 Clockwise and vertical flip (Inverted)

ffmpeg -i input.mp4 -vf "transpose=3" -c:a copy output.mp4

Or you can use:

ffmpeg -i input.mp4 -vf "transpose=clock_flip" -c:a copy output.mp4

90 Counter clockwise

ffmpeg -i input.mp4 -vf "transpose=2" -c:a copy output.mp4

Or you can use:

ffmpeg -i input.mp4 -vf "transpose=cclock" -c:a copy output.mp4

180 Clockwise

ffmpeg -i input.mp4 -vf "transpose=2,transpose=2" -c:a copy output.mp4

Or you can use:

ffmpeg -i input.mp4 -vf "transpose=cclock,transpose=cclock" -c:a copy output.mp4

180 Clockwise horizontal flip (inverted)

ffmpeg -i input.mp4 -vf "transpose=0,transpose=2" -c:a copy output.mp4

Or you can use:

ffmpeg -i input.mp4 -vf "transpose=cclock_flip,transpose=cclock" -c:a copy output.mp4

What is -c:a copy?

-c:a copy will make sure that the audio is not re-encoded or touched, but copied.


Sources:

https://www.ffmpeg.org/ffmpeg-all.html#transpose-1