Tutorial

Step-by-Step Guide to Rotating Video with FFmpeg

This guide demonstrates how to rotate a video using FFmpeg to adjust its orientation.

Install ffmpeg (if not already installed):

Step 1: Open a Command Prompt or Terminal

Open a command line or terminal and enter the following command:

ffmpeg -i input.mp4 -vf "transpose=1" output.mp4

Step 2: Adjust Settings

The transpose setting can be adjusted to rotate the video at different angles. Here are some possible values:

  • 0 = no rotation
  • 1 = 90 degrees clockwise
  • 2 = 180 degrees
  • 3 = 90 degrees counter-clockwise

For example, for 180 degrees:

ffmpeg -i input.mp4 -vf "transpose=2" output.mp4

Once the rotation is complete, you can check the newly created video to ensure it has been rotated correctly.