How to Install MPlayer and MEncoder on Fedora
MPlayer and MEncoder are no longer actively maintained, but they’re still available through RPM Fusion if you need them for legacy content or specific workflows. Most users should consider modern alternatives like mpv (MPlayer’s successor) or ffmpeg for transcoding, but this guide covers the traditional setup.
Enable RPM Fusion Repository
RPM Fusion hosts packages Fedora doesn’t include in its official repositories. Add both free and nonfree repos:
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Install MPlayer and MEncoder
Once RPM Fusion is enabled:
sudo dnf install mplayer mencoder
Verify the installation:
mplayer --version
mencoder -version
Codec Support
Modern Fedora includes most codecs through FFmpeg dependencies, so manual codec installation is rarely necessary. If you encounter unsupported formats, first try upgrading your codec libraries:
sudo dnf install ffmpeg
Playing RMVB and Legacy Formats
RMVB files may require additional libraries. Install compatible C++ runtime libraries:
sudo dnf install libstdc++ libstdc++-devel
Test playback with verbose output to diagnose issues:
mplayer -v file.rmvb
Common MPlayer Usage
Play a file with subtitles:
mplayer -sub subtitle.srt video.mkv
Seek to a specific time (in seconds):
mplayer -ss 120 video.mp4
Loop playback:
mplayer -loop 0 file.mp3
MEncoder for Transcoding
MEncoder is useful for batch conversions, though ffmpeg is generally preferred for new scripts. Convert AVI to MP4:
mencoder input.avi -o output.mp4 -ovc lavc -lavcopts vcodec=mpeg4 -oac lavc -lavcopts acodec=aac
Extract audio from video:
mencoder input.mkv -ovc copy -oac copy -of rawaudio -o audio.aac
Resize video during encoding:
mencoder input.avi -o output.avi -vf scale=1280:720 -ovc lavc -oac copy
Modern Alternatives
For new projects, consider these maintained tools:
- mpv: Modern MPlayer fork with better hardware acceleration and subtitle handling
- ffmpeg: Industry standard for encoding, decoding, and format conversion
- HandBrake: GUI-based video transcoder
Install mpv as an alternative:
sudo dnf install mpv
Troubleshooting
If MPlayer crashes or won’t play certain files:
- Check available codecs:
mplayer -ac helpandmplayer -vc help - Try forcing a specific codec:
mplayer -ac mad file.mp3 - Enable verbose logging:
mplayer -v file.mkv 2>&1 | tee debug.log - Consult
man mplayerandman mencoderfor full option documentation
It is no longer satisfactory to have no kmplayer at all…