Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
Sunday, July 23rd, 2006 07:04 pm

...that can rotate an AVI file by 90 degrees?  I have a number of video sequences I've shot with my Canon digital camera in portrait mode, but of course the player doesn't know that, and while I have an abundance of tools for losslessly rotating JPEG photos, none of the utilities supplied by Canon, and no other utilities I have, will rotate an AVI movie and save the rotated version.  (I can rotate the movies at playback time with mplayer, but cannot -- to my knowledge -- save them.)

Sunday, July 23rd, 2006 11:10 pm (UTC)
I haven't used this one, and it isn't freeware, but it does have a 15-day free trial....

http://www.blazemp.com/rotate_video.htm
Monday, July 24th, 2006 12:10 am (UTC)
Thanks for the tip; I just tried it. Unfortunately, it seems to corrupt every video clip I try to save with compression, and if I save without compression, 6MB of video inflates to 150+MB. There does not appear to be any option to tell it "Just save the thing with whatever compression was originally used."
Monday, July 24th, 2006 12:05 am (UTC)
Use the other half of mplayer: mencoder.
Monday, July 24th, 2006 12:34 am (UTC)
mencoder worked perfectly once I figured out the correct invocation. I actually didn't realize I had mencoder along with mplayer, since I've never tried to use it.

Now all I have to do is remember the correct syntax. (Or extend my jpegtool front end, or create a complimentary mpegtool, or ....)
Monday, July 24th, 2006 12:05 am (UTC)
Ugh, I assume you don't want to use the command line unix tools on it. :)

mencoder might do it
man mencoder
has a rotate command
Monday, July 24th, 2006 12:11 am (UTC)
I would be overjoyed to be able to use a commandline Unix tool. :) And it appears I do have mencoder installed, though I didn't realize I did ....
Monday, July 24th, 2006 12:19 am (UTC)
I've tried using it. It's part of mplayer as Robbat2 said.

Because one avi I was messing with was in a windows format it would crash.

I did get it to convert one movie to another completely different format but then found out the original was out of sync. Grrrr

Monday, July 24th, 2006 12:32 am (UTC)
With a little experimentation, I have three flawlessly rotated videos now. The magic:

mencoder mvi_0521.avi -vf rotate=1 -o output.avi -ovc lavc -lavcopts vcodec=mjpeg:mbd=1 -oac copy
Monday, July 24th, 2006 11:57 am (UTC)
mencoder mvi_0521.avi -vf rotate=1 -o output.avi -ovc lavc -lavcopts vcodec=mjpeg:mbd=1 -oac copy

Well, DUH! And people say the UNIX command line is obscure. Tsk.