Rotate Video Files in Linux

When video taken by smartphone is not in right direction, it takes some effort to rotate it to correct direction. Basically a new video file will be created from original video files using correct tool. The best command line tool in Ubuntu, or other Linux distributions is "ffmpeg'. Use the following command to create new video,

ffmpeg -i original_file -vf "transpose=2" new_file

The transpose argument has the following options,

0 - 90 degree counter clockwise and flip vertically (default)
1 - 90 degree clockwise
2 - 90 degree counter clockwise
3 - 90 degree clockwise and flip vertically

You may got error, complaining about 'aac' format is in experimental stage. You need force it in command line. This option should be used right before new file name, like the followings.

ffmpeg -i original_file -vf "transpose=2" -strict -2

results matching ""

    No results matching ""