Correct a sideways video before uploading

Updated: November 17, 2026

If a recording looks upright in one player and sideways in another, inspect the original before uploading another version. Display orientation and the actual pixel layout can disagree.

Diagnose before editing

Open the same file in two local players. Decide whether the picture needs a clockwise turn, a counterclockwise turn or no turn. Do not rotate an already correct automatic preview again.

Work on a separate copy

  1. 1Keep the original. Install FFmpeg locally and use a new output filename.
  2. 2For a picture that needs 90 degrees clockwise, run the example. It disables automatic rotation so the manual turn is deliberate.
  3. 3Use transpose=cclock for the opposite direction. Re-encoding changes the image; stream copy cannot apply this filter.
  4. 4The final stream-copy pass clears leftover display-rotation metadata without encoding the picture again.
ffmpeg -noautorotate -i input.mp4 -map 0:v:0 -map "0:a:0?" -vf "transpose=clock" -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a aac -metadata:s:v:0 rotate=0 -movflags +faststart rotated-pixels.mp4
ffmpeg -i rotated-pixels.mp4 -map 0:v:0 -map "0:a:0?" -c copy -metadata:s:v:0 rotate=0 -movflags +faststart rotated.mp4

Check before sharing

Watch the beginning and end, including faces and any written text. Check the displayed aspect ratio and sound. Upload only the corrected copy to Dembed, then inspect its watch page and embed on a phone; CSS around an iframe cannot repair the source pixels.

Technical reference

https://ffmpeg.org/ffmpeg-filters.html#transpose

Frequently asked questions

It may interpret orientation metadata that another player handles differently.

You might also like

Host your videos for free and earn from every view

Create your account in under a minute, upload your first video and start earning from day one.