17

I need to rotate a MP4 video by 90 degrees. There is software like Free Video Flip and Rotate available that does this but produces an AVI file.

Do you have any suggestions for a software to produce a MP4 that is in the same quality (and file size) as the original, just 90 degrees rotated? Does not have to be free software ;-)

2

8 Answers 8

0

There's no way to rotate a video without re-encoding it. So you can only appoximate the size and quality.

I recommend VirtualDub to do the rotation. It's free and fast.

2
  • 6
    VirtualDub does not seem to support MP4, but Avidemux does.
    – sschuberth
    Jan 10, 2013 at 22:00
  • 9
    This is actually not true. The MP4 format supports a rotate flag, which informs the player to rotate the video prior to displaying it. The flag can be edited using f.ex. the MP4Box command-line multiplexer.
    – Witiko
    Jun 30, 2013 at 17:02
9
  1. Open Avidemux (free video editing software)
  2. Open your mp4 file.
  3. Choose a "Video Output" other than "Copy" [I chose "Mpeg4 ASP (ff)"]
  4. Choose Video > Filters (or in Windows, press Ctrl+Alt+F)
  5. Double-click "Rotate" to add that filter
  6. Choose 90 degrees
  7. Press "Close" to exit "Video Filter Manager"
  8. Save

(Thanks to @secret for getting me started, but his/her list of steps weren't complete.)

1
  • I used this once in the past, I don´t know what I did, avidemux looks like detected video was rotated automatically, and rotated video by itself :/... now I have another clean installation and does not work that way anymore, and when I select video outputs (tried all possible combinations) it never ends with same file size than the first time... I would love to have a way to say... "format same than origin" and rotate only
    – Yogurtu
    Jun 21, 2019 at 22:44
8

If you actually recorded video in landscape mode, but phone erroneously saved in metadata that it is 90 degrees rotated (it happen to me today during helicopter flight) just download ffmpeg and use this command (completely lossless as it just writes new header - metadata):

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=0 output.mp4
4
  • I just tested this approach, seems not to lose quality, file size is 0.001% bigger tough, not sure why if this is a header-metadata change only.
    – Yogurtu
    Jun 21, 2019 at 22:42
  • I experience a 1.3MB decrease in size but the command ran in a couple of seconds, not nearly long enough to transcode anything 3 minutes long. All I can guess is that GoPro has a bunch of extra room in the file that is not actually used. Maybe space pre-allocated for event tags and such.
    – boatcoder
    Feb 16, 2020 at 17:29
  • This is NOT necessarily lossless - if the source video has any other streams (i.e. subtitles, etc) they won't be copied. For that you need -map 0. And even with -map 0 & -copy_unknown, it can still screw up some streams it doesn't recognize, i.e. telemetry recorded by GoPros.
    – J23
    Jun 19, 2020 at 7:18
  • This wasn't working for me, but found this page with a similar solution that worked: ffmpeg -i input.mp4 -map_metadata 0 -metadata:s:v rotate="90" -codec copy output.mp4 Dec 30, 2021 at 18:54
7

I used Avidemux, a free video editor.

This software allows you to rotate any movie.

In a drop-down list you can select the desired output format (e.g. MP4, AVI, FLV, etc.).

If using the MPEG-4 ASP setting in the video drop-down list, you will have to fiddle around with Quantizer setting (A higher number means reduced file size and less quality).

This tool is great when you capture a movie on your cell phone and want to send the movie to friends!

7
  1. Open Avidemux
  2. Press Ctrl+Alt+F (for Windows)
  3. Select Rotate
  4. Save
4
  • Easiest method so far!
    – TimothyP
    Mar 6, 2013 at 6:17
  • When I save, I end up with a file of the same size which doesn't actually play. This didn't work until I changed "Video Output" from copy to something like Mpeg4 ASP (ff)
    – Sterno
    Sep 24, 2013 at 17:36
  • 1
    -1 because although the program suggested is helpful, the steps are incomplete.
    – JYelton
    Oct 23, 2013 at 19:21
  • See Ryan's solution for complete steps.
    – Anton
    May 28, 2014 at 18:50
2

You can rotate an MP4 video using VLC and some awesome nice guy wrote a detailed set of instructions with screenshots here: http://www.wintips.org/how-to-rotate-and-save-a-video-using-vlc-media-player/ (Disclaimer: This post isn't spam, I have no connection at all to the site or the dude who wrote the instructions. I merely used the instructions to rotate a video of my baby daughter and so I'm just really grateful for it.)

1
  • I think my version of VLC is broken because VLC won't rotate anything, even for viewing, let alone saving the rotated file.....
    – boatcoder
    Feb 16, 2020 at 17:21
1

The easiest method I've seen is with QuickTime (Pro), open Movie Properties, click Video Track, then go to Visual Settings and use the arrows to rotate as needed. Then close the Movie Properties, then do a File Save As.

1

I had many .mov files that needed rotation. I used Square 5 Streamclip and did not loose any quality. Super easy to save as in many file formats: http://www.squared5.com/svideo/mpeg-streamclip-win.html

2
  • Your answer sounds suspiciously like an advertisement. Please read the FAQ on these types of posts as answers. If you're going to provide a link to your product at least take the time to show how you would do this in it. At least your answer would have more merit than just a link.
    – slm
    Apr 12, 2013 at 17:00
  • I tried it. First the "stable" version 1.2 - it does not have the Rotate option. The beta 1.2.1b6 does have the option, but it didn't work for me on 1st try and I didn't pursue any further. At least there's nothing to install - just unzip an executable - and it doesn't seem to hae strings (i.e. crapware) attached. It does require a certain version of Quicktime Alternativeto be installed. A link to that is on their site May 5, 2013 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .