Can HandBrake flip/rotate a video?

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?


Solution 1:

On the Extra Options under Video tab put , --rotate=4 to rotate clockwise by 90 or , --rotate=7 for 90 counterclockwise.

Note: It will not work without the preceding comma and space.

(As of version 0.10.2.7286)

----Edit: as of 0.10.5.x

90 degrees counterclockwise

, --rotate=8

90 degrees clockwise

, --rotate=3

Solution 2:

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.


info added by sorein:

HandBrake documentation: https://trac.handbrake.fr/wiki/CLIGuide

Sintax:
, --rotate=n
(comma and space needed)
It has to be entered in the tab VIDEO / EXTRA OPTIONS

Behaviour of "n"
The management of the ROTATE option is chaotic. It mixes FLIP and ROTATE!

1 : x flip
2 : y flip
3 : 180 degrees rotate (also the DEFAULT)
4 : 90 degrees rotate (clockwise)
5 : 90 degrees rotate + y flip
6 : 270 degrees rotate + y flip
7 : 270 degrees rotate