mpv Language Auto Selection Wrong: How to Fix It

When mpv automatically chooses the wrong audio or subtitle language, the player itself is usually working correctly but receiving conflicting instructions. The most common causes are incorrect alang or slang preferences, unreliable language tags inside the media file, default or forced track flags, a manual aid or sid selection, or an override from a profile, script, command-line argument, or launcher. Start with a clean test, inspect the actual track metadata, and change one setting at a time. Once mpv selects the intended tracks automatically in a repeatable test, stop changing unrelated video, HDR, hardware-decoding, or output options.

Terminal-based clean mpv test comparing preferred audio and subtitle tracks.

1. Confirm the Symptom With a Minimal Clean mpv Command

Before editing mpv.conf, determine whether the problem survives when mpv ignores your normal configuration. This separates a media metadata problem from a configuration, profile, script, or launcher problem.

Open a terminal in the folder containing a representative media file. Replace the filename and language codes with values appropriate for your file. For example, to prefer Japanese audio and English subtitles, run:

mpv --no-config --aid=auto --sid=auto --alang=jpn,ja --slang=eng,en "example.mkv"

On Windows PowerShell or Command Prompt, quote paths containing spaces. On Linux and macOS shells, use quotes or properly escape special characters. Do not copy typographic quotation marks from a formatted document.

The language lists are priorities. mpv attempts to select the best matching eligible track, reading the list from left to right. Including both common three-letter and two-letter forms can help when files use inconsistent tags, such as eng versus en. This does not repair missing or incorrect metadata.

1.1 Interpret the clean-test result

  • If the clean command selects the correct tracks, the file contains enough metadata and your normal configuration is overriding the desired behavior.
  • If it still selects the wrong tracks, inspect the track language tags and default or forced flags.
  • If no desired track exists, no preference option can create it.
  • If a stream exposes different tracks than a local file, investigate the stream or external tool separately.

Success means the intended audio and subtitle tracks are selected immediately without pressing a track-switching key. When that happens under --no-config, stop testing decoders and output drivers. Focus only on configuration sources that are absent from the clean command.

2. Check Language Preferences and Track Selection Settings

2.1 Set alang and slang deliberately

The alang option controls preferred audio languages, while slang controls preferred subtitle languages. In mpv.conf, options normally appear without the leading double hyphen:

alang=jpn,ja
slang=eng,en
aid=auto
sid=auto

Choose the order carefully. If English should be preferred over Japanese, use alang=eng,en,jpn,ja, not the reverse. Avoid adding every language found in your library unless you genuinely want mpv to fall back through that entire sequence.

Check for duplicate definitions. A later applicable value may replace an earlier one, and command-line arguments or launcher options can also affect the final configuration. Search your configuration files for alang, slang, aid, and sid.

Success looks like consistent automatic selection across several correctly tagged files. If one particular file remains wrong while others work, the remaining problem is probably that file's metadata or flags.

2.2 Inspect track language tags with F9

While the file is playing, press F9 to inspect the available audio and subtitle tracks in installations using mpv's standard bindings. The displayed track list can reveal language labels, selected tracks, titles, and default or forced status. If F9 does nothing, a custom input binding may have replaced it. Use the terminal output or stats information instead.

Look for cases such as these:

  • The English audio track has no language tag.
  • A commentary track is tagged as ordinary English and marked default.
  • The desired subtitle is tagged und, meaning undetermined.
  • A full subtitle track and a signs-only track share the same language.
  • The muxer marked an unexpected track as default or forced.

alang and slang can only use the information available to mpv. They cannot reliably distinguish two same-language tracks when their tags, titles, and flags fail to communicate their purpose.

2.3 Understand default and forced flags

Containers such as Matroska can mark tracks as default or forced. These flags participate in automatic selection, especially when multiple candidates have the same language or when subtitle behavior depends on the selected audio language. A forced subtitle track commonly contains only dialogue that differs from the main audio language, although the label does not guarantee that the file was authored correctly.

Track flags are not proof of content. If a release marks a commentary track as default, mpv may reasonably select it. Compare several files before changing global preferences to compensate for one badly tagged file.

For subtitle behavior, review options including subs-with-matching-audio and subs-fallback in the manual before changing them. These options influence whether subtitles matching the current audio language are selected and how fallback selection behaves. Keep them at their defaults during the first test unless your intended policy specifically requires different behavior.

