This is a traduction I made of this guide because of the request of elektronaut. Hope you like it, and forgive my language mistakes
Music Player Daemon (MPD) is a music player which allows for remote access from another computer. An example would be a headless computer running MPD and using one of the available front ends to control it remotely. It also makes for a good desktop media player, particularly if you either don't use or frequently restart X.
It utilizes a database (like other music players) to store the basic music file information for each file. Instead of playing files from the filesystem, it plays music from the MPD library. Once the daemon is started, the database is kept entirely in-memory, and there is no disk access necessary to lookup or search for a song. The text file database is only used to maintain the contents of the database when MPD is not running. [Wikipedia]
Have in mind too that it consumes very little resources. In this moment it is taking away only 1,9 Mbytes of my memory. A front-end doesnt adds enough to reach the 10 Mbytes, and how it isnt required to play music, a playlist cat be left playing, and closing it we will be back to the 1,9 Mbytes.
I think that the bigest obstacule that I might have for this guide is the dependencies issue. As we are going to install 4 programs and various plugins, this, plus that I want to try being as neutral as I can with the distros in wich this can be used, can make things complicated. I will extract them directly from the official pages. Hope you can forgive this too.
Now we are going to install: MPD. libmpd, ncmpc, gmpc (with: coveramazon, lyrics, wikipedia, last.fm & qosd)
This is a screen to see how gmpc looks:
···········
MPD (Music Player Daemon)
Lets see firsth the dependencies acording to the oficial MPD site:
Requirements
1) libao libraries and headers are required!
2) zlib libraries and headers are required!
Libs included with source (i.e. nothing needed for these): libid3tag and libmad
Optional
1) for ogg vorbis support: libogg and libvorbis
2) for flac support: flac 1.1
3) for wave/aiff/au support: audiofile
4) for MP4/AAC support: FAAD2
5) for Mod support: libmikmod
Ive tryed every link, and exempting the one of libvorbis (that can be found on the libogg link) the rest works fine. Of course, if you got the possibility of using a package manager for this, it will be simpler. That is given like something understood from now on.
Addendum: It has passed to me that not everyone may have svn installed. This is the link to the official page: http://subversion.tigris.org/
Once than the dependencies are installed, lets download MPD from the subversion repository:
svn co https://svn.musicpd.org/mpd/trunk mpd
That from a terminal, clear in is. Next we enter to the just downloaded mpd folder and execute in the terminal:
,/autogen.sh
make
sudo make install
Three things...
Firsth, in the output of ,/autogen.sh can be seen with wich libraries are MPD compiled, and therefore which things support. Its a good idea look that everything is fine before we continue.
Second, that if making sudo make install can be avoided, so system wide, better. If you can build packages with some tool, I recommend you to do that, if not you can always use a prefix, lets say sudo make install –prefix=/usr/local/ for example. That will let you put some order in the installation. This is worth for everything we install from now on.
Third, for comfort Ill use my paths on this tutorial. Change them according to yours.
Ok. Now we got MPD, but this doesnt end here.
The next step is configure it. Start editing with root permmisions the mpd.conf file that is on /etc. Example: sudo nano /etc/mpd.conf
You will find a lot of options, but the ones who are from our interest are:
pid_file "/var/run/mpd/pid"
Comment this line, putting a # in front of it. We do that because the pid file isnt created whit the installation and later MPD wouldnt start if it look for it.
#mixer_type "alsa"
#mixer_device "default"
#mixer_control "PCM"
If you use ALSA, I reccomend to uncomment the lines from above and replace PCM by Master. This will avoid that the speakers turn noisy when the volume are raised too much.
#filesystem_charset "ISO-8859-1"
We uncomment the line and change ISO-8859-1 by UTF-8, for all those who had especial characters in the tag or name of the songs. With this MPD will be able to add them to the playlist..
That is the most essential I believe. Hope I havent forgot anything. In any case, you are free to navigate and try the file later =]
Save the changes in mpd.conf. Then:
cd /var/lib/mpd/music/
sudo ln -s “path to our music”
Repeat it with every place where you got music. New soft links are created that will allow MPD take the music files from multiple directories, thing that cannot be done editig the configuration file.
Its all ready. The last thing is creating a database:
sudo mpd –create-db
Then, to start MPD:
sudo mpd
And repeat the command for the database creation everytime we want to update it.
···········
libmpd (MPD library)
Qball website:
Requirements
- C99 Compatible C compiler (for example: gcc >= 3.0)
- autotools (automake, autoconf)
- make
- libtool
- Subversion (to fetch a copy)
Then we downloadit with::
svn co https://svn.musicpd.org/libmpd/trunk libmpd
We go to the folder and do:
,/autogen.sh
make
sudo make install
···········
NCMPC (Ncurses Music Player Client)
This is my favourite client =)
MPD official site:
Requirements
- ncurses
- glib-2
We download it with:
svn co https://svn.musicpd.org/ncmpc/branches/tradiaz
This is a different branch to the one indicated in the MPD site. This is because apparently the original developer as left the project, and now another person is continuing it.
Inside the downloaded folder we continue with:
,/autogen.sh –enable-lyrics-screen --enable-clock-screen
make
sudo make install
Later you can access to it from any teminal tipping ncmpc.
As a tip, you can add to your bashrc (~/.bashrc) an alias like alias ncpmc=”ncmpc –colors”, something that will put colors on it every time we start it. Here, a screen:
···········
GMPC (Gnome Music Player Client)
This is the front-end for X that we are going to use. Towards the end of the guide Ill talk about an option, bur in my opinion this one is the more complete.
Qball website:
Requirements
- C99 Compatible C compiler (for example: gcc >= 3.0)
- autotools (automake, autoconf)
- Gtk+-2.8 (and dependencies)
- libmpd from svn (see above)
- Gob2
- libsm
- libglade
- Libcurl (version 3)
- intltool
- make
- Subversion (te fetch a copy)
In a terminal:
svn co https://svn.musicpd.org/gmpc/trunk/ gmpc/
Inside the folder:
,/autogen.sh
make
sudo make install
GMPC plugins
All the avilable plugins can be seen in https://svn.musicpd.org/gmpc/plugins/
They can be downloaded in rhe next way:
svn co https://svn.musicpd.org/gmpc/plugins/"name"/trunk
Installation has get a little troublesome because packiging them made the files install in wrong places. So this is what Ive done:
,/autogen.sh
make
sudo make install
Then, I went to /usr/local/share/gmpc/share/gmpc/plugins/ and move the file *.so that was there to /usr/local/share/gmpc/plugins/. In anycase, this was for a global plugin installation. For make it local in should be moved to ~/.gmpc/plugins/
For the rest of it, I got:
coveramazon ---> take the album covers from Amazon to show them.
last.fm ---> the same but whit musicians photos, and I think it sends info of the hearing habits to last.fm too.
lyrics ---> to recive the lyrics from LeosLyrics and LyricsTracker.
wikipedia ---> enable a tab where one can see the musician or band article of Wikipedia.
qosd ---> it shows the playing song on a display with transparencies.
···········
Finally I comment you of a very pleasing alternative to gmpc. Its Sonata, a client very well worked out and with the particularity of using only contextual menus.
The official page is http://sonata.berlios.de/ and the way to get the latest version and install it is:
svn co http://svn.berlios.de/svnroot/repos/sonata/trunk sonata
Then we go to the folder and do:
sudo python setup.py install
As Sonata uses distutils from Python, uninstalling it isnt a easy task, because apparently (and incredibly) distutils doesnt provides the mechanisms to uninstall it. The localization of the files are, to remove it manually:
/usr/bin/sonata
/usr/lib/python2.4/site-packages/mmkeys.so
/usr/lib/python2.4/site-packages/mpdclient3.py
/usr/lib/python2.4/site-packages/mpdclient3.pyc
/usr/lib/python2.4/site-packages/sonata.py
/usr/lib/python2.4/site-packages/sonata.pyc
/usr/share/applications/sonata.desktop
/usr/share/locale/de/LC_MESSAGES/sonata.mo
/usr/share/locale/fr/LC_MESSAGES/sonata.mo
/usr/share/locale/pl/LC_MESSAGES/sonata.mo
/usr/share/locale/ru/LC_MESSAGES/sonata.mo
/usr/share/pixmaps/sonata.png
/usr/share/pixmaps/sonatacd.png
/usr/share/pixmaps/sonatacd_large.png
/usr/share/sonata/CHANGELOG
/usr/share/sonata/README
/usr/share/sonata/TODO
/usr/share/sonata/TRANSLATORS
···········
Well, I hope that this was useful to somebody. If I did it is because I sincerely consider that MPD is an excellent way to play music, and I expect that other persons known of it and appreciate it as much as I do =)
My regards.
P.D: Im open to critics. More than once I must have made a mistake =p
Bookmarks