Rotate video by a keyboard shortcut in mpv
Solution 1:
You can add a custom mpv key binding for rotating a video in steps of 90 degrees as follows:
-
Open the
~/.config/mpv/input.conf
file with your favorite text editor (here I'm usingnano
):nano ~/.config/mpv/input.conf
-
Add the following line which sets the key for the action (here I am using
r
, but you can add any single key or key combination you wish):r cycle_values video-rotate 90 180 270 0
-
Save and close the file by pressing Ctrl+O and Ctrl+X.
Now, when you open a video, you can press r to rotate it to 90 degrees. Press another time to rotate it to 180 degrees, and so on.
You can modify the above setting to your liking by changing the single key or key combination you want to use and the rotation values you want to cycle.