2.4 Remove manual aid and sid overrides

aid selects an audio track, and sid selects a subtitle track. Numeric values are manual track IDs, not language preferences. A line such as aid=2 can force track 2 even when alang prefers another language. Likewise, sid=3 can defeat normal subtitle auto-selection.

Temporarily use:

aid=auto
sid=auto

Also inspect shortcuts, scripts, and launcher commands for --aid=, --sid=, audio-cycle, or sub-cycle. Cycling a track during playback is useful for immediate correction, but it does not prove the next file will be selected correctly.

Success means no fixed track ID is required. Stop once automatic selection consistently chooses the intended language, because track IDs can differ from file to file.

3. Find Profile, Script, and Input Overrides

3.1 Review profiles and conditional profiles

A profile can silently introduce different language preferences or fixed track IDs. Search mpv.conf and included configuration files for profile sections, profile=, alang, slang, aid, and sid. Pay particular attention to conditional profiles that activate for a filename, protocol, path, resolution, or other property.

Use the following command to display the contents of a named profile:

mpv --show-profile=PROFILE_NAME

Replace PROFILE_NAME with the actual profile name. This helps verify whether a profile contains a forgotten language or track-selection setting. If a launcher applies a profile, compare the launcher's full command with the command you typed directly.

Success looks like the correct language being selected after removing or correcting the specific profile option. Do not disable unrelated HDR, shader, cache, or hardware-decoding profile settings if the clean test already showed that playback works.

3.2 Check input.conf and scripts

An input.conf binding can run commands that change audio or subtitle tracks. Scripts can do the same through mpv's scripting API or IPC. Temporarily test without configuration first, then reintroduce only the suspected script or binding.

Search scripts and bindings for commands involving aid, sid, alang, slang, audio, or sub. Also check external controllers that send IPC commands after a file loads. A script that remembers the last selected track may override mpv's initial automatic choice moments after playback begins.

A useful clue is timing. If the correct language appears briefly and then switches, a script, IPC client, or delayed profile action is more likely than ordinary startup selection.

Diagram separating language track selection from video and audio playback systems.

4. Separate Language Selection From Unrelated Playback Systems

Hardware decoding, GPU drivers, HDR output, shaders, display servers, audio backends, and screenshot settings generally do not decide which language track mpv selects. Investigate them only when the symptom includes decoding failure, missing audio output, video corruption, or playback errors.

4.1 Distinguish selection from failed playback

A selected track can fail to produce audible output because of an audio-device or backend problem. Similarly, mpv may select the desired video or subtitle track while rendering fails for another reason. Confirm which track is marked selected before assuming language selection failed.

  • If the desired audio track is selected but silent, inspect audio-device and decoder messages.
  • If the desired subtitle is selected but invisible, check whether the track has events at the current timestamp and whether subtitle visibility is enabled.
  • If playback switches tracks after a decoding error, inspect logs for that track's codec or stream errors.
  • If only HDR files fail, treat HDR output as a separate issue unless track selection itself is demonstrably different.

4.2 Check external subtitle discovery

External subtitle files may not contain embedded language metadata. mpv can infer relevance from filenames and subtitle auto-loading rules, but ambiguous names reduce selection accuracy. Use clear names that associate the subtitle with the video and identify its language, such as Movie.en.srt beside Movie.mkv.

Review the sub-auto setting if external subtitles are unexpectedly loaded or ignored. File permissions also matter. mpv must be able to read the subtitle file and traverse its parent directories.

4.3 Check online URLs, yt-dlp, and network streams

For an online URL, mpv may depend on yt-dlp to discover formats and subtitles. The available tracks can differ from those exposed by a browser or from one stream session to another. Confirm that mpv actually receives the intended audio or subtitle track before adjusting language preferences.

Use a trusted, current yt-dlp installation from its official project or your operating system's package system. If mpv cannot find it, configure a valid executable path or correct your environment's PATH. Do not install random codec packs or binaries from unofficial download sites.

Network streams can expose tracks with missing, changing, or generic language tags. Playlist entries may also point to variants with different track sets. Test the resolved media URL and the original page URL separately when legally permitted and supported. If the source never supplies the desired track, mpv cannot select it.

5. Use Logs and Runtime Information to Identify the Override

5.1 Create a focused log

Run the failing file with a log file and increased message detail:

