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