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.
Edit Video for Free Edit Video for Free
qrcode-img
Scan to get the Filmora App
Sicherer Download 100% Security Verified | No Subscription Required | No Malware

How to Rotate a Video With FFmpeg

Liza Brown
Liza Brown
Dec 09, 24 • Proven solutions

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 5 Tools to Mirror Video Online and An Alternative

If you are looking for ways to mirror video online, we've got you covered.

Posted bySumia Rafique|2025-02-17 21:05:53
Best Bokeh Effects Apps for iOS and Android in 2025

How do you get the bokeh effect app? Here are some of the best Bokeh apps for the iPhone and Android.

Posted byJames Hogan|2025-02-17 21:03:55
A Guide on How Do You Add Captions in iMovie on Mac/iPhone/iPad

Discover the ultimate guide on how to add captions to your videos in iMovie and its alternative. Find out what suits you best.

Posted byJames Hogan|2025-02-17 21:04:49
Text Reveal in After Effects – Masking and Animating Text With Ease

Want to create a text reveal in After Effects? Discover the best methods and a more intuitive alternative.

Posted byJames Hogan|2025-02-17 21:04:46
How To Convert GIF to PNG Sequence? [2025 Updated]

Explore top-notch editing apps with us. To convert GIF to PNG Sequence, you need professional apps, which we will discuss here.

Posted byJames Hogan|2025-02-17 21:02:59
Different Ways to Remove Watermark from Kinemaster Videos

Do you absolutely love Kinemaster video editing tool but struggle to remove watermark from Kinemaster videos after editing? Master different methods you can use to remove Kinemaster watermark with ease, from simple tricks like cropping out the watermarks, to more efficient options and tools like Filmora that provide better-quality results.

Posted byJames Hogan|2025-02-17 21:01:46
Get the Best iMoive Equivalent for Windows [Windows 10 included]

Are you looking for an excellent iMovie equivalent for PC, so that you can edit videos on Windows computer? Wondershare Filmora video editor is a great help.

Posted byShanoon Cox|2025-02-15 16:22:09