MKVPriority is a command-line tool and Docker image that fixes default audio and subtitle track selection in MKV files. It scores every track in a file against rules you define in a TOML config (language, codec, channel count, subtitle format, track-name patterns) and then sets the default and forced flags on the highest-scoring tracks, so players open the right audio and subtitles instead of the first stream in the container. All changes are made in place with mkvpropedit, which rewrites Matroska metadata only: no remuxing, no re-encoding, and a whole library can be corrected in a single pass. The latest release is v1.5.1.
default, and the highest-scoring subtitle track gets default or forced, with the rest cleared.mkvpropedit from MKVToolNix, so streams are never decoded or re-encoded and the operation is fast and reversible.org code.::TAG to config and target paths to route different rules to different libraries, for example anime and western content in one stack.--dry-run simulates changes, --verbose dumps full track metadata and scores, and --restore rolls back previous edits from the archive database.Radarr and Sonarr decide which release you download, but they never touch the track flags inside the file. A downloaded MKV can carry a stereo track flagged default while the 5.1 mix sits unused, or play an English dub instead of the original Japanese audio, and every playback starts with a manual switch. MKVPriority closes that gap: describe your preferences once, and it scores tracks per file and writes the flags, so Jellyfin, Emby, Plex, Kodi and mpv pick the right stream from the start. Because it only edits container metadata, the fix costs seconds per file and can be undone.
--dry-run before writing anything.--restore, without re-downloading media.source at github.com/kennethsible/mkvpriority