How to Play DVDs and Blu-rays with mpv?
Using mpv to play physical media like DVDs and Blu-rays is a powerful way to enjoy your disc collection without dealing with heavy, bloated media players. While mpv is primarily a command-line-focused tool, it has robust built-in support for optical drives. This guide covers the exact commands needed to play DVDs and Blu-rays directly from your optical drive, how to navigate menus, select specific titles or chapters, and handle the encryption hurdles often found on commercial Blu-ray discs.
Playing DVDs with mpv
Playing a standard DVD in mpv is straightforward because the player
includes native dvd:// and dvdnav://
protocols. For the best experience, it is highly recommended to use
dvdnav://, as it attempts to replicate the actual DVD menu
experience and handles multi-angle discs or complex features much better
than the legacy parser.
- Play with full menus (Recommended): Open your
terminal or command prompt and run the following command to start the
DVD with full menu navigation support:
mpv dvdnav:// - Play the main title directly: If you want to bypass
the unskippable warnings and menus to jump straight into the movie, use
the legacy protocol:
mpv dvd:// - Target a specific drive: If you have multiple optical drives, or if mpv does not automatically detect your disc, specify the device path manually:
- Linux/macOS:
mpv dvdnav:// --dvd-device=/dev/sr0 - Windows:
mpv dvdnav:// --dvd-device=D:(ReplaceD:with your actual drive letter)
Playing Blu-ray Discs with mpv
Blu-ray playback follows a similar logic to DVDs but utilizes the
bd:// protocol. Unlike DVDs, mpv does not reliably support
interactive Blu-ray menus (BD-J), so it will typically default to
playing the longest title on the disc automatically.
- Play the main movie: Run the following command to
spin up your Blu-ray drive and play the primary video stream:
mpv bd:// - Play a specific title: If the disc starts playing a
“behind-the-scenes” featurette instead of the movie, you can manually
target a different title track (e.g., title 2):
mpv bd://2 - Specify the Blu-ray drive path: Just like with DVDs, you can point mpv directly to the hardware path if needed:
- Linux:
mpv bd:// --bluray-device=/dev/sg1 - Windows:
mpv bd:// --bluray-device=E:
Overcoming Blu-ray Encryption (AACS)
If you attempt to play a commercial, store-bought Blu-ray disc, you
will likely encounter an error stating that the playback failed due to
encryption. Commercial Blu-rays are protected by AACS encryption. To
make mpv play these discs seamlessly in the background, your system
requires an additional open-source library called
libaacs along with a regularly updated key database
file (KEYDB.cfg).
- Linux: Install the library via your package manager
(e.g.,
sudo apt install libaacs1on Debian/Ubuntu) and place a validKEYDB.cfgfile into your~/.config/aacs/directory. - Windows: Download the
libaacs.dllfile that matches your mpv architecture (usually 64-bit) and place it in the same directory as yourmpv.exe. Then, place theKEYDB.cfgfile inside your%APPDATA%/aacs/folder.
Once these decryption keys are properly configured in their
respective folders, mpv will automatically decrypt and play commercial
Blu-ray discs in the background using the standard
mpv bd:// command.