[SOLVED] Help with MPD

[SOLVED] Help with MPD

Postby TabletHater » Feb 28th, '12, 02:52

Hi...

Have just migrated from buntu-land. I use MPD locally and have created a ~/.mpd/mpd.conf file based on a great tutorial of a Debian distro user (http://crunchbanglinux.org/forums/topic ... mpd-guide/). When I make a fresh distro install I copy the .mpd.conf file and .mpd folder to the my new home.

1) But this time (in Mageia) I can't get the audio output. The client (Cantata) plays fine, but without any sound. Starting MPD in terminal produces this:

Code: Select all
listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
output: Successfully detected a alsa audio device


2) Not sure if important, but another thing is that according to those instructions one should disable MPD to start as a system daemon and to start it from boot with:

Code: Select all
sudo service mpd stop
sudo update-rc.d mpd disable


The terminal in Mageia couldn't recognize the second command.

Attached is my mpd.conf file.
Attachments
mpd.conf
(14.23 KiB) Downloaded 317 times
Last edited by TabletHater on Feb 29th, '12, 02:03, edited 1 time in total.
TabletHater
 
Posts: 112
Joined: Feb 28th, '12, 02:30

Re: Help with MPD

Postby doktor5000 » Feb 28th, '12, 13:07

TabletHater wrote:
Code: Select all
sudo update-rc.d mpd disable

The terminal in Mageia couldn't recognize the second command.


Yes, as that is no standard linux command, but a debianism. If you want to disable it from starting at boot,
easiest way is to use drakxservices and untick "start at boot". But you could also use
Code: Select all
chkconfig --del mpd


And normally at installation time you should have seen the following:
This package of MPD comes with service capabilities and will automatically start
at boot.

You now have to edit your /etc/mpd.conf file, check the different
options to adapt them to your needs (pay attention to the password
section). You can leave log_file, db_file, and state_file options as
they are. But you MUST edit music_directory and playlist_directory to
tell MPD where to grab your music files, and don't forget to make them
available to the user "mpd". If you use passwords, please change
permissions of this file to 600 (passwords are in clear plain text).

If you DON'T want MPD to start at boot (to let users have different
configuration, for example), just disable the service via the Mageia Control
Center, or by running "chkconfig --del mpd" as root.


Note: if your msec level is 3 or above (this should be the case for any machine
connected to the internet), the service will fail to start. In order to
make it start at boot, you need to do this :

* get root privileges edit /etc/security/console.perms
near the end of the file you'll see a line looking like this :
<console> 0600 <sound> 0600 root.audio

just change the permissions to 0660 to obtain this line :
<console> 0660 <sound> 0660 root.audio

Save the file and exit your editor.

MPD has now the right to access sound devices, as all users from the audio
group.

----------------------------------------------------------------------


This information is inside /usr/share/doc/mpd/README.urpmi which is displayed at installation.

In general you should set the audio output to pulseaudio, like in the example configuration file:
/usr/share/doc/mpd/mpdconf.example
Last edited by doktor5000 on Feb 28th, '12, 13:35, edited 1 time in total.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Help with MPD

Postby TabletHater » Feb 28th, '12, 13:26

Thanks again Doktor. Sorry, forgot to tell; yes, I had already done that!

Just seen the rest of your reply. Yes I've seen that note. As for pulseaudio, I have a DAC (sound card) connected to my SPDIF output and I use Alsa. VLC, Bangarang etc work perfectly with Alsa. In fact I want to remove all pulse things afterwards.
TabletHater
 
Posts: 112
Joined: Feb 28th, '12, 02:30

Re: [SOLVED] Help with MPD

Postby TabletHater » Feb 29th, '12, 02:38

Solved. For other noobs (feel free to improve my instructions in this thread):

It seems much easier (at least in Mageia) to use MPD as a system server:

1. Create directory ~/.mpd/playlists
2. Create file ~/.mpd/mpd.db
3. Create file ~/.mpd/mpd.log
4. Install MPD.
5. Stop MPD through System Monitor
6. Edit /etc/mpd.conf to look like mine (attached to this post). If you don't have a second/external sound card, change "hw:0,1" to "hw:0,0" and if you use pulseaudio, comment out Alsa audio output lines and uncomment PulseAudio output part.
7. Start MPD by these commands:
Code: Select all
su
mpd


Install Cantata MPD client. It has just a couple flaws, otherwise the best music player without the bloat and the developer intends to iron them out (hopefully soon). The version in the repository is old by the way.

If you don't need album covers and like minimalism, the excellent BE:MPC is the best one. It should certainly be included in the repository as well (http://qt-apps.org/content/show.php/BE% ... ent=137091).
Attachments
mpd.conf
(8.6 KiB) Downloaded 483 times
TabletHater
 
Posts: 112
Joined: Feb 28th, '12, 02:30


Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest

cron