Skip to main content

Synopsis

Command-line arguments starting with - are interpreted as options. Everything else is treated as a filename or URL. Options require a parameter in the form --option=value. Flag options use --flag (equivalent to --flag=yes) or --no-flag (equivalent to --flag=no).

Playing local files

Pass one or more file paths directly to mpv:
To play multiple files sequentially, list them all on the command line. mpv adds them to an internal playlist and plays each in order:
Prefix relative paths that begin with - using ./ to prevent mpv from interpreting them as options. For example, use ./file.mkv instead of -file.mkv.

Reading from stdin

Use - as the filename to read media data from stdin:
This also works with piped input:
Using - as the filename disables console controls, which makes it suitable for playing data piped to stdin.
Use -- to stop mpv from interpreting subsequent arguments as options — useful if you need to play a file that starts with a -:

Playing URLs and streams

mpv accepts HTTP and HTTPS URLs directly:
For YouTube and other sites, mpv integrates with yt-dlp (or youtube-dl) automatically when you pass an http(s):// URL that points to a supported site:
Force yt-dlp processing for any URL using the ytdl:// prefix:

Special protocols

Play a DVD disc or ISO image. Without a title number, mpv auto-selects the longest title. DVD menus are not supported.
dvdnav:// is an alias for dvd://.
Play a Blu-ray disc or ISO image. Requires libbluray. Since libbluray 1.0.1, ISO files are supported via --bluray-device.
bluray:// is an alias for bd://.
Play an audio CD. Navigate tracks using chapter seek keys (Page Up / Page Down).
Pass a string directly to FFmpeg’s libavformat:
Use libavdevice demuxers. type is the demuxer name and options is the pseudo-filename:
avdevice:// is an alias.
Read from an arbitrary file descriptor. Similar to piping to stdin, but uses the specified descriptor number:
Use fdclose://3 to automatically close the descriptor after use.
Play files from a Samba/SMB network share. Requires FFmpeg built with SMB support:
Play a series of images as a video:

Essential playback options

Seeking

Speed and volume

Looping

--loop (alias for --loop-file) counts the number of additional seeks to the beginning, not the total number of playthroughs. --loop=1 plays the file twice. --loop-playlist counts full playthroughs, so --loop-playlist=2 plays the list twice.

Screenshots

During playback, press s to take a screenshot including subtitles, or S to take one without subtitles. Screenshots are saved as mpv-shotNNNN.<ext> in the working directory (or the desktop in pseudo-GUI mode).

Per-file options

When playing multiple files you can apply options to a subset using --{ and --} markers: