How to rotate a video 90 degree under Linux

Video is ready, Click Here to View ×

mencoder VIDEO0029.mp4 -o output.mp4 -vf rotate=1 -oac copy -ovc lavc

In today’s video, I am going to show you how to rotate a video from portrait mode to landscape. Here is a video that was taken on my wife’s android phone, and as you can
see she was holding the phone so that the video was taken in portrait mode, and is hard to watch.

If your just wanting to playback the video in the correct orientation, then you can use VLC’s video effects. Select the tools…

14 Comments

  1. Thank you very much for making this completely useful video. Perfect length of time and right to the point. Audio was good level too. Kudos, man. I was actually having trouble with two videos I was trying to splice together in Flowblade, being sideways cause of portrait recording. You really saved my bacon. Nice bash.

  2. That was extremely helpful as I did a search and all I could find was, install avidemux, which for some reason I could not. I'm using Kubuntu 16.04 and your solution did the trick, however, I'm using a newer version of VLC, which was easier to do as it had a kind of 'jog-shuttle' wheel where I could rotate it and actually 'see' it rotate as I was turning the 'wheel'.

  3. I get several errors.
    First, about the oac option, mencoder says try the pcm option.
    Second, after repeating with the pcm option, I get a 3 second output file for a 2 minute input file.

    Thinking mencoder isn't the tool I'll need.

  4. @KutWrite

    1) You don't really need to use a bash script, I just did that for ease while recording the video so I didn't have to type the full mencoder syntax while filming.

    2) The mencoder syntax is:-

    mencoder inputfile.mp4 -o outputfile.mp4 -vf rotate=1 -oac copy -ovc lavc

    So in this instance the input file needs to be in your current working directory, but you can give the full path to a file anywhere on your system like :-

    mencoder /path/to/file/inputfile.mp4 …..

Leave a Reply

Your email address will not be published.


*