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
Oct 14, 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

How To Create Animated Captions for Instagram Story in 6 Steps

Learn how to create catchy animated captions for Instagram stories. Walk through our easy guide and discover tips, tools, and creative ideas to make your stories stand out.

Posted byJames Hogan|2024-12-05 10:05:09
Curved Text Generator: Add Curved Text to Photos Easily

Make your photos a visual delight by adding curved text on images and elevate your editing portfolio with this design choice. Conveniently add curved text to photo using these highly-recommended tools.

Posted byJames Hogan|2024-12-05 10:04:24
A Guide on How to Add Text to Video on Android [Step-by-Step]

Learn how to add text to videos on Android easily. To make your content stand out, add fonts, colors, and animations to the videos. This is ideal for social media and more!

Posted byJames Hogan|2024-12-05 10:04:20
Easily Convert Slow-Mo Video to Normal Speed: Quick & Simple Steps

Want to speed up your slow-mo video to normal speed? Learn easy steps to convert slow-motion video to regular speed here. No complicated tools needed!

Posted byJames Hogan|2024-12-05 10:03:30
Final Cut Pro Zoom Out Timeline - A Complete Guide

Looking for ways for Final Cut Pro zoom out timeline? This guide will discuss 5 ways for it and an alternative tool to zoom out of your timeline easily.

Posted byJames Hogan|2024-12-05 10:02:57
Latest Update | Step-by-Step Motion Tracking in After Effects

It's time to improve your post-production skills. Unlock your creative potential by discovering the power of motion tracking in After Effects.

Posted byGianni|2024-12-05 10:02:52
Crop Pictures on iPhone | Best 2 Ways

Do you wish to learn how to crop an image on an iPhone? Here are the detailed guidance.

Posted byGianni|2024-12-05 10:02:48