I have a number of video files (MOV) which I only need to rotate 90° clockwise.
As it may be needed in the future as well, I first tried using ffmpeg and then mencoder command line in a Nautilus script but unfortunately I wasn't satisfied with the reduced quality of output video.
Avidemux GTK has produced the output video in the same quality as the input video. But I would ideally like to use it from command line, i.e. avidemux2_cli, although I couldn't find any info about the use video filters like rotate in the documentation.
It is best to use avconv instead of ffmpeg (avconv is the ubuntu version of ffmpeg and it is more up to date - while anytime you run ffmpeg you should see that it is deprecated, it only exists for compatibility purposes and it is going to be removed in the future).
All you need is to set a rather high video bitrate value when you apply the rotation. So, first, you can get a 1 minute sample of one of your videos, by running:
Then you can apply the 90° clockwise rotation like this:
You can experiment a little bit around with the bitrate value, and when you are pleased with the result (quality to size analogy) you can apply this command for any other of your big files.
First, in the GUI open the Filter window, chose your filters, then click on "Save filter list", and select a filename (e.g., myfilters.xml). Second, in the CLI specify the argument --filters with the filename as argument (e.g., --filters myfilters.xml).
There's also a nice Nautilus script (using avconv command) for this purpose here:
https://github.com/yeKcim/my_nautilus_scripts/tree/master/rotate%20pics%7Cvideos