Workstation Live 9.6

Online journal by Srinwantu Dey

Linux Howtos 1 – Playing Audio & Video

Posted by Rangeen Basu Roy Chowdhury on May 18, 2009

I have heard a lot of people, who have just installed GNU/Linux on their systems and are new to Linux, say stuffs like, “This can do nothing, Linux is not so good”. What they actually mean is, “I don’t know how to configure it to do the stuffs I want” . Everybody faces this problem in the very beginning of their association with Linux. This series of post will somewhat try to make their start with Linux less bumpy. This post is Fedora specific but some of the steps can be applied to other distros as well. This series will contain three posts. This post will be about audio and video. The next will contain network and file sharing related setups and the last will be about fine tuning your system according to your necessity.

How to play audio and video on Linux

Since most of the audio and video normally used are proprietary, the codecs are not packaged with the Linux distributions. So to play audio and video formats like mp3, wma, avi, xvid, wmv, their codecs need to be installed. The ffmpeg codec pack is the largest and most versatile open source codec pack. A lot of players and tools used on Linux systems are based on this codec pack. These include popular ones like mplayer, gnome-mplayer etc. VLC media player also comes with its own set of codec packs. So installing mplayer-gui and VLC is necessary and sufficient to play almost any kind of audio and video on Linux. The following packages are sufficient for playing proprietary audio and video formats on your Linux box (distro independent):
mplayer-gui
vlc
ffmpeg
xine* (this means all packages whose name start with xine)

Additionally you can also install packages like

xmms
kmplayer (For KDE)
gnome-mplayer (For GNOME)

How to install these on Fedora

Now comes the installation part. To install any non propritory packages in Fedora first step is to set up the rpmfusion repository. Go to www.rpmfusion.org . Download the two repository packages namely rpmfusion-free and rpmfusion-nonfree for your respective Fedora version.Install these two packages by using the command in terminal. These commands must be issued as root. So first thing to be done is log in as root by issuing
[sherry@brc ~]$ su –
Password:
[root@brc ~]# rpm -ivh <path to the rpmfusion free repository rpm>
[root@brc ~]# rpm -ivh <path to the rpmfusion nonfree repository rpm>

Now you are ready to install any software that you want.

Easiest way to install these on Fedora is to use yum which is a package management tool. Issue the following commands as root:

[root@brc ~]# yum install mplayer-gui vlc ffmpeg xine*

Additionally

[root@brc ~]# yum install gnome-mplayer kmplayer xmms

This will get all your videos and songs playing. This procedure is Fedora speciefic. For other distros try doing a google search like “install codecs on <distro name> “.

P.S: VLC and mplayer might have problem playing some videos if you do not disable the SELinux or atleast make it permissive. For that go to System->dministration->SELinux Management. There make the default to disable or permissive.

Two excellent sites to get help on Fedora related stuffs:

www.fedorafaq.org
www.fedorasolved.org

Written By:
Rangeen Basu Roy Chowdhury
Fedora Ambassador
sherry151@fedoraproject.org

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: