From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

MPlayer is a powerful command-line media player.

MPlayer is not very actively maintained anymore, but still alive. However, its fork MPV is active and it comes with some extra features too.


USE flags

USE flags for media-video/mplayer Media Player for Linux

X Add support for X11
a52 Enable support for decoding ATSC A/52 streams used in DVD
aalib Add support for media-libs/aalib (ASCII-Graphics Library)
alsa Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
aqua Include support for the Mac OS X Aqua (Carbon/Cocoa) GUI
bidi Enable bidirectional language support
bl Blinkenlights video output
bluray Enable playback of Blu-ray filesystems
bs2b Enable Bauer stereophonic-to-binaural headphone filter
cddb Access cddb servers to retrieve and submit information about compact disks
cdio Use libcdio for CD support (instead of cdparanoia)
cdparanoia Enable cdparanoia (audio CD ripper) support
cpudetection Enables runtime CPU detection (useful for binpkgs, compatibility on other CPUs)
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
dga Add DGA (Direct Graphic Access) support for X
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
dts Enable DTS Coherent Acoustics decoder support
dv Enable support for a codec used by many camcorders
dvb Add support for DVB (Digital Video Broadcasting)
dvd Add support for DVDs
dvdnav Use forked libdvdnav, navigate menus in GUIs
enca Enables support for charset discovery and conversion
encode Add support for encoding of audio or video files
faac Use external faac library for AAC encoding
faad Use external faad library for AAC decoding
fbcon Add framebuffer support for the console, via the kernel
ftp Add FTP (File Transfer Protocol) support
ggi Add support for media-libs/libggi (non-X video api/drivers)
gsm Add support for the gsm lossy speech compression codec
iconv Enable support for the iconv character set conversion library
ipv6 Add support for IP version 6
jack Add support for the JACK Audio Connection Kit
joystick Add support for joysticks in all packages
jpeg Add JPEG image support
ladspa Enable the ability to support ladspa plugins
libass SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support
libcaca Add support for colored ASCII-art graphics
libmpeg2 Build support for mpeg2 over media-libs/libmpeg2 rather than using ffmpeg.
lirc Add support for lirc (Linux's Infra-Red Remote Control)
live Enables streaming media support
lzo Enable support for lzo compression
mad Add support for mad (high-quality mp3 decoder library and cli frontend)
md5sum Enables md5sum video output
mng MNG input support
mp3 Add support for reading mp3 files
nas Add support for network audio sound
network Enables network streaming support
openal Add support for the Open Audio Library
opengl Add support for OpenGL (3D graphics)
osdmenu Enables support for on-screen display (OSD) menus
oss Add support for OSS (Open Sound System)
png Add support for libpng (PNG images)
pnm Add PNM video output option, to create PPM/PGM/PGMYUV images
pulseaudio Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
pvr Enable Video4Linux2 MPEG PVR
radio Enable V4L2 radio interface and support
rar Enable Unique RAR File Library
rtc Enables usage of the linux real time clock. The alternative is software emulation of rtc
rtmp Enables RTMPDump Streaming Media support
samba Add support for SAMBA (Windows File and Printer sharing)
sdl Add support for Simple Direct Layer (media library)
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
shm Enable support for shm
speex Add support for the speex audio codec (used for speech)
tga Enables Targa video output
theora Add support for the Theora Video Compression Codec
toolame Enable toolame MPEG-2 encoding
tremor Enable internal support for Vorbis
truetype Add support for FreeType and/or FreeType2 fonts
twolame Enable twolame MPEG-2 encoding
unicode Add support for Unicode
v4l Enable support for video4linux (using linux-headers or userspace libv4l libraries)
vcd Enables VCD support
vdpau Enable the Video Decode and Presentation API for Unix acceleration interface
vidix Support for vidix video output
vorbis Add support for the OggVorbis audio codec
x264 Enable h264 encoding using x264
xinerama Add support for querying multi-monitor screen geometry through the Xinerama API
xscreensaver Add support for XScreenSaver extension
xv Add in optional support for the Xvideo extension (an X API for video playback)
xvid Add support for's open-source mpeg-4 codec
yuv4mpeg Enables yuv4mpeg video output
zoran Enables ZR360[56]7/ZR36060 video output


Install media-video/mplayer:

root #emerge --ask media-video/mplayer


GUI tools

There are a number of different GUI's for MPlayer with different levels of functionality. Some notable ones include:


Streaming videos from websites

MPlayer has the ability to stream videos from websites. As a prerequisite, media-video/ffmpeg must have the openssl and gnutls USE flags enabled. To do this, simply enter the command:

user $mplayer url

Where url is the URL of the video.


Disable screensaver while playing a video

Using qdbus (Qt/KDE):

FILE ~/.mplayer/config
heartbeat-cmd="qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity"

For systems using xscreensaver alone:

FILE ~/.mplayer/config
heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"

See this FAQ entry for more informations.


My video won't play!

MPlayer uses USE flags to enable and disable support for various codecs. If a particular type of file will not play in MPlayer, first check which USE flags MPlayer was emerged with. Update the USE flags to support for the format you are trying to play and recompile.