I videoed something at the weekend on my iphone, but must’ve had the phone upside-down so the video came out that way.

Fortunately there is a little program that will rotate a video for you.

> sudo apt-get install mencoder

Then, to rotate my video clockwise by 90 degrees:

> mencoder -ovc lavc -vf rotate=1 -oac pcm inputfile.ext -o outputfile.ext

I had to do this twice, obviously changing the input filename for the second rotation for the output filename on the first…

Job done. That were easy.

There is more help here: http://en.gentoo-wiki.com/wiki/HOWTO_Mencoder_Introduction_Guide

By admin

One thought on “HOWTO: Rotate a video in Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.