Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to use HandBrake to compress some video that was taken via a camera that was mounted upside down.

I found a reference to a command-line rotate option, but I can't find it in the GUI.

Am I just missing it?

share|improve this question
add comment

6 Answers

for the latest version of handbrake (0.99) I was able to achieve a 90 deg rotation by putting:

, --rotate=4 on the Extra Options under Video tab

It doesnt work without the initial comma and without the space, (took forever to figure that out, as the documentation made no mention of that!

share|improve this answer
1  
worked like a charm :) Maybe the comma works like closing the x264 options and add it to the other one (like SQL injection) –  otakun85 Dec 12 '13 at 20:03
2  
This worked! Needs more upvotes. –  dtbarne Feb 6 at 2:25
    
In Linux this doesn't work. –  Simón Apr 10 at 9:18
1  
, --rotate=7 rotates 90 degrees anticlockwise for me on Windows 7 –  Rob May 9 at 21:09
    
This is probably the best answer. Agreed; it should be upvoted to the top. It works with all the other GUI options. I was able to use , --rotate=3 for a 180 degree rotation. –  mkasberg May 18 at 1:10
show 1 more comment

From a recent post iPhone video rotation (and compression)

HandBrake (or at least the GUI) does not offer a way to rotate video. The HandBrake CLI does have a "rotate" option, however I found it is not a true rotation. Rather, it simply flips on an axis. The documentation is poor, but I found that a value of 1 flips on X, 2 flips on Y, and 3 flips on X and Y. So using a value of 3 is the same as doing a 180° rotation, which is useful for videos that are upside down, but not for videos that are sideways.

mencoder can do proper rotation.

While this refers to a Mac OS-X platform, I guess it should work for you too. Find a mencoder binary for your platform.

share|improve this answer
1  
I am just asking about flipping the video. Is this option in the handbrake GUI anywhere? –  nonot1 May 3 '12 at 2:35
    
I couldn't find the rotate option in the GUI either. If you set everything else up and then "Add To Queue" when you "Show Queue" there is an option to create a batch script of the full queue. Do that then edit the batch file and add --rotate to the files that you want rotated. Then just run the bat file. This avoids most of the work of building up the command line –  Craig Dec 31 '12 at 22:29
2  
Command line options that are not visible in the GUI can be entered in the text box under the advanced tab. –  user199190 Feb 14 '13 at 11:03
    
@Matt That text box seems to be for x264 options, not Handbrake options. –  duozmo Apr 14 '13 at 0:17
add comment

From the Handbrake documentation:

    --rotate            Flips images axes
      <M>               (default 3)

To rotate 90° I used:

HandBrakeCLI -i source -o target.m4v --preset="Universal" --rotate="4"

with success. No luck getting this to work from the GUI.

note: I'm not sure why the above referenced blog post says:

a value of 1 flips on X, 2 flips on Y, and 3 flips on X and Y.

"3" is said to be default and as such should do no rotation at all. I've found this to be true.

share|improve this answer
    
that works for me on osx –  timaschew May 15 at 19:01
    
Note, handbrake CLI does not come with handbrake, it is a separate download –  deweydb May 21 at 22:24
add comment

I've tried putting

-7 --rotate <3>

into the box in the Video tab under Optimise Video: Extra Options box.

It worked and flipped my video on the XY axis (180 degree rotation).

share|improve this answer
    
This works, thanks! Much better than having to switch to another tool. –  Jörn Zaefferer Oct 9 '13 at 9:44
    
I tried that in the Mac Handbrake, but it didn't work. I noticed that the added options build the "x264 unparse" string, so I tried also in the format separated with colons, e.g. "7:rotate=3" and variations. Does anybody know how to effect this on the Mac? –  ttarchala Nov 16 '13 at 13:35
    
In Linux this doesn't work. –  Simón Apr 10 at 9:18
add comment

In Winx64 0.9.9.5530 the syntax is:

rotate=3

No leading or trailing comma, space, etc.

share|improve this answer
add comment

Fill disclosure: VidCoder author here.

An alternative might be to use the latest VidCoder beta, which uses the HandBrake engine and has in-GUI support for rotation and reflection (with previews):

VidCoder rotation example

share|improve this answer
add comment

protected by Community Mar 19 at 3:39

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.