Thursday, January 29, 2026

mpv - best light video media player for Linux

mpv file1.mp4 file2.mp4

mpv /path/to/folder/

mpv --playlist=my_list.m3u


Play/Pause: Space or p

Fullscreen: f (or Esc to exit)

Seek: Left / Right arrows (5 seconds) or Up / Down arrows (1 minute)

Volume: 9 (decrease) and 0 (increase)

Subtitles: j to cycle through subtitle tracks; v to toggle visibility

Audio: # to cycle through audio tracks

Quit: q (to close) or Q (to save the current position for the next time you open the file)


View Playlist F8 (opens an on-screen overlay)

Next File > or Enter

Previous File <

First/Last File Shift + Home / Shift + End

Loop Playlist Map L to cycle-values loop-playlist inf no in input.conf


3 videos

mpv --lavfi-complex="[vid1][vid2][vid3]hstack=inputs=3[vo];[aid1][aid2][aid3]amix=inputs=3[ao]" input1.mkv --external-files="input2.mkv;input3.mkv"


2 videos

mpv --lavfi-complex="[vid1][vid2]hstack[vo];[aid1][aid2]amix[ao]" input1.mkv --external-file=input2.mkv


2x2 grid (4 IP cams)

mpv --lavfi-complex="\

[vid1][vid2]hstack[top]; \

[vid3][vid4]hstack[bottom]; \

[top][bottom]vstack[vo]" \

"URL1" \

--external-file="URL2" \

--external-file="URL3" \

--external-file="URL4"


Several IP webcams in one window

mpv http://192.168.1.10:8080/video

i

fps: 25


mpv \

--no-correct-pts --container-fps-override=25 \

--lavfi-complex="[vid1][vid2]hstack[vo]" \

"http://192.168.1.10:8080/video" \

--external-file="http://192.168.1.10:8080/video"


https://mpv.io/

https://manpages.ubuntu.com/manpages/plucky/man1/mpv.1.html


MPV is a free, open-source, and lightweight media player known for its minimalist interface and high customizability. Unlike traditional players with extensive menus, MPV relies heavily on keyboard shortcuts and configuration files.

1. Installation and Setup

Installing MPV depends on your operating system:

    Windows:

        Download the latest build from the official MPV website.

        Extract the .7z or .zip folder to a permanent location (e.g., C:\Programs\mpv).

        Open the installer folder and run mpv-install.bat as an administrator to register it in Windows and set file associations.

    Linux: Install via your package manager (e.g., sudo apt install mpv on Debian/Ubuntu or sudo pacman -S mpv on Arch).

    macOS: Use Homebrew by running brew install mpv.


2. Basic Controls (Keyboard Shortcuts)

Since MPV lacks a complex GUI, use these default keys for playback:

    Play/Pause: Space or p

    Fullscreen: f (or Esc to exit)

    Seek: Left / Right arrows (5 seconds) or Up / Down arrows (1 minute)

    Volume: 9 (decrease) and 0 (increase)

    Subtitles: j to cycle through subtitle tracks; v to toggle visibility

    Audio: # to cycle through audio tracks

    Quit: q (to close) or Q (to save the current position for the next time you open the file)


3. Advanced Configuration

Customization is done through text files. Create these files in your configuration folder (typically %APPDATA%/mpv/ on Windows or ~/.config/mpv/ on Linux/macOS).


    mpv.conf: Used for player settings. Example:

    ini


    # High-quality settings

    profile=gpu-hq

    # Save video position on exit

    save-position-on-quit=yes

    # Load subtitles with the same name automatically

    sub-auto=fuzzy


input.conf: Used to customize keyboard shortcuts. You can map any key to a specific command, such as WHEEL_UP add volume 2.


4. Extending Functionality


    Scripts: You can add .lua or .js scripts to a scripts subfolder in your config directory to add features like an improved on-screen controller (OSC) or automatic playlist loading.

    Streaming: MPV can play YouTube and other web videos directly if you have yt-dlp installed. Simply drag a URL into the player or run mpv [URL] from the command line.




In Ubuntu, MPV treats multiple files opened together as a temporary playlist. Because MPV is minimalist, managing these lists usually requires a mix of keyboard shortcuts, terminal commands, or the drag-and-drop method.

1. Opening a Playlist


    Via File Manager (GUI):

        Highlight multiple files or an entire folder in your file manager (Nautilus/Files).

        Right-click and select Open With > mpv. This will automatically queue all selected items into a playlist.

    Via Terminal:

        Multiple files: Run mpv file1.mp4 file2.mp4.

        Entire folder: Run mpv /path/to/folder/ to play everything inside.

        Existing playlist file: Run mpv --playlist=my_list.m3u.


2. Adding Files to a Running Playlist

By default, opening a new file in a second MPV instance does not add it to the first. You have two main options:


    Drag and Drop: Simply drag additional files from your file manager directly into the active MPV window to append them to the current playlist.

    Clipboard Append: If you have a URL or file path copied, press Ctrl + v in the MPV window to append it to the current list.


3. Removing Files


    Current Item: To remove the file currently playing and move to the next, press Ctrl + Delete (this may require a custom entry in input.conf for older versions, such as DEL playlist-remove current).

    Clear Playlist: There is no default single key to "clear all," but you can restart the player or use the terminal with specific scripts for more complex management.


4. Playlist Navigation Shortcuts

Action

Key Shortcut

View Playlist F8 (opens an on-screen overlay)

Next File > or Enter

Previous File <

First/Last File Shift + Home / Shift + End

Loop Playlist Map L to cycle-values loop-playlist inf no in input.conf

5. Advanced: Saving a Playlist (Terminal)

To save a list of all .mp4 files in your current directory into a playlist file you can use later, run:

ls *.mp4 > my_playlist.m3u


No comments:

Post a Comment