2

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.

2

3 Answers 3

2

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:

avconv -i input.mov -vcodec copy -acodec copy -ss 00:05:00 -t 00:06:00 sample.mov

Then you can apply the 90° clockwise rotation like this:

avconv -i sample.mov -b:v 1200k -vf "transpose=1" sample_rotated.mov

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.

2
  • I just realized that the post is a year old... so, never mind I guess... Aug 3, 2014 at 19:49
  • Thanks, I couldn't find avidemux cli solution since then but I wrote a Nautilus Script using ffmpeg instead (somehow managed to preserve video quality) but after your reminder I've now changed it to avconv which is indeed better.
    – Sadi
    Aug 4, 2014 at 15:27
0

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).

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .