I love open-source software as much as the next guy, but command-line interfaces?
mencoder -vf rotate=1 -oac copy -ovc lavc input.avi -o rotated.avi -lavcopts vcodec=mjpeg:vbitrate=1000is required to rotate a Nikon P80 video shot in portrait to the right orientation and then drop the first and last seconds.
ffmpeg -i rotated.avi -ss 00:00:01 -t 00:00:21 -acodec copy -vcodec copy time.avi