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

Can You Slow Down a Timelapse on an iPhone? Find Out How

Do you have timelapse video capture on your iPhone you want to slow down? Find out how to slow down time-lapse on your iPhone here and tips to maintain the quality.

Posted byJames Hogan|2024-09-30 20:46:29
The Full Guide to Creating Video End Credits Within Minutes

Adding video credits takes effort, but it doesn’t have to be a challenge. This comprehensive guide explores the easiest method for creating great video end credits — Using Filmora.

Posted byJames Hogan|2024-09-30 20:42:55
How Do I Make an MP4 File Smaller Without Quality Loss

You can make an MP4 file smaller using an MP4 compressor. Learn how to reduce MP4 file size without losing quality for social media, email, web, and more.

Posted byJames Hogan|2024-09-30 20:39:34
CSS Text Reveal Animation: Everything You Need to Know

CSS text reveal can seriously enhance your website design. Learn how to make it – or replace it with an easier alternative.

Posted byJames Hogan|2024-09-30 20:38:08
10 Best Sites to Download Glitch Effect Background, Footage and Video Effect Pack

Allow us to talk about the 10 best sites from which you can download glitch effect free and have fun using them to add life to your content.

Posted byMax Wales|2024-10-09 10:29:06
10+ Best Video Reverse Software: Make Any Video Backwards

If you wish to create reverse effects on some of your funny videos, then in this article, we will introduce 13 best YouTube video reversers for making a reversal video on your computer and iOS or Andr

Posted byLiza Brown|2024-09-30 19:50:54
Convert MKA Files To MP3 and Enjoy Music of Your Choice

Choose from a list of best mka to mp3 audio file converters to convert mka to mp3 for free

Posted byLiza Brown|2024-09-30 20:00:10