Filmora
Filmora - AI Video Editor
Edit Faster, Smarter and Easier!
OPEN
Filmora Video Editor
Effortlessly create video with AI.
  • Various AI editing tools to increase your video creation efficiency.
  • Offer popular templates and royalty-free creative resources.
  • Cross-platform functionality for editing everywhere.

How to Rotate a Video With FFmpeg

Liza Brown
Liza Brown
Originally published Dec 16, 21, updated Jul 23, 24

One of the toughest decisions while shooting a video is to decide the orientation of the camera frame. You can capture a video in portrait as well as landscape. It depends on the videographer, but sometimes, even an experienced videographer can make a mistake. A video may appear to be great in portrait orientation while shooting a video but while reviewing it on the computer, the landscape looks to be ideal.

In such a case, you have to opt for a software to rotate the video and change the orientation permanently. FFmpeg is a great choice for Mac users to rotate a video from landscape to portrait and vice versa. Besides, FFmpeg rotate video can also correct your video if you have shot it inverted. We have also suggested a better alternative to FFmpeg for rotating a video at any desired angle so that the output video is perfect from all perspectives.

Part 1. How to Rotate a Video 90° With FFmpeg

You need to rotate a video by 90 degrees when you want to change the orientation of the video from landscape to portrait or vice versa. If you are a Mac user, FFmpeg is a free tool available. However, you have to use the command line in order to execute FFmpeg rotate operation. Here are the steps to follow.

Step 1: Download FFmpeg from online for free. Install the software and set it up perfectly.

Step 2: Open Command Line and type in “ffmpeg” and press Enter key. If the command works, then you have set up the software perfectly.

Step 3: You have to be ready with the directory path where the video file resides whose orientation you want to change.

On the Command Line, enter the following command and press Enter key.

cd filepath

Filepath is the directory path of the video file. Just copy the path and paste it here.

Step 4: Now, in order to rotate the video by 90 degrees, you have to execute the following command. Note that you have to replace “input” with the video file name, “output” as the new video file name. We have assumed that the video file you have has mp4 extension but your video file could have something else as extension. Therefore, you have to replace accordingly.

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

ffmpeg rotate

Please Note:

  • If you want to rotate the video 90 degrees clockwise, the value of transpose should be 1.

  • If you want to rotate the video 90 degrees anti-clockwise, you have to change the value to 2.

  • Value 0 is to rotate by 90 degrees anti-clockwise and vertical flip.

  • Value 3 is for 90 degrees rotation clockwise and vertical flip.

Part 2. How to Rotate a Video 180° With FFmpeg

There is no direct option available on FFmpeg to vertically flip a video by 180 like FFmpeg rotate video 90. In the previous section, we have stated that if the value of transpose is set to 0 or 3, you can vertically flip but there is also going to be 90 degree rotation clockwise or anti-clockwise. However, your requirement is to rotate the video by 180 degrees. So, all you have to do is rotate a video by 90 degrees and again rotate it by 90 degrees so that the video turns 180 degrees. Therefore, you have to take the following steps.

Step 1: Download and install FFmpeg.

Step 2: Open Command Line and enter the following command and press Enter key.

cd filepath

Filepath is the directory path of the video file. Just copy the path and paste it here.

Step 3: Type the following command to rotate the video by 180 degrees. Note that you have to replace “input” with the video file name, “output” as the new video file name.

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

You can see that we have used transpose=1 twice to make the video rotate 90 degrees twice.

Part 3. Best Alternative to Rotate Video

Many users find FFmpeg rotate video option quite inconvenient because it involves Command Line. If you want to rotate video in simple steps without writing any command, we recommend Filmora Video Editor. It is a professional video editor and you get all the tools and options to edit any video like a pro. Here are the key features of Filmora that make it stand out in the crowd.

Key Features:

  • Rotate a video at any desired angle.

  • Flip any video and change its scale.

  • Apply graphical filters and use green screen technology.

  • Add audio and video effects as well as transitions.

  • Add captions, stickers, and drawings to the recorded video.

Here are the steps to rotate a video

shadowplay record button

Step 1: Download and install Filmora.

Try It Free

For Win 7 or later (64-bit)

Try It Free

For macOS 10.12 or later

Step 2: Import the video file that you want to rotate and drop it on Timeline.

Step 3: Double-click on the video file and from Video panel, turn on Transform option. Move the slider on Rotate option to rotate the video at any desired angle. You will also find option to flip the video orientation just below Rotate option. When done, click on OK button.

Step 4: To save the file, go to Export option and enter a file name, a destination location, resolution and others and finally, click on Export button.

Conclusion

FFmpeg is a free and open-source software available for Mac users to rotate video by 90,180 or even 270 degrees. However, FFmpeg rotate video 90 or 180 includes writing commands on Command Line which many find inconvenient. Besides, there is no option available to rotate a video at any desired angle. To overcome these drawbacks, we recommend Wondershare Filmora which is a professional video editor for all types of editing works on a video file.

You May Also Like

Best Free Online Automatic Video Editor to Try

Want to use an automatic video editor online for free? Explore the benefits, the best online solution, and an excellent desktop alternative.

Posted byArvin Alejandro|2024-07-22 17:25:13
8 Best Transparent GIF Makers: Different Types

Easily remove your GIF backgrounds with these transparent GIF makers you can find online. Add cool GIF elements to your video, making it more engaging, livelier, and visually-appealing.

Posted byJames Hogan|2024-07-23 18:09:54
How to Export Transparent Video in Premier Pro

This short tutorial will show a step-by-step guide on how to easily export transparent videos using Adobe Premier Pro, including its relevance in video editing and overall video design.

Posted byJames Hogan|2024-07-23 18:10:02
How to Convert Green Screen Video to Transparent

Learn how to convert screen video to transparent like a professional. As a bonus, discover alternative tools to make your video transparent so you can add stunning background footages.

Posted byJames Hogan|2024-07-23 18:10:16
Top Tools to Remove Video Background Online Without Green Screen

Choosing a tool to change your video background, especially without a green screen, can be a hassle. Luckily, this article has exactly what you need! Find out the top tools to remove video backgrounds online without green screen in this piece.

Posted byJames Hogan|2024-07-23 18:10:29
A Comprehensive Review to After Effects Transparent Background

If you are wondering how to apply the After Effects export transparent background feature, you're in luck! In this article, we will discuss how to make transparent videos in After Effects and how to export them.

Posted byJames Hogan|2024-07-23 18:10:57
Updated in 2024: How to Create Transparent Videos

Creating a transparent video is not as hard as you think if you have suitable software. This article discusses how to make a transparent video using Wondershare Filmora and the steps to creating one.

Posted byJames Hogan|2024-07-23 18:11:08