mpv Video Rotated Wrong: How to Fix It

  • Test mpv without configuration to isolate metadata, scripts, profiles, and filters.
  • Correct sideways video safely with video-rotate and targeted per-file settings.
  • Compare hardware decoding, streams, logs, and screenshots without changing unrelated options.

When an mpv video appears sideways, upside down, or rotated differently from the same file in another player, the cause is usually one of four things: rotation metadata inside the media, a manual video-rotate setting, an input binding or script changing rotation, or a rendering problem outside mpv. The safest approach is to identify which layer is responsible before editing permanent configuration files. This guide walks through clean tests, metadata checks, filters, logs, hardware decoding, streams, and per-file workarounds without disrupting an otherwise working mpv setup.

Side-by-side video player windows showing a sideways frame and the corrected upright frame.

1. Confirm the Symptom With a Minimal Clean mpv Command

Start by separating the media file from your normal mpv configuration. A clean test prevents profiles, scripts, shaders, key bindings, and saved options from influencing the result.

Open a terminal or command prompt and run:

mpv --no-config "path/to/video.mp4"

On Windows, use the full path to mpv.exe if it is not available through PATH. Keep quotation marks around paths containing spaces. On Linux and macOS, use the correct case because file paths may be case-sensitive.

Observe both the player window and the terminal output. Success means the video has the expected orientation under --no-config. If it does, stop investigating the media and rendering stack. The problem is in your regular configuration, a profile, an input binding, or a script.

If the clean test is still rotated incorrectly, test explicit rotation values:

  • mpv --no-config --video-rotate=0 "video.mp4"
  • mpv --no-config --video-rotate=90 "video.mp4"
  • mpv --no-config --video-rotate=180 "video.mp4"
  • mpv --no-config --video-rotate=270 "video.mp4"

The video-rotate option rotates clockwise and is most reliably used in 90-degree steps. Test one value at a time. Success means the picture is upright, its width and height are presented correctly, and controls or subtitles align with the displayed frame. Once that happens, do not change unrelated audio, subtitle, HDR, or network options.

1.1 Distinguish Video Rotation From Display Rotation

Before changing mpv, confirm whether the entire desktop is rotated. If the mpv controls, terminal, mouse pointer, and other applications are also sideways, the operating system's display orientation is responsible. Correct the display orientation in Windows Display Settings, the macOS Displays settings, or the relevant Linux desktop or display-server configuration.

If only the decoded picture is rotated while the mpv window and on-screen controls remain upright, the issue belongs to the video, its metadata, or mpv's video processing. This distinction avoids compensating for a system-wide display problem with a per-video setting.

2. Check Rotation Metadata and the video-rotate Option

Many phone and camera recordings store encoded pixels in one orientation and add container metadata instructing players to rotate the image during playback. This avoids rewriting every frame. A file can therefore have landscape-shaped encoded frames while being intended for portrait display.

Players and media tools do not always interpret container metadata identically. Metadata may also be missing, duplicated, or incorrect after remuxing or editing. This explains why one player may show a file upright while another shows it sideways.

2.1 Test Whether Metadata Is Causing the Rotation

Run the file with automatic metadata rotation disabled:

mpv --no-config --video-rotate=no "video.mp4"

With this test, mpv should avoid applying the file's rotation metadata. If the encoded picture now appears upright, the metadata is probably incorrect for that file. If it becomes sideways, the metadata was likely necessary and should normally remain enabled.

You can also inspect the file with a trusted FFmpeg installation:

ffprobe -hide_banner "video.mp4"

Look for rotation-related display-matrix or side-data output. Exact wording depends on the container and FFmpeg build. Do not assume the metadata is correct merely because a rotation value exists. Compare the reported value with how the encoded frame looks when metadata rotation is disabled.

Success means you can explain the symptom consistently: either mpv is applying valid metadata, mpv is applying incorrect metadata, or no useful metadata exists. Stop changing decoder and output settings once this test identifies a metadata-only problem.

2.2 Check mpv.conf for a Forced Rotation

Open your active mpv.conf and search for:

  • video-rotate=90
  • video-rotate=180
  • video-rotate=270
  • video-rotate=no
  • Profiles containing any video-rotate assignment

Comment out only the suspicious line, then restart mpv and retest. Do not delete the whole configuration folder. A line such as video-rotate=90 can rotate every video, while video-rotate=no can prevent a portrait video from using valid container metadata.

Also remember that later configuration assignments can override earlier ones. A profile selected by file extension, protocol, resolution, or another condition may change rotation even if the top-level setting looks correct.

2.3 Check input.conf Cycle Bindings

A common customization is a key binding that cycles through rotation values. Search input.conf for video-rotate, cycle, or cycle-values. A typical binding might resemble:

r cycle-values video-rotate 0 90 180 270

Pressing that key accidentally can change rotation for the current playback session. Scripts can issue the same property command without an obvious configuration line.

