Technical

Tech Tip #5: Rotate a video by 90 degrees with mencoder

I was recently doing some video editing work where the workflow was something like this: film in portrait, transfer to computer, rotate videos by 90 degrees, sequence together several videos, strip out background noise from entire video. Filming was done with a camera, sequencing was done by Kdenlive (I’ve previously only had experience with Blender’s VSE and I must say I was very happy with this new application), and the noise-stripping was done with Audacity. I must say I’m surprised at how fast this was all accomplished and kudos to all those developers who created these apps.

However one thing I didn’t know how to do was how to rotate the video by 90 degrees. Kdenlive can do it but it ends up being awkwardly stretched and I couldn’t figure out how to unstretch it. Luckily mencoder, which comes with the mplayer package, has got a few tricks up its sleeve.

More for my own records than for anybody else, here’s the command I used:

mencoder -vf rotate=2 -o output.avi -oac pcm -ovc lavc input.mov

As my input file was a .mov some of the sound wasn’t synchronised well after rotating, which was easily fixed by this option -demuxer mov. If you want to rotate clockwise instead of anticlockwise change rotate=2 to rotate=1.

Uncategorized

Tech tip #3: Rip audio from an .FLV file.

Well folks, here’s another quick tech tip that I use once in a while. How do you rip only the audio from an .FLV file? .FLV files, or Flash Video files are the format used in browser-embedded videos, common on video-sharing sites such as YouTube or Vimeo (and Eadrax!) For whatever reason if you have an .FLV file of your favourite music video, now you can get the music rocking solo.

mencoder a.flv -o a.mp3 -of rawaudio -oac mp3lame -lameopts cbr:br=192 -ovc copy

I’ll stay off tech tips for a while as the weekend is coming up.