You are not logged in.

#1 2011-08-08 18:40:30

Mate12345
Member
Registered: 2011-08-08
Posts: 4

MPD is silent

Hy!
I installed my new Arch system, and I wanted to create a music stream server, so I installed the mpd via pacman.
I edited the config-file, and it seems to be good.

I can join to the computer of mpd from my laptop via gmpc, and it lists my music directory, but it doesn't play the music.

First, I can't control the volume, but after, I give the "mixer-type softwere" to the config-file. (I get an error message.)

Now, I "can" control the volume, (I can slide the slidebar of volume), but it has no effect. My computer is silent.

My laptop can play music, so the mpd must be wrong, but I can't fix it.
I searched on the web, and the only solution was the adding of line "mixer-type softwere". In my case, it's useless.

Have you any idea?

Thank you for your help, and excue me for my poor english.
Have a nice day.

Last edited by Mate12345 (2011-08-09 17:10:45)

Offline

#2 2011-08-09 04:00:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,803

Re: MPD is silent

Two questions:  Are you using Pulseaudio ?
Are you running mpd as a user, or as a daemon?

Okay, a third question -- Anything interesting in the mpd logs  ?

I suspect the problem is that mpd cannot open the audio device because something else has claimed the audio device for its use.  This could be KDE, or Pulseaudio, whatever.  If the culprit is Pulseaudio, make sure your mpd is set up to use Pulseaudio.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-08-09 07:28:49

Mate12345
Member
Registered: 2011-08-08
Posts: 4

Re: MPD is silent

Hello!
"Are you using Pulseaudio ?"
I have Pulseaudio, but don't use it. What should I do width them?

"Are you running mpd as a user, or as a daemon?"
I'm running mpd as a daemon.

"Anything interesting in the mpd logs?"
The last lines are:

Aug 09 08:57 : config: option 'mixer_device' on line 184 was not recognized      //This is: mixer_device    "software"
Aug 09 08:57 : config: option 'mixer_control' on line 185 was not recognized      //This is: mixer_control    "PCM"
Aug 09 08:57 : config: option 'mixer_index' on line 186 was not recognized        //This is: mixer_index    "0"
Aug 09 08:57 : config: option 'encoding' on line 219 was not recognized            //This is:  encoding        "mp3" But I have tried with ogg, too.
Aug 09 08:57 : listen: bind to '0.0.0.0:52470' failed: Address already in use (continuing anyway, because binding to '[::]:52470' succeeded)
...
Aug 09 09:00 : output: Failed to open "My Shout Stream" [shout]: problem opening connection to shout server myhost:52471: Couldn't connect
Aug 09 09:00 : output: Failed to open "My Pulse Output" [pulse]: failed to connect: Connection refused

I haven't got any idea why get the "failed to connec".
My computer's name is myhost.
________________________________________________________________________________________________________________________
And this is my /etc/mpd.conf. (This is my only conf, so this is used by the mpd. It's sure)

music_directory        "/media/drive/Zene"
playlist_directory        "~/playlists"
db_file            "~/tag_cache"
log_file            "~/mpd.log"
pid_file            "~/pid"
state_file            "~/state"
user                "mpd"
bind_to_address        "0.0.0.0"
mixer_type                      "software"
port                "6600"
input {
        plugin "curl"
}
audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,0"    # optional
    format        "44100:16:2"    # optional
    mixer_device    "software"    # optional
    mixer_control    "PCM"        # optional
    mixer_index    "0"        # optional
}
audio_output {
    type        "shout"
    encoding    "ogg"            # optional
    name        "My Shout Stream"
    host        "myhost"
    port        "52471"
    mount        "/mpd.ogg"
    bitrate        "128"
    format        "44100:16:1"
    password     ""
}
audio_output {
    type        "httpd"
    name        "mate's radio"
        encoding        "mp3"
    encoder        "vorbis"        # optional, vorbis or lame
    port        "52470"
    bitrate        "128"            # do not define if quality is defined
    format        "44100:16:1"
}
audio_output {
    type        "pulse"
    name        "My Pulse Output"
    server        "myhost"        # optional
}
        #type    "pulse"
        #name    "My MPD PulseAudio Output"
        #server  "localhost"   # optional
        #sink    "alsa_output" # optional
