Why Do This in Your Browser?
Sideways phone videos are the single most common video problem people face. The phone records vertical with the orientation flag set, but somewhere along the chain (text message, email, upload, copy) the flag is lost or ignored, and the video plays sideways forever. Fixing this should be one click — it usually isn't.
This tool fixes it in one click. Drop the video, pick a rotation, export. When possible, the rotation is metadata-only — just flipping the orientation flag in the container, no re-encode, byte-exact, completes instantly. When the player ignores metadata orientation (which some players still do), an explicit re-encoded rotation is one toggle away.
How It Works
Container-level rotation is a metadata change: the MP4 track's display matrix is set, which tells players that read it to rotate the video on playback. It needs an MP4 or MOV with H.264 or HEVC video; WebM files are rotated physically instead. Both modes turn the same way (90 is clockwise), checked by decoding the output and comparing it with FFmpeg's transpose filter. No pixel data changes. Phones record portrait video the same way, and current browsers and players honour it. The export takes seconds and is byte-exact for the video stream.
Sometimes that's not enough. Old players, embedded video in slide decks, and certain web frameworks ignore the metadata flag and play the video in its original orientation. For those cases, toggle 'physical rotation' — the tool re-encodes the video with the rotation baked into the pixels. Larger file, slower export, but plays correctly everywhere.
Tip: Rotation often needs a follow-up resize — phone portrait video rotated to landscape ends up at unusual aspect ratios. Fix it with the Video Resizer. After rotation, shrink the file if you're sharing it.
Common Use Cases
Worked example: the two modes on the same 10-second clip
The tool runs FFmpeg.wasm (core 0.12.6) in your browser. To show what each mode does to the file, on October 12, 2026 we ran the tool's exact arguments with desktop FFmpeg 6.1.1 on a 10 s, 1280×720, 30 fps H.264 + AAC test clip. Times are desktop times; in the browser both modes also wait for the engine to load and the file to be copied in, and encoding is several times slower.
| Mode | Arguments | Time (desktop) | Output size | Video stream | Frame size |
|---|---|---|---|---|---|
| Metadata (default), 90° clockwise | -c:v copy -c:a copy -metadata:s:v:0 rotate=270 | 0.06 s | 3,947,012 B (same as input) | Byte-identical to the input | 1280×720 stored, shown 720×1280 |
| Physical, 90° clockwise | -vf transpose=1 -c:v libx264 -crf 20 -preset veryfast | 4.6 s | 4,135,680 B (+4.8%) | Re-encoded: 45.2 dB PSNR against a lossless rotation | 720×1280 |
- Metadata mode is lossless and instant because it copies the H.264 stream untouched and only changes how players are told to display it. Decoded, it matched FFmpeg's
transpose=1frame for frame. - Physical mode costs one generation of quality. At CRF 20 the rotated video measured 45.2 dB PSNR against a lossless rotation of the source, which is visually transparent for most footage, and the file grew 4.8%. Use it only when a player ignores the orientation flag.
- Flips always re-encode. Horizontal and vertical flips have no metadata equivalent here, so they use the physical path even in metadata mode.
- Doing it on the command line. Current desktop FFmpeg no longer turns
-metadata:s:v rotate=into a display matrix (our 6.1.1 output carried no rotation at all). Useffmpeg -display_rotation:v:0 -90 -i in.mp4 -c copy out.mp4for a lossless 90° clockwise turn; we checked it decodes identically totranspose=1.
Sources
Checked on .