How to Install Mplayer on Linux
Install MPlayer 1.4 on Linux through your distribution's package manager or by compiling from source—both methods take under 10 minutes for most systems. The open source video player runs lean on system resources while handling virtually every codec and container format you'll encounter.
Installing MPlayer on Ubuntu and Debian
The fastest way to get a console video player running is through apt. Open a terminal and run:
```
sudo apt update
sudo apt install mplayer
```
Debian-based systems pull the stable 1.4 release from their repositories. Verify the installation worked by typing `mplayer -version` to confirm the version number and available codecs. You're done—no configuration needed to start playing MP4, AVI, MKV, MOV, WMV, FLV, and MPEG files immediately.
For Fedora and RHEL-based distributions, use dnf instead:
```
sudo dnf install mplayer
```
Arch Linux users install it via pacman:
```
sudo pacman -S mplayer
```
Compiling from Source
If you need the bleeding-edge version or your distribution doesn't package it, compiling gives you full control over features. Download the source code, then install build dependencies:
```
sudo apt install build-essential libx11-dev libxv-dev libsdl1.2-dev
```
Extract the tarball, navigate to the directory, then configure and compile:
```
./configure --prefix=/usr/local
sudo make install
```
This method takes longer but lets you enable specific audio filters, video filters, and hardware acceleration features your system supports. The `--prefix` flag places it in `/usr/local` so updates to your package manager won't overwrite your custom build.
Getting Started With MPlayer
After you install MPlayer on Linux, launch it from the command line with a filename:
```
mplayer video.mkv
```
The console video player opens in a window and displays playback controls via keyboard shortcuts. Press `h` during playback to see the full command list. Space pauses, arrow keys seek forward and backward, and `q` exits.
MPlayer's strength lies in its command-line flexibility. Stream HTTP video, adjust subtitle sync in real-time, apply audio filters on the fly, or step through frames one at a time—features that take menus in other players become instant keyboard commands here.
What Video Formats Does MPlayer Support?
It handles MP4, AVI, MKV, MOV, WMV, FLV, and MPEG natively through its codec libraries. DVD playback works with the libdvdnav package installed. Streaming protocols like HTTP, RTMP, and UDP work without extra setup. Compare this to VLC, which offers a GUI by default—MPlayer trades visual menus for raw performance and minimal resource usage, making it the leaner choice for older hardware or headless servers.
Explore playing MKV files with full codec support and streaming video directly from URLs. For subtitle timing issues, adjusting subtitle synchronization on the fly takes seconds with keyboard commands.
Updating and Removing
To update how to install MPlayer on Linux when new versions release, run `sudo apt upgrade` on Debian systems. Uninstall completely with `sudo apt remove mplayer` if you switch to another lightweight media player. Configuration files remain in `~/.mplayer/` for reference.
The lightweight media player remains one of Linux's most powerful tools precisely because it avoids unnecessary overhead. Whether you're managing video on a server, testing codec support, or just prefer keyboard-driven control, this open source video player delivers.
Related Articles
- best lightweight video player for linux
- top free open source video players
- mplayer alternative lightweight video player
- how to play mkv files mplayer
- portable mplayer windows mac linux support
- mplayer codec support all formats
- how to use mplayer command line options
- mplayer cpu usage low performance resource