Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: HOWTO: MPD & Clients.

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Rosario, Argentina
    Beans
    152
    Distro
    Ubuntu Gnome 15.04 Vivid Vervet

    HOWTO: MPD & Clients.

    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
    Last edited by JMO707; May 7th, 2007 at 06:26 PM. Reason: Correcting some mistakes.

  2. #2
    Join Date
    Nov 2004
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: MPD & Clients.

    Great job. I used to write these for every release and had planned on doing another one. Thanks for picking up the slack. GMPC + MPD is the best music playing solution for the Linux platform.

  3. #3
    Join Date
    Jan 2005
    Beans
    47

    Re: HOWTO: MPD & Clients.

    If you want to install the plugins in the right place, run ./autogen --prefix=/usr/local/ or where ever they are installed.

    I will check if it's a bug in the autogen.sh that they get installed in the wrong location.

    Q

  4. #4
    Join Date
    May 2006
    Beans
    594

    Re: HOWTO: MPD & Clients.

    stupid question here but where does the mpd folder get downloaded to when using svn?

  5. #5
    Join Date
    May 2006
    Location
    Rosario, Argentina
    Beans
    152
    Distro
    Ubuntu Gnome 15.04 Vivid Vervet

    Re: HOWTO: MPD & Clients.

    It gets downloaded to the place where you executed the command =p

  6. #6
    Join Date
    Dec 2005
    Location
    Brisbane, Australia
    Beans
    321
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HOWTO: MPD & Clients.

    Nice guide, satisfied Sonata user here. Just curious, but what are the major feature differences of MPD currently in universe and the SVN version?

    By the way, Sonata's download page does give instructions for installing via apt for people who'd like to stick with stable releases.

  7. #7
    Join Date
    Jul 2005
    Location
    Sweden
    Beans
    70

    Re: HOWTO: MPD & Clients.

    amgeex:I installed mpd from the repos. This is what i did to make it work:
    1. Tell mpd in which directory the music is located, by editing /etc/mpd.conf (see http://mpd.wikia.com/wiki/Configuration)
    2. Build the database and start the mpd daemon, as described above.

    mpd/mpc really is a great music player solution by the way. I just started using it, and it has already taken over the main music playing responsibility from amaroK on my computer!

  8. #8
    Join Date
    Apr 2005
    Location
    Guatemala
    Beans
    92
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: MPD & Clients.

    Quote Originally Posted by kalle314 View Post
    amgeex:I installed mpd from the repos. This is what i did to make it work:
    1. Tell mpd in which directory the music is located, by editing /etc/mpd.conf (see http://mpd.wikia.com/wiki/Configuration)
    2. Build the database and start the mpd daemon, as described above.

    mpd/mpc really is a great music player solution by the way. I just started using it, and it has already taken over the main music playing responsibility from amaroK on my computer!
    Thanks, took a while to get it going, but after playing a bit with the configuration options I put together a nice and simple ~.mpdconf file.

  9. #9
    Join Date
    Nov 2005
    Location
    Where do I live
    Beans
    327

    Re: HOWTO: MPD & Clients.

    Thanks for the howto. I had been planning to make a home music server, this will help a lot.

  10. #10
    Join Date
    Feb 2006
    Beans
    143

    Re: HOWTO: MPD & Clients.

    Updated: packaged the plugins. The wikipedia plugin now works and the cover art fetcher is much improved.

    I created some good packages for the awesome upcoming gmpc 0.14:

    gmpc_0.14-RC1.tar.gz. Contains the player and plugins. You only need the -dev package if you want to compile the plugins on your own.

    JMO707: Thanks for the howto. I ran into some permission errors because of the symlinking tactic, and made a config file that got around it. I attached it if anyone ran into the same problem.
    Attached Files Attached Files
    Last edited by deadlydeathcone; May 15th, 2007 at 03:05 AM. Reason: edit: updated packages

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •