← Back to Complete Guide

Fix Sideways Videos & Photos in Bulk (Batch Rotate & Flip)

Shot vertical, plays horizontal. Mirrored selfies. Upside-down vacation dumps. Photos and videos need different rotation tools — here's both, plus why flags can't be trusted and how to fix whole folders at once.

By Hadi Karaki, maker of FormatifSeptember 16, 202610 min read

Why sideways happens (and why flags don't fix it)

Phones record an orientation flag alongside the pixels — and players disagree about honoring it. Your phone obeys the flag (looks right), your TV ignores it (sideways), your editor splits the difference. The only universal fix is rotating the actual pixels, which is what every method below does. EXIF orientation on photos is the same story with stills.

Part 1: batch-rotate photos (90° / 180° / flip)

Photo rotation is cheap and safe: 90° clockwise or counterclockwise for portrait/landscape mixups, 180° for upside-down shots, horizontal flip for mirrored front-camera stills, vertical flip for the rare inverted scan. Apply one operation to the whole folder, then flip back the odd ones out with per-file preview — vacation dumps always contain one contrarian.

Photo rotation and flip running on a mixed-orientation folder.

Folder of JPGs → rotate 90° clockwise (ImageMagick)

for %i in (*.jpg) do magick "%i" -rotate 90 "%~ni-rot.jpg"

Part 2: batch-rotate videos (transpose, honestly)

Video rotation rearranges pixels, so a re-encode is unavoidable — set quality high (CRF 18–20) and the loss is invisible. Metadata-only rotation flags exist but players honor them inconsistently, which is how you got here; don't re-flag, actually rotate. Same batch logic as photos: one transpose for the folder, per-file check for exceptions, horizontal flip for mirrored selfie clips.

Video rotation and flip running on sideways phone clips.

Rotate 90° clockwise + keep audio (FFmpeg)

ffmpeg -i in.mp4 -vf "transpose=1" -c:v libx264 -crf 20 -c:a copy out.mp4

Quick Solution

Whole trip folder, correct orientation, one run.

Mixed photos and videos, mixed wrongness — the mixed folder from every trip ever. Formatif Pro ($8.95 one-time) runs separate photo and video rotation tools over the folder offline — 90°/180°/270° plus flips, per-file preview for the contrarians — so everything plays upright everywhere, forever.

Rotation questions, answered

Why is my phone video sideways?

Rotation sensor locked wrong + players disagree on flags. Fix: rotate the pixels for real, not the flag.

Rotate many photos at once?

One rotation for the folder, per-file preview for exceptions. 90°/180°/flips cover everything.

Rotate video without losing quality?

Re-encode at CRF 18–20 — visually invisible. Flags are unreliable; real transpose is universal.

Photos fine on phone, sideways on PC?

EXIF orientation ignored by desktop viewers. Bake the rotation into pixels via batch.

Fix mirrored selfie video?

Horizontal flip the file. Same batch logic as rotation, high bitrate, done.

Rotate mixed folders together?

Yes — separate photo/video rotation tools in one batch run. Trips and events are the use case.

Keep learning

Upright everywhere, forever.

Formatif Pro ($8.95 one-time) and Formatif AI ($12.95 one-time) handle video, image, and audio conversion offline — with batch workflows, no file size limits, and a 3-day free trial.

FFmpeg and ImageMagick rotate free per file — batching fixes folders.

HK

Written by

Hadi KarakiLinkedIn

Founder of Formatif, a local-first offline media processing suite for Windows and Linux. Hadi writes about video, image, and audio formats, compression, and privacy-first desktop workflows.