Test the suspected key while watching the image, or run mpv with --no-config so custom bindings are not loaded. Success means the image changes in predictable 90-degree steps and returns to the intended orientation. Stop after selecting the correct value unless you need a persistent workaround.

3. Separate Rotation Metadata From Video Filters

The video-rotate property and a video filter are not the same mechanism. Rotation metadata describes intended presentation, while filters transform decoded frames. A filter can rotate, transpose, flip, crop, or otherwise alter the image regardless of container metadata.

Search your command line, mpv.conf, profiles, scripts, and launch shortcuts for vf, lavfi, transpose, rotate, hflip, or vflip. Temporarily remove only the relevant filter and retest.

For example, a transpose filter left in a profile can make every matching video appear sideways. Two transformations can also cancel or compound one another. A metadata rotation plus a manual filter may produce a 180-degree result even though each individual setting looks reasonable.

Success means the clean image orientation is achieved without an unnecessary filter. Prefer video-rotate for a simple playback correction because it expresses the desired orientation directly. Use filters only when you intentionally need frame processing or when a particular workflow requires transformed output.

3.1 Check Subtitles and Track Selection Without Confusing the Symptom

Subtitle and audio settings rarely rotate the video itself. However, subtitle placement can help identify where the transformation occurs. If subtitles and on-screen controls remain upright while the picture is sideways, the video plane is being rotated. If image-based subtitles rotate with the picture, they may be part of the same filtered or decoded presentation path.

Use mpv's track list to confirm that the expected video track is selected. Some media files contain multiple video tracks, such as a cover image and the main program. Press the key bound to the track list or use the stats interface available in your setup. You can also inspect terminal output during startup.

Do not troubleshoot audio backends for a picture-orientation problem unless playback is failing more broadly. Audio track selection, synchronization, and device output do not normally control video rotation.

Visual comparison of software and hardware video decoding paths leading to upright and rotated playback.

4. Check Rendering, Hardware Decoding, and Source-Specific Causes

If rotation works with software decoding but fails with hardware decoding, the problem may be in the decoder, GPU driver, video output path, or display-server integration. Run a controlled comparison:

  • mpv --no-config --hwdec=no "video.mp4"
  • mpv --no-config --hwdec=auto "video.mp4"

If only the hardware-decoded test is wrong, update the GPU driver through the operating system, hardware vendor, or trusted distribution repository. Avoid random codec packs and unofficial binary bundles. You can temporarily use hwdec=no, although high-resolution or high-bitrate video may require more CPU resources.

You may also test a standard output configuration without carrying over custom shaders or HDR processing. HDR tone mapping, interpolation, and shaders should not normally determine orientation, but a custom rendering chain or script can introduce unexpected transformations. Disable one relevant component at a time.

Success means software and hardware decoding produce the same orientation, or you have identified one specific hardware path as the trigger. Stop once the working path is stable. Do not alter audio, subtitle, and network settings merely because they appear near the video options in your configuration.

4.1 Online URLs, yt-dlp, Playlists, and Network Streams

When a local file works but an online URL is rotated incorrectly, determine whether mpv is receiving the same media representation. Online services may provide different formats, codecs, resolutions, or metadata through manifests. yt-dlp can select and combine streams, but it does not guarantee that every source exposes orientation metadata in the same way as a downloadable file.

First test the URL cleanly:

mpv --no-config "https://example.com/video"

Then test a manual rotation on that URL. If the fix works, the selected stream may lack usable rotation metadata. Update yt-dlp using its official installation method if terminal output reports extractor or format-selection errors. Confirm that mpv is invoking the expected yt-dlp executable rather than an older duplicate found earlier in PATH.

For direct network streams, the server or stream container may omit metadata that existed in the original file. Playlists may also mix portrait and landscape items, making a global rotation option inappropriate. Use a temporary key binding or a per-file workaround instead of forcing the entire playlist to one orientation.

4.2 Screenshots and Encoded Output

If playback is upright but an mpv screenshot is sideways, determine whether you are viewing mpv's processed screenshot or inspecting an original frame with another tool. Screenshot options can select different processing stages, and external capture software may capture the display or decoded surface differently.

Create a screenshot during a clean --no-config test and compare it with the visible player window. If both are correct, a normal configuration option or script affects screenshot generation. If the window is correct but only an external capture is wrong, investigate that capture tool or GPU surface path rather than adding another rotation to playback.

5. Use Logs and Runtime Inspection to Find the Exact Override

When the source of an mpv player issue is not obvious, collect evidence instead of changing multiple options. Start mpv with a log file:

mpv --log-file=mpv-rotation.log "video.mp4"

For more focused detail, increase message output for relevant components using --msg-level. A broad diagnostic test can use a higher verbosity level, but large logs become difficult to inspect. Search the result for rotate, displaymatrix, vf, profile, script, hwdec, and the selected video track.