filesystem_charset        "UTF-8"
id3v1_encoding            "UTF-8"

Thank you for helping.

Last edited by Mate12345 (2011-08-09 09:49:00)

Offline

#4 2011-08-09 08:58:58

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: MPD is silent

Mate12345:

- Fix your topic title

- Place both the log output and the config file between code tags for readability

- Try MPD first with a clean config, it can usually detect outputs pretty well by itself


ᶘ ᵒᴥᵒᶅ

Offline

#5 2011-08-09 08:59:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: MPD is silent

Please edit you post and use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

(if you hit 'quote' on my post you will see how I've done it)
It makes the code more readable and more convenient to scroll through.

Offline

#6 2011-08-09 09:54:42

Mate12345
Member
Registered: 2011-08-08
Posts: 4

Re: MPD is silent

Litemotic and Karol:
I've fixed my log entry and my config. But what would be the best topic title?

Now, I can't try the MPD with a clean config, but after 3 o'clock, I try.

Offline

#7 2011-08-09 10:05:33

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: MPD is silent

Mate12345 wrote:

I've fixed my log entry and my config. But what would be the best topic title?

Changing MDP to MPD would suffice for now. wink

(for other people searching the forums for threads concerning MPD)


ᶘ ᵒᴥᵒᶅ

Offline

#8 2011-08-11 18:01:29

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: MPD is silent

audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,0"    # optional
    format        "44100:16:2"    # optional
    mixer_device    "software"    # optional
    mixer_control    "PCM"        # optional
    mixer_index    "0"        # optional
}
audio_output {
    type        "shout"
    encoding    "ogg"            # optional
    name        "My Shout Stream"
    host        "myhost"
    port        "52471"
    mount        "/mpd.ogg"
    bitrate        "128"
    format        "44100:16:1"
    password     ""
}
audio_output {
    type        "httpd"
    name        "mate's radio"
        encoding        "mp3"
    encoder        "vorbis"        # optional, vorbis or lame
    port        "52470"
    bitrate        "128"            # do not define if quality is defined
    format        "44100:16:1"
}
audio_output {
    type        "pulse"
    name        "My Pulse Output"
    server        "myhost"        # optional
}

This means that you have ALSA, shout, httpd, and pulseaudio configured.  Try copying the default config from /usr/share/doc/mpd/mpdconf.example to /etc/mpd.conf and uncomment only what you need, like ALSA.  Make sure that the file paths exist and are the correct permissions too.

Offline

#9 2011-08-14 19:03:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: MPD is silent

I have the same problem as the OP does with MPD using pulseaudio -- no sound but clients appear to be playing (ncmpcpp and gmpc).  Running under xfce4 and other players such as vlc work just fine.

EDIT: if I go under the mixer in xfce4, I get "no application is currently playing or recording audio" under the "Applications" tab.  In contrast, when I'm using mplayer or vlc, both show up in that tab.  It behaves as though pulse is simply not configured to work with mpd.

Here is my config (edited out any commented line for brevity):

$ cat /etc/mpd.conf | sed '/#/d'
music_directory		"/media/data/DM/Genre"
playlist_directory	"/var/lib/mpd/playlists"
db_file			"/var/lib/mpd/mpd.db"
log_file		"/var/log/mpd/mpd.log"
pid_file		"/var/run/mpd/mpd.pid"
state_file		"/var/lib/mpd/mpdstate"
user "mpd"

log_level     "verbose"

gapless_mp3_playback			"yes"

zeroconf_enabled		"yes"
zeroconf_name			"Music Player"

input {
        plugin "curl"
}

audio_output {
	type		"pulse"
name		"My Pulse Output"
}

mixer_type			"software"
audio_buffer_size "35000"
buffer_before_play "5%"

