Rotating movie files…

I’ve been looking for a way to rotate movie files taken with my pocket camera for ages and I finally found the tool to do it: mencoder.

For some reason no movie player that I’ve come across will play movies shot in portrait mode rotated properly. Maybe the information is not stored within the movie file – anyway the end result is that you have to tilt your head when watching!

I really wanted a tool that could do loss-less rotating but I’m not sure mencoder does that. Anyway it works fine.

Movie rotate:
mencoder -ovc lavc -lavcopts vcodec=mjpeg -vf rotate=2 -oac copy orgmovie.avi -o rotatedmovie.avi

It also does another thing I’ve been wanting to do: Making a movie file out of jpgs. Here is an example of some options that created a file that works in QuickTime:

mencoder mf://*.JPG -mf fps=8:type=jpg -ovc lavc -o rig.avi -vf scale=640:480 -ffourcc DX50

The Mac executable I downloaded from the MPlayer site didn’t include mencoder so I got it using MacPorts instead.

Leave a Reply