Use --show-profile=PROFILE_NAME to inspect a named profile before changing it. This is useful when a profile is activated through a command line, shortcut, or conditional configuration. If you do not know which profile is involved, compare normal startup output with a --no-config run.

The stats overlay can reveal the selected codec, dimensions, hardware-decoding state, filters, and rendering information. The displayed width and height are particularly useful. A portrait source shown with landscape dimensions may be relying on metadata for correct presentation.

Success means the normal run shows one rotation-related option, filter, script action, or profile not present in the clean run. Change that single cause, restart mpv, and verify the result before making any other edits.

6. Run a Clean Temporary Test Before Saving Changes

Build the smallest command that reproduces correct playback. For example:

mpv --no-config --video-rotate=90 "video.mp4"

If hardware decoding appears relevant, compare it with:

mpv --no-config --hwdec=no --video-rotate=90 "video.mp4"

Test the entire file type or source category before making the setting global. A correction suitable for one phone recording may rotate ordinary landscape videos incorrectly. Likewise, a workaround for one network stream should not automatically apply to local files, HDR movies, or every playlist entry.

6.1 Save a Per-File Workaround Safely

For a single file with bad or missing metadata, the least disruptive solution is often to launch it with the necessary --video-rotate value. A small script or shell alias can preserve the command without changing global behavior.

mpv can also save certain playback properties through its watch-later mechanism, depending on how the property is changed and your configuration. If you rely on saved state, confirm that the correction is restored only for the intended file. Test another unrelated video afterward.

For a group of known files, create a narrowly targeted profile rather than placing a forced rotation at the top level of mpv.conf. Avoid permanently rewriting media metadata until you have a backup and understand whether the container stores rotation as tags, side data, or a display matrix.

Success means the affected file opens upright on repeated playback while unrelated files continue to follow their own metadata. At that point, troubleshooting is complete.

7. Quick Fix Checklist

  1. Confirm that only the video is rotated, not the entire operating-system display.
  2. Run mpv --no-config "video.mp4".
  3. Test --video-rotate=0, 90, 180, and 270.
  4. Test --video-rotate=no to determine whether container metadata is responsible.
  5. Search mpv.conf, profiles, and launch shortcuts for video-rotate.
  6. Search input.conf and scripts for rotation cycle commands.
  7. Remove only rotation, transpose, flip, or related video filters for testing.
  8. Compare --hwdec=no with --hwdec=auto.
  9. Inspect the track list, stats overlay, terminal output, and a temporary log.
  10. For URLs, verify the selected stream and the yt-dlp executable being used.
  11. Save a per-file or narrowly targeted workaround instead of forcing global rotation.
  12. Stop changing settings as soon as the image, subtitles, and other files behave correctly.

8. Frequently Asked Questions

8.1 Why Is mpv Rotating a Video That Looks Normal Elsewhere?

The file may contain rotation metadata that players interpret differently, or your mpv configuration may add a manual rotation. Test with --no-config and then --video-rotate=no. The difference between those results usually reveals whether configuration or metadata is responsible.

8.2 How Do I Rotate a Video 90 Degrees in mpv?

Launch it with --video-rotate=90, or bind a key in input.conf to cycle through 0, 90, 180, and 270 degrees. Rotation is clockwise. Verify the result before saving it globally.

8.3 Does video-rotate Permanently Change the File?

No. The option changes how mpv presents the video during playback. It does not re-encode the pixels or permanently rewrite the file's metadata. This makes it suitable for safe diagnosis and per-file workarounds.

8.4 Why Does Rotation Work With hwdec Disabled?

That points to a hardware-decoding, GPU-driver, output, or display-server path rather than basic metadata handling. Use software decoding temporarily, test a trusted driver update, and keep the rest of the command unchanged while comparing results.

8.5 Can Incorrect Rotation Come From a Script or Shader?

Yes. Scripts can change mpv properties or add filters, while a custom rendering chain may alter frame processing. If --no-config fixes the video, restore configuration components gradually until the symptom returns. The last restored component is the strongest lead.

8.6 Should I Edit the File's Rotation Metadata?

Only after confirming that the metadata itself is wrong and preserving a backup. Playback-level correction is safer and reversible. If many players misread the same file, remuxing or correcting metadata with a trusted media tool may be appropriate, but container behavior varies and should be verified on a copy first.


Citations

  1. Official manual covering video rotation, configuration, profiles, logging, tracks, and hardware decoding. (mpv Manual)
  2. Official documentation for inspecting media streams, container data, and side data. (FFprobe Documentation)
  3. Official yt-dlp project documentation for installation, updating, format selection, and troubleshooting. (yt-dlp)
Cindy, ContentBASE creator assistant

MEET CINDY

Your ContentBASE creator assistant

Cindy helps creators find Canva templates, content ideas, and simple ways to make better social media posts faster.

Want ready-to-use templates? Claim the free Canva bundles or browse the full bundle store.