How to Install Mplayer in Redhat/Centos

In this session, we are going to learn how to install MPlayer in Redhat/CentOS. MPlayer is also referred to as Movie Player developed by Mplayer Team in the year 2000 and released under GNU GPLv2 License. It supports movie file formats like AVI, WMV, WMA, MPEG…etc. MPlayer is written using c programming language and available in different languages. The more Information on mplayer you can get on the official web page of mplayer Here.

How to Install Mplayer in Redhat/Centos
Installation of  Mplayer in Redhat/Centos

Follow the below steps to install MPlayer in Redhat/Centos :

MPlayer doesn’t come under the default repository of Redhat and CentOS. so we have to install it through 3rd party repositories. EPEL (Extra Packages for Enterprise Linux) is a repository invented by Fedora that can be used to install additional packages which do not come under default RedHat and centos repositories.

So refer to the below command install epel-release repository.

[root@localhost ~]# yum -y install epel-release  # Install epel-release repository
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.vbctv.in
 * extras: mirror.vbctv.in
 * updates: mirror.vbctv.in
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                             Arch                          Version                     Repository                     Size
===================================================================================================================================
Installing:
 epel-release                        noarch                        6-8                         extras                         14 k

Transaction Summary
===================================================================================================================================
Install       1 Package(s)

Total download size: 14 k
Installed size: 22 k
Downloading Packages:
epel-release-6-8.noarch.rpm                                                                                 |  14 kB     00:00     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
 Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : epel-release-6-8.noarch                                                                                         1/1 
  Verifying  : epel-release-6-8.noarch                                                                                         1/1 

Installed:
  epel-release.noarch 0:6-8                                                                                                        

Complete!

After installing the epel-release package we need to install another addon repository i.e. nux-dextop. nux-desktop is a package repository that is particularly made for multimedia packages like vlc media player, MPlayer, shutter snapshot tool…etc. So to install the same follow the below command.

[root@localhost ~]# rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
Retrieving http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
warning: /var/tmp/rpm-tmp.kNbvqx: Header V4 RSA/SHA1 Signature, key ID 85c6cd8a: NOKEY
Preparing...                ########################################### [100%]
   1:nux-dextop-release     ########################################### [100%]

After installing all required prerequisite packages and repositories for mplayer we can check the information of mplayer using the yum command. refer to the sample output below.

[root@localhost ~]# yum info mplayer   # Check Information of mplayer
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.vbctv.in
 * epel: mirror01.idc.hinet.net
 * extras: mirror.vbctv.in
 * nux-dextop: li.nux.ro
 * updates: mirror.vbctv.in
Available Packages
Name        : mplayer
Arch        : x86_64
Version     : 1.1
Release     : 33.20150505svn.el6.nux
Size        : 1.1 M
Repo        : nux-dextop
Summary     : Movie player playing most video formats and DVDs
URL         : http://www.mplayerhq.hu/
License     : GPLv3+
Description : MPlayer is a movie player that plays most MPEG, VOB, AVI, OGG/OGM,
            : VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM,
            : RoQ, and PVA files. You can also use it to watch VCDs, SVCDs, DVDs,
            : 3ivx, RealMedia, and DivX movies.
            : It supports a wide range of output drivers including X11, XVideo, DGA,
            : OpenGL, SVGAlib, fbdev, AAlib, DirectFB etc. There are also nice
            : antialiased shaded subtitles and OSD.
            : The following on-default rpmbuild options are available:
            : --with samba:   Enable Samba (smb://) support
            : --with xmms:    Enable XMMS input plugin support
            : --without amr:  Disable AMR support
            : --with faac:    Enable FAAC support
            : --with libmad:  Enable libmad support
            : --with openal:  Enable OpenAL support
            : --with jack:    Enable JACK support
            : --with arts:    Enable aRts support
            : --with esound:  Enable EsounD support
            : --with dga:     Enable DGA support
            : --with directfb:Enable DirectFB support
            : --with svgalib: Enable SVGAlib support
            : --with nemesi:  Enable libnemesi RTSP support

Install the mplayer using the yum command.

[root@localhost ~]# yum -y install mplayer   # Install the mplayer package

You can confirm the installed MPlayer packages using rpm -qa command.

[root@localhost ~]# rpm -qa | grep mplayer   # Confirm the installed mplayer Package
mplayer-1.1-33.20150505svn.el6.nux.x86_64
mplayer-common-1.1-33.20150505svn.el6.nux.x86_64

After install MPlayer package you will found a hidden directory named “.mplayer” in-home directory in which we have a configuration file called “config“.

We have to edit that file and enter lirc=no. Refer the sample output below.

[root@localhost ~]# ls -a   # Check Hidden files & Directories
.                .bash_history  .bashrc  .cshrc   Documents  .gconf   .gnote           .gtk-bookmarks  install.log         .mplayer   Pictures  .pulse         .tcshrc    .xauthN1LD98
..               .bash_logout   .cache   .dbus    Downloads  .gconfd  .gnupg           .gvfs           install.log.syslog  Music      .pki      .pulse-cookie  Templates
anaconda-ks.cfg  .bash_profile  .config  Desktop  .esd_auth  .gnome2  .gstreamer-0.10  .ICEauthority   .local              .nautilus  Public    .ssh           Videos
[root@localhost ~]# cd .mplayer/
[root@localhost .mplayer]# ls
config
[root@localhost .mplayer]# nano config   # Edit the "config" File
lirc=no

Now we are done with the Installation and Configuration part. It’s time to open the mplayer with a media file (Video File). Here I have a video file named “movie.mp4“. So to open the video file refer the below command.

Syntax: MPlayer [path to video file]

[root@localhost ~]# mplayer /home/itsmarttricks/Desktop/movie.mp4   # Open mplayer

Also Read – How to Install VLC Media Player on Ubuntu

That’s all, In this article, we have explained How to Install Mplayer in Redhat/Centos. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Share this:
WhatsApp Channel Join Now
Telegram Channel Join Now
Instagram Channel Join Now

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.