Categories
General

Muddy Buddies

Our friends Darcey and Aliza competed in a crazy race last weekend called a “Muddy Buddy,” where they biked and ran through a course on a trail at a state park near Richmond.

First Darcey started out on the bike…

Categories
General

Rotate video for YouTube

The problem: You recorded a video in portrait format accidentally, most likely because you were using a digital camera and didn’t think about it. For fun, let’s say the video is already at YouTube, so you’re starting with a Flash video file.

The solution: Download the Flash video using something like the DownloadHelper Firefox Add-on. Convert it to an AVI video using VLC. Rotate the AVI video using mencoder, part of the mplayer project. Re-upload it to YouTube.

Convert FLV to AVI:

Choose Convert/Save in VLC. Select the FLV file you want to rotate. On the next screen, check the File box and choose an output file name. From the convenient Profile dropdown menu choose MPEG-4 / DivX. Click Save and the conversion should get started.

Rotate the AVI:

I think mencoder is designed to be difficult to use. Instead of reading the man pages I usually consult Google to see if someone else has already figured the cryptic string of command line arguments necessary to do something. In this case, Scott Hanselman figured it out almost 2 years ago! Here’s the command to rotate an AVI 90 degrees clockwise:

mencoder -vf rotate=1 -o OUTPUT.AVI -oac copy -ovc lavc INPUT.AVI

For some reason, I ended up with a too-fast frame rate. To fix that, I opened the rotated AVI in avidemux, adjusted the frame rate until the clip duration was close to the original, and saved it. Properly, I should have done another conversion to get some black bars on either side of the tall video, but when I uploaded to YouTube those got added automagically.

Update: I got ahold of the original video, in Quicktime format. VLC converted that to an AVI easily, and this time there was no frame-rate change when I rotated with mencoder.