I tried to do this in VLC but it was way too many steps. I found out how to do it in a bash prompt using ffmpeg.
ffmpeg -i ./source_image.mp4 -vf 'transpose=cclock' -c:v libx264 -c:a copy -crf 20 destination_image_Rotated.mp4
Change the transpose=cclock to transpose=clock to rotate clockwise instead of anti clockwise.
I have converted this single command to 2 shell functions in my .bashrc
rotatevideoclockwise() { ffmpeg -i $1 -vf 'transpose=clock' -c:v libx264 -c:a copy -crf 20 $2 } rotatevideoanticlockwise() { ffmpeg -i $1 -vf 'transpose=cclock' -c:v libx264 -c:a copy -crf 20 $2 }
You will need to run source ~/.bashrc to get this to work or log out and back in again.
Leave a Reply