mpv --log-file=mpv-language.log --msg-level=all=v "example.mkv"

If that produces excessive output, use a narrower message level after consulting the mpv manual. Search the log for track listings, selected audio and subtitle IDs, configuration files, profiles, scripts, and command-line options. Avoid publishing logs without reviewing them because paths, URLs, usernames, or access tokens may appear.

Compare a normal run with a clean run:

mpv --no-config --log-file=mpv-clean.log --alang=jpn,ja --slang=eng,en "example.mkv"

The difference between the two runs is often more informative than either log alone.

5.2 Use the stats overlay and track list

mpv's stats overlay can help verify the active audio and video streams and whether playback errors are involved. Standard installations commonly expose stats through the i key, although custom bindings can change this. Combine it with the F9 track list and terminal output rather than relying on an audio track's title alone.

Success means the selected track ID, language, and title match your intended track, and the choice remains stable after startup. At that point, further GPU, decoder, or network tuning is unnecessary for this symptom.

6. Run a Clean Temporary Test Before Editing Multiple Options

Use a controlled sequence so that every result has a clear meaning:

  1. Choose one local file that reliably demonstrates the problem.
  2. Press F9 or inspect terminal output to record its track IDs, tags, titles, and flags.
  3. Run it with --no-config, automatic track IDs, and explicit language preferences.
  4. If successful, test your normal configuration with scripts temporarily excluded through a separate clean invocation rather than deleting files.
  5. Restore one profile, script, launcher argument, or binding at a time.
  6. Repeat the test after each change.
  7. Confirm the result with a second correctly tagged file.

Do not delete your entire configuration folder. Make a backup before editing, and comment out only suspected lines when possible. Changing many options simultaneously can hide the actual cause and introduce unrelated mpv player issues.

7. Quick Fix Checklist

  • Run mpv with --no-config to separate configuration problems from media metadata.
  • Set alang and slang in the exact priority order you want.
  • Include appropriate two-letter and three-letter language tags when your files use both.
  • Set aid=auto and sid=auto during diagnosis.
  • Press F9 to inspect language tags, titles, default flags, and forced flags.
  • Search profiles, scripts, input bindings, launchers, and IPC clients for track overrides.
  • Check external subtitle filenames and file permissions.
  • Verify which tracks an online URL or network stream actually exposes.
  • Compare normal and clean logs before changing unrelated playback settings.
  • Stop when two representative files select the intended tracks automatically.

8. Frequently Asked Questions

8.1 Why does mpv ignore alang or slang?

The desired track may lack a matching language tag, another setting may force a numeric aid or sid, or a profile, script, launcher, or IPC client may override the selection. Test with --no-config and inspect the track list before editing the preference order.

8.2 Should I use en or eng in mpv?

Use the tags present in your media collection. Because files are not always consistent, a preference such as slang=eng,en can cover both common forms. The first entry has higher priority. This cannot match a subtitle tagged as undetermined unless another selection rule chooses it.

8.3 Why does mpv choose commentary audio?

The commentary track may share the desired language tag and may be marked default. Its title might identify it as commentary, but language preference alone does not express a preference for main audio over commentary in every ambiguously authored file. Inspect the flags and metadata, then correct the file's metadata when you control the file or select the track manually for that file.

8.4 Why are subtitles selected when audio is already in my language?

Subtitle selection depends on your slang preference, available tracks, forced and default flags, and options governing subtitles that match the audio language. Inspect subs-with-matching-audio and subs-fallback in the official manual, then choose a policy that matches whether you want full subtitles, forced subtitles, or no same-language subtitles.

8.5 Can hardware decoding cause the wrong language selection?

Normally, no. Hardware decoding processes selected video streams and does not usually decide audio or subtitle language. Investigate hwdec, GPU drivers, HDR, or output drivers only if logs show decoding or rendering failure in addition to the track-selection problem.

8.6 Why is the problem limited to online videos?

The site, playlist, stream manifest, or yt-dlp extraction result may expose different tracks or incomplete language metadata. Compare the available track list with a local file, verify that yt-dlp is found, and inspect the log. If the desired language is not supplied by the source, changing alang or slang cannot make it available.


Citations

  1. Official reference for mpv options, track selection, profiles, logging, and subtitle behavior. (mpv Manual)
  2. Official documentation and installation guidance for yt-dlp. (yt-dlp Project)
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.