Pulseaudio is running for mpd:

$ ps aux | grep mpd
mpd       6503  0.4  0.0 222952  4840 ?        S<sl 15:26   0:00 /usr/bin/pulseaudio --start --log-target=syslog
mpd       6507  0.0  0.0 102992  3228 ?        S    15:26   0:00 /usr/lib/pulse/gconf-helper

I switched the loglevel to verbose (seen above), deleted the existing log, started mpd so a fresh log would get written and tried to play a tune.  No audio output but it appeared to be playing in the client.  Here is the log.

# cat /var/log/mpd/mpd.log 
Aug 14 15:22 : avahi: Initializing interface
Aug 14 15:22 : avahi: Client changed to state 101
Aug 14 15:22 : avahi: Client is CONNECTING
Aug 14 15:22 : state_file: Loading state file /var/lib/mpd/mpdstate
Aug 14 15:22 : database: get song: Not_So_Hard_Stuff/Disturbed-The Sickness-2000-flac/01_Voices.flac
Aug 14 15:22 : client: [0] opened from [::1]:57866
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "plchanges "0""
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "play"
Aug 14 15:22 : playlist: play 0:"Not_So_Hard_Stuff/Disturbed-The Sickness-2000-flac/01_Voices.flac"
Aug 14 15:22 : decoder_thread: clearing mixramp tags
Aug 14 15:22 : decoder_control: mixramp_start = NULL
Aug 14 15:22 : decoder_control: mixramp_prev_end = NULL
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "currentsong"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : decoder: audio_format=44100:16:2, seekable=true
Aug 14 15:22 : output: opened plugin=pulse name="My Pulse Output" audio_format=44100:16:2
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:22 : client: [0] process command "status"
Aug 14 15:22 : client: [0] command returned 0
Aug 14 15:22 : client: [0] process command "idle"
Aug 14 15:22 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "clear"
Aug 14 15:23 : playlist: stop
Aug 14 15:23 : output: closed plugin=pulse name="My Pulse Output"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "plchanges "2""
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] process command "status"
Aug 14 15:23 : client: [0] command returned 0
Aug 14 15:23 : client: [0] process command "idle"
Aug 14 15:23 : client: [0] command returned 1
Aug 14 15:23 : client: [0] closed
Aug 14 15:23 : state_file: Saving state file /var/lib/mpd/mpdstate
Aug 14 15:23 : avahi: Shutting down interface
Aug 14 15:23 : listen: listen_global_finish called
Aug 14 15:23 : db_finish took 0.010000 seconds

Last edited by graysky (2011-08-14 20:57:59)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2011-08-15 08:26:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: MPD is silent

Same results achieved with mpd-git from the AUR... hmm


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2011-08-15 20:26:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: MPD is silent

FINALLY - what a pain this was.  After installing Arch fresh to a spare partition, installing xfce4, pulseaudio, and mpd, to my surprise, everything worked.  What's the difference between my main desktop partition and the test build?  The main desktop also has gnome on it for the wife.  When I systematically removed the gnome bloat, one package at a time, I found that doing this worked allowed pulseaudio to work with mpd ... for reasons I can't understand:

# pacman -S paprefs
$ paprefs 

Network Server Tab>Check "enable network access to local sound devices" and Check "Don't require authentication"
# pacman -Rs gnome-settings-daemon gnome-control-center gnome-bluetooth gnome-shell gnome-shell-extensions-common gnome-shell-extension-alternative-status-menu

<<Reboot>>

So it's working now!  So I replace the packages with mpd playing and still everything works:

pacman -S gnome-settings-daemon gnome-control-center gnome-bluetooth gnome-shell gnome-shell-extensions-common gnome-shell-extension-alternative-status-menu

I logout and  re-login.  Mpd STILL works. I  reboot.  Mpd STILL works.  WTF is my principal question!

UPDATE:  On my pure xfce4 box, I don't need any of the aforementioned packages and everything is working fine.

Last edited by graysky (2011-09-11 14:36:31)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB