Sunday 14 August 2011

How to rotate iPhone video on a Mac

I ran into what is apparently a not uncommon problem with iPhone video: you start to take a video while the camera is in portrait mode (just by accident of how you’re holding it) and then the rest of the video is stuck that way, even if you took 99% of it in landscape mode. If that didn’t make any sense, the bottom line is I had a video I needed to rotate 90 degrees. While there were plenty of solutions available on the PC, tons of Googling turned up virtually nothing for Mac Os X, short of finding an old copy of iMovie from five years ago.

Fortunately, I lucked in to a great solution, which doesn’t even require transcoding (with the attendant loss in quality that would result). This worked for me in getting a video from portrait to landscape, and I suspect it will only work in that situation. (This should be the only situation in which this problem occurs, as nobody in their right mind should ever shoot video in portrait mode on purpose, and if you do, I’m certainly not going to be complicit in aiding and abetting that crime against humanity.)
The solution requires a copy of the very nice all-purpose video player, VLC.
  1. Open the video in VLC
  2. It should actually open up in landscape orientation, regardless of the erronious orientation data in the movie file from the iPhone.
  3. Select “Streaming/Exporting Wizard” from the File menu.
  4. Select “Transcode/Save to file” and click next.
  5. Use “Existing Playlist” and select the file you just opened below, click next.
  6. Leave everything untouched (i.e. both check boxes blank) on the transcode screen and click next.
  7. Choose MPEG4, click next.
  8. Click “Choose…” to tell VLC where to put the output file, click next.
  9. Click finish.
This should be all it takes. The process will be fairly quick, since there’s no transcoding, but its not instantaneous as it does have to move a lot of bits into a new file.