@spub_editor

You imported the footage and everyone's tilting their head: the clip is sideways or upside down. Shot portrait but exported landscape, or the camera's orientation sensor lied. Rotation is a one-minute fix — and choosing the right method decides whether it's instant and lossless or a slow re-encode.

Why videos end up sideways

Two different causes get conflated:

1. **Rotation metadata**: the pixels were recorded landscape, but a flag tells players "rotate 90° on display." Some players honor the flag, some don't — which is why a clip can look correct on your phone and sideways on a TV. Fixing this means changing or baking the flag, not the pixels. 2. **Actually-rotated pixels**: the frame really is sideways in the data. Fixing this requires re-encoding (rotating every frame).

The metadata case is the common one for phone footage — and the lucky one, because it's fixable in seconds without quality loss.

FFmpeg: the precise way

**Rotate losslessly by rewriting the metadata** (instant, zero quality loss):

ffmpeg -i input.mp4 -c copy -metadata:s:v rotate="90" output.mp4

Values: 90, 180, or 270. This only rewrites the display flag — the file stays byte-identical in quality. Caveat: some old players ignore the flag.

**Bake the rotation into the pixels** (re-encodes, works everywhere):

ffmpeg -i input.mp4 -vf "transpose=1" -c:a copy output.mp4

transpose values: `1` = 90° clockwise, `2` = 90° counter-clockwise. For 180°: `-vf "transpose=1,transpose=1"`. Audio needs no re-encode (`-c:a copy`) — only video rotates.

Desktop apps

- **Windows:** the built-in Photos app opens video → Edit → rotate, saves re-encoded. VLC can rotate for viewing but saving the rotation needs the menu maze (Video Effects → Geometry). - **Mac:** QuickTime never gained rotation; iMovie rotates in a project (re-encodes on export). - **HandBrake:** the Rotation setting under video filters — reliable, batch-capable, re-encodes.

Phones

- **iPhone:** Photos → Edit → crop tool → rotate button → Done. Non-destructive (writes the metadata flag) — instant and lossless. - **Android:** Google Photos → Edit → Crop → rotate. Also metadata-based for phone-shot clips. Samsung Gallery works the same way.

Phone gallery apps typically rotate via metadata; that's why their "save" is instant even on 4K files.

The prevention beat: shooting straight

The cleanest rotation is the one you never need:

- **Lock orientation** before recording if your camera app allows it - Vertical content (Reels, Shorts, Stories): hold the phone **portrait** — see our aspect-ratio guide for which platforms want what - Keep clips consistent within one project; mixed orientations in a timeline mean every clip but one needs rotation

Batch-rotating a folder

ffmpeg -i in.mp4 -vf "transpose=1" -c:a copy out.mp4 run in a shell loop handles a whole shoot in minutes — useful when a camera's sensor was wrong for an entire day's footage.

The takeaway

Try the metadata flag first (`-c copy -metadata:s:v rotate=...` or your phone's gallery edit): instant, lossless, correct on most players. Bake pixels with `transpose` when universal compatibility matters. And lock your camera orientation before the next shoot — future-you sends thanks.

📹 Have a video or photos to share?
Upload to S.pub and get an instant share link — free, works everywhere, no watermarks.
Upload your video →
Comments 0

No comments yet