A video that looked perfect on your phone plays sideways on a laptop, in a video editor or after uploading it to a company intranet. Or the reverse: it looks fine on a computer but a colleague sees it upside down. It is one of the most confusing video problems, because the file appears correct in some places and wrong in others.
The explanation is a small piece of metadata called the rotation flag. This guide explains how phones record orientation, why some software ignores it, and the two ways to fix a sideways video permanently: rewriting the flag or rotating the actual pixels.
Why videos end up sideways
A phone's camera sensor has a fixed physical orientation. When you hold the phone vertically or turn it, the phone does not usually rearrange the pixels as it records. Instead, it records frames in the sensor's native landscape orientation and writes a display rotation into the file's metadata, saying in effect "turn this 90 degrees clockwise when you show it".
Most modern players, browsers and phones read that instruction and rotate the picture on screen. Problems appear when:
- software ignores the flag, as some older players, editors and web platforms do, so you see the raw landscape frames;
- the phone guessed the orientation wrong, typically when recording while pointing the phone straight down at a table, so the flag itself is wrong;
- a tool applied the flag and then kept it, rotating twice.
Two ways to fix it
Change the rotation flag. The video frames are not touched; only the metadata instruction changes. It is instant and lossless. The downside is the same as the original problem: players that ignore the flag will still show the wrong orientation.
Rotate the pixels. The video is decoded, each frame is turned, and the result is encoded again with no rotation flag needed. Every player shows it correctly, but it takes time and involves a small generation loss.
| Flag only | Rotate pixels | |
|---|---|---|
| Speed | Instant | Proportional to length |
| Quality | Unchanged | Very slightly reduced |
| Works in every app | No | Yes |
| Formats | MP4, MOV | Anything readable, outputs MP4 |
Rotate a video with our tool
The Rotate Video tool offers both approaches and shows a live preview of the rotation before you process anything.
- Open Rotate Video and drop your video on the box. The preview plays with the rotation applied.
- Choose a Rotation: 90° clockwise, 180° (upside down) or 90° counter-clockwise. The preview updates immediately so you can check the direction.
- Choose a Method. Rotate the pixels (re-encode) works in every player and editor and produces an MP4. Rotation flag only (instant) keeps the frames as they are and writes a new display rotation; it is available only for MP4 and MOV files.
- Click Rotate video, preview the result, and download.
If you choose the flag method, test the result in the app where the problem occurred. Phones, browsers and VLC honour the flag, but some editors and older players do not, and in that case the pixel method is the reliable fix.
The pixel method re-encodes with H.264 at a high quality setting, using single-threaded WebAssembly. It is slower than a desktop app for long or 4K clips, and very large files may exceed the browser's memory.
Other ways to rotate a video
iPhone and iPad
In Photos, tap Edit, then the crop icon, and use the rotate button (a square with an arrow) until the orientation is right. Tap Done. Apple's apps handle this without you needing to think about flags.
Android
Google Photos and most gallery apps include a rotate button in the video editor, usually under a crop option.
Windows
Clipchamp can rotate clips on its timeline and export them. Older versions of the Photos app offered a rotate option in the video editor. Both re-encode on export.
macOS
QuickTime Player has Edit → Rotate Left and Rotate Right, followed by saving or exporting. iMovie offers rotation in its crop controls.
ffmpeg: rotate the pixels
ffmpeg -i input.mp4 -vf "transpose=1" -c:v libx264 -crf 20 -c:a copy output.mp4
transpose=1 rotates 90 degrees clockwise, transpose=2 rotates 90 degrees counter-clockwise, and hflip,vflip rotates 180 degrees. Recent ffmpeg versions automatically apply an existing rotation flag when decoding, so the rotation you add is relative to how the video appears in a normal player.
ffmpeg: change only the flag
Older ffmpeg releases accepted -metadata:s:v:0 rotate=90 together with -c copy. Newer releases replaced this with the -display_rotation input option, and the sign conventions differ between them, so check the documentation for your version and test the result in a player.
Tips and troubleshooting
Preventing sideways videos
Start recording with the phone already in the orientation you want, and avoid starting while the phone is lying flat. Many camera apps lock orientation at the moment recording starts.
The video is mirrored, not rotated
Front-camera recordings may be mirror images. Mirroring is a flip, not a rotation, and needs a horizontal flip (hflip in ffmpeg).
After rotating, the video has the wrong shape
Rotating 90 degrees swaps width and height: a 1920×1080 video becomes 1080×1920. If you need a landscape result from vertical footage, crop it with Crop Video and, if required, change the dimensions with Resize Video.
Preparing clips for merging
Fix orientation before joining clips; see how to join video clips into one file and the Merge Videos tool.
Converting iPhone clips
If your iPhone video also needs to become MP4, MOV to MP4 keeps the rotation flag when it remuxes, so you may still want the pixel method afterwards for stubborn apps.
Frequently asked questions
Why does my video play sideways on my computer but not on my phone?
The phone reads the rotation flag stored in the file, while the computer program ignores it. Rotating the pixels makes the video display correctly everywhere.
Does rotating a video reduce quality?
Changing only the rotation flag does not. Rotating the pixels re-encodes the video, which loses a small amount of quality that is rarely visible at a high setting.
How do I rotate a video 90 degrees permanently?
Use the pixel method, which rewrites each frame in the new orientation. The result no longer depends on any player reading metadata.
Why is the flag-only method greyed out?
It only works for MP4 and MOV files, because those containers store a display rotation. For MKV, WebM, AVI and other formats, the pixel method is required.
Can I rotate by a custom angle, such as 5 degrees?
Not with this tool, which rotates in 90-degree steps. Straightening a tilted horizon requires a video editor or ffmpeg's rotate filter, which also needs cropping to hide the corners.