Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2244
views
mpd httpd not responding to tcp port
I've got a home server with music files stored locally on said server. I've got MPD & ncmpcpp installed on this home server. I'm trying to prototype this so I can go the extra trivial step of forwarding ports so this can be accessed anywhere, but I'm having quite a bit of trouble even getting this t...
I've got a home server with music files stored locally on said server.
I've got MPD & ncmpcpp installed on this home server.
I'm trying to prototype this so I can go the extra trivial step of forwarding ports so this can be accessed anywhere, but I'm having quite a bit of trouble even getting this to work locally. I'm working on a remote machine, but all the work I've done this morning has been in a remote shell *inside* the home server...
I've killed and disabled the daemon for mpd, and started it like so:
mpd --stdout --no-daemon --verbose ~/.config/mpd/mpd.conf
and gotten this output:
config_file: loading file .config/mpd/mpd.conf
path: SetFSCharset: fs charset is:
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
vorbis: Xiph.Org libVorbis 1.3.5
opus: libopus 1.1.4
sndfile: libsndfile-1.0.27
simple_db: reading DB
curl: version 7.52.1
curl: with OpenSSL/1.0.2k
avahi: Initializing interface
avahi: Client changed to state 101
avahi: Client is CONNECTING
state_file: Loading state file /home/dale/.config/mpd/state
The port appears to be doing something, or at least ready to do something for MPD:
~ ➭ sudo netstat -lnp | sudo grep 8002
tcp 0 0 127.0.0.1:8002 0.0.0.0:* LISTEN 21596/mpd
However, when I run ncmpcpp (from within the same machine that is running MPD, the home server....remember, I'm ssh'ed in), I get the following complaint:
ncmpcpp: Failed to resolve host name
I've got the following ~/.config/mpd/mpd.conf
file:
music_directory "/mnt/media/Music"
playlist_directory "~/.config/mpd/playlists"
db_file "~/.config/mpd/database"
log_file "~/.config/mpd/log"
pid_file "~/.config/mpd/pid"
state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
#mixer_type "software"
#█▓▒░ opts
bind_to_address "127.0.0.1"
port "6601"
log_level "default"
gapless_mp3_playback "yes"
filesystem_charset "UTF-8"
#█▓▒░ io
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
mixer_type "hardware" # optional
mixer_device "default" # optional
mixer_control "PCM" # optional
mixer_index "0" # optional
}
#audio_output {
# type "alsa"
# name "audio"
#}
audio_output {
type "fifo"
name "visualizer"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis" # optional
bind_to_address "127.0.0.1"
port "8002"
# quality "5.0" # do not define if bitrate is defined
bitrate "128" # do not define if quality is defined
format "44100:16:1"
always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped.
tags "yes" # httpd supports sending tags to listening streams.
}
`
I've got this in my ~/.ncmpcpp/config
file:
ncmpcpp_directory = "~/.ncmpcpp"
#lyrics_directory = "~/.lyrics"
external_editor = "/usr/bin/vim"
# █▓▒░ MPD Settings
mpd_crossfade_time = "3"
mpd_music_dir = "/mnt/media/Music"
mpd_host = "127.0.0.1:8002"
mpd_port = "8002"
Any ideas which property(ies) I've misconfigured?
Thanks
testname123
(325 rep)
Jan 31, 2017, 05:54 PM
• Last activity: Jul 31, 2025, 11:06 AM
4
votes
1
answers
4082
views
mpc: access denied when adding mp3 file in a folder under music_directory
`mpc rescan` `mpc update` give same result. mpd.conf, mpd service running under user. ```sh music_directory "~/.cache/music" playlist_directory "~/.config/mpd/playlists" db_file "~/.config/mpd/database" input { plugin "curl" } audio_output { type "pulse" name "Local Music Player Daemon" server "127....
mpc rescan
mpc update
give same result.
mpd.conf, mpd service running under user.
music_directory "~/.cache/music"
playlist_directory "~/.config/mpd/playlists"
db_file "~/.config/mpd/database"
input {
plugin "curl"
}
audio_output {
type "pulse"
name "Local Music Player Daemon"
server "127.0.0.1"
}
I can mpc add
file under ~/.cache/music
, but I can't mpc add
file under a folder of ~/.cache/music
, e.g: ~/.cache/music/my music folder
, it gives error:
> error adding /home/user/.cache/music/my music folder/20. whatever.mp3:
> Access denied
mpc search title "20. whatever"
gives an empty result.
raring-coffee20
(1855 rep)
Nov 14, 2019, 02:58 AM
• Last activity: Jul 25, 2025, 07:08 AM
1
votes
1
answers
3060
views
Mopidy with pipewire-pulse
I run Mopidy as a service for my mpd because of the nice Spotify integration. I've followed the documentation's instructions to use it with pulseaudio by setting ``` load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1` ``` in my `/etc/pulse/default.pa` and ```json [audio] output = pulsesink...
I run Mopidy as a service for my mpd because of the nice Spotify integration. I've followed the documentation's instructions to use it with pulseaudio by setting
All of this was working perfectly, however recently I've started using Pipewire as a replacement for PulseAudio on Arch Linux by following this and installing
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1`
in my /etc/pulse/default.pa
and
[audio]
output = pulsesink server=127.0.0.1
in my /etc/mopidy/modipy.conf
.All of this was working perfectly, however recently I've started using Pipewire as a replacement for PulseAudio on Arch Linux by following this and installing
pipewire
,pipewire-alsa
, pipewire-pulse
and pipewire-media-session
. But now I've noticed that whenever I try to play any music nothing happens. I checked the journalctl for Mopidy and found this
ERROR ... [536:MainThread] mopidy.audio.gst
... mopidy: GStreamer error: Failed to connect: Connection refused
... mopidy: WARNING ... [536:Audio-2] mopidy.audio.actor
... mopidy: Setting GStreamer state to GST_STATE_PLAYING failed
... mopidy: WARNING ... [536:Core-11] mopidy.core.tracklist
... mopidy: Track is not playable: local:track:...
I searched around and found the gst-plugin-pipewire
package, but installing it didn't help at all. Apart from Mopidy, everything else audio-wise is working perfectly. If I could get some help with this I'd be thankful.
SandWood Jones
(63 rep)
Apr 7, 2021, 11:51 PM
• Last activity: Jul 23, 2025, 03:09 AM
0
votes
1
answers
69
views
Configure mpd to only start a UNIX socket
Running `mpd` without any `bind_to_address` in the config starts a working UNIX socket at `/run/user/1000/mpd/socket` but also starts a network socket at `0.0.0.0:6600` / `[::]:6600`. I would like to have only the UNIX socket without any network sockets, however, when configuring `bind_to_address "/...
Running
mpd
without any bind_to_address
in the config starts a working UNIX socket at /run/user/1000/mpd/socket
but also starts a network socket at 0.0.0.0:6600
/ [::]:6600
.
I would like to have only the UNIX socket without any network sockets, however, when configuring bind_to_address "/run/user/1000/mpd/socket"
it only works if the socket directory is already created (e.g. by starting mpd without any bind_to_address
previously). This means it fails after reboot.
Also, this method would hardcode the socket address instead of using $XDG_RUNTIME_DIR
.
Is there a way to make mpd start only a UNIX socket (and ideally read $XDG_RUNTIME_DIR
for that) using plain mpd without systemd?
niklassc
(113 rep)
May 23, 2025, 01:18 AM
• Last activity: May 28, 2025, 04:47 AM
1
votes
1
answers
2145
views
ffmpeg dash playback stream ends too early
I am trying to play back a dash manifest using `ffmpeg` but I keep running into the issue of `ffmpeg` ending with the error ``` [http @ 0x671e580] Stream ends prematurely at 2250, should be 18446744073709551615 ``` The dash manifest is for a livestream. I have tested the live stream in VLC player on...
I am trying to play back a dash manifest using
ffmpeg
but I keep running into the issue of ffmpeg
ending with the error
[http @ 0x671e580] Stream ends prematurely at 2250, should be 18446744073709551615
The dash manifest is for a livestream.
I have tested the live stream in VLC player on Windows and MX player on Android and it plays perfectly fine.
The issue seems to be just with ffmpeg
.
Has anyone had this issue before or know what the cause may be?
I have tried telling ffmpeg
to reconnect but it just loops this error.
I have tried two different MPD live streams:
* $Time$
based, and
* $Number$
based
The issue happens only with the Number based live stream.
Bluchip
(11 rep)
May 10, 2022, 12:02 PM
• Last activity: Apr 18, 2025, 08:05 AM
5
votes
2
answers
1205
views
ncmpcpp character problem
This was really wired! All `=` became `q` on my xfce4-terminal app, what's wrong with it? Any ideas? ![enter image description here][1] %> set | grep LANG LANG=en_US.utf8 LANGUAGE=en_US.utf8 [1]: https://i.sstatic.net/69N3x.png
This was really wired! All
%> set | grep LANG
LANG=en_US.utf8
LANGUAGE=en_US.utf8
=
became q
on my xfce4-terminal app, what's wrong with it?
Any ideas?

daisy
(55777 rep)
Dec 25, 2012, 12:14 PM
• Last activity: Nov 9, 2023, 04:50 PM
2
votes
1
answers
1711
views
pulse_output failed to play: suspended
I have mpd running as a system service and as user `mpd`. Since mpd is a system service and pulse audio is session-based, I have to stream music from mpd to the currently active pulse session daemon. This is done using the `module-native-protocol-tcp module` configured with `auth-anonymous=1 auth-co...
I have mpd running as a system service and as user
mpd
. Since mpd is a system service and pulse audio is session-based, I have to stream music from mpd to the currently active pulse session daemon. This is done using the module-native-protocol-tcp module
configured with auth-anonymous=1 auth-cookie-enabled=0 listen=0.0.0.0
(loose, I know, but for testing purposes)
The output in mpd.conf looks like this:
audio_output {
type "pulse"
name "My (loopback) Pulse Output"
server "localhost"
}
Now when I run a song in mpd it complains:
pulse_output: "My (loopback) Pulse Output" [pulse] failed to play: suspended
output: Failed to open audio output
What is wrong here? Is this a bug?
What I tried :
Running as my user (systemd)
Running as my user (systemd) and set the user in mpd.conf
Running as root and set the user in mpd.conf
Setting the exact sink name
ManuelSchneid3r
(4455 rep)
Jul 29, 2015, 10:23 PM
• Last activity: Mar 21, 2023, 07:10 PM
2
votes
1
answers
1962
views
After login Ncmpcpp shows empty library, have to restart mpd service manually
A year ago I found this great combination between `ncmpcpp` and `mpd`. I set my library with `mpd` and the `ncmpcpp` player. I am however facing an issue that is constantly reoccurring - every time I logout or wake my computer up from hibernation (to HDD) `ncmpcpp` appears to have an empty library,...
A year ago I found this great combination between
ncmpcpp
and mpd
. I set my library with mpd
and the ncmpcpp
player. I am however facing an issue that is constantly reoccurring - every time I logout or wake my computer up from hibernation (to HDD) ncmpcpp
appears to have an empty library, list and everything that is mpd
-related. mpd
is running (checked for the process and also running mpd
command returns that the address has already been taken hence the new call is unable to bind to the given address).
So far the solution I have found by experimenting is to simply call
$ sudo service mpd stop
to stop mpd
and then restart it by calling
$ mpd
Has anyone experienced something like this? It's not too much of a fuss but I kind of find it annoying to have to do that on a regular basis.
rbaleksandar
(512 rep)
Jan 12, 2016, 09:27 PM
• Last activity: Oct 26, 2022, 11:04 AM
0
votes
1
answers
690
views
Streaming audio files over HTTP with Media Player Daemon fails - 'Not found'
I'm trying to set up a simple MPD instance to stream audio files over HTTP. What I'd like to be able to do is put in a URL in my browser, which will stream the audio file - as simple as possible. I've set MPD to listen to a local port, and it appears to be working - I get an `OK MPD 0.23.4` when bro...
I'm trying to set up a simple MPD instance to stream audio files over HTTP. What I'd like to be able to do is put in a URL in my browser, which will stream the audio file - as simple as possible.
I've set MPD to listen to a local port, and it appears to be working - I get an
OK MPD 0.23.4
when browsing to [my-IP]:6600
.
I've tried setting the built in HTTPD server as well:
audio_output {
type "httpd"
name "HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
port "8000"
bind_to_address "[my-ip]" # optional, IPv4 or IPv6
## quality "6.0" # do not define if bitrate is defined
bitrate "192" # do not define if quality is defined
format "48000:16:2"
max_clients "0" # optional 0=no limit
}
Once that was done, I added a file named test.ogg
to the top level directory - and MPD picks it up (from /var/log/mpd.log
):
update: added /test.ogg
But when trying to access the file via browser or VLC ([my-ip]:8000/test.ogg
) , I get an error:
Not found
MPD runs from my user, and permissions are OK - I'm not sure what I'm doing wrong.
How can I get MPD to stream HTTP files, as simply as possible?
Any help would be greatly appreciated.
Thanks!
takahe
(1 rep)
Nov 27, 2021, 08:48 AM
• Last activity: Mar 30, 2022, 12:28 PM
3
votes
1
answers
4132
views
mpd to remote dlna
I currently use an `mpd` with 4 configured outputs, wired to speakers in the ceilings as home-made "multiroom" audio system. I would like to add wireless speakers, e.g. one like [this][1]. The question is: How can I tell `mpd` that there is an output which is in fact remote a dlna/upnp (even aiyplay...
I currently use an
mpd
with 4 configured outputs, wired to speakers in the ceilings as home-made "multiroom" audio system.
I would like to add wireless speakers, e.g. one like this .
The question is:
How can I tell mpd
that there is an output which is in fact remote a dlna/upnp (even aiyplay would be fine) ip-device ?
Is it possible at all ?
**Edit 1:**
I found a way , though through pulseaudio
and not dlna
(which could be a use for one of my Raspberry Pi
s).
yglodt
(283 rep)
Jul 30, 2014, 11:05 AM
• Last activity: Nov 10, 2021, 05:21 PM
0
votes
1
answers
1600
views
Can't find where the mpd service is started
I installed `mpd` (Music Player Daemon) a long time ago on my systemd Arch Linux (I don't remember the installation/setup details). The `mpd` server is started during boot, but I can't find where/how it is started. It may be run by my own personal init scripts, but I didn't find anything inside them...
I installed
mpd
(Music Player Daemon) a long time ago on my systemd Arch Linux (I don't remember the installation/setup details).
The mpd
server is started during boot, but I can't find where/how it is started. It may be run by my own personal init scripts, but I didn't find anything inside them.
$ systemctl status
[...]
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service
│ │ ├─session.slice
│ │ │ └─pulseaudio.service
│ │ │ ├─2028 /usr/bin/pulseaudio --daemonize=no --log-target=journal
│ │ │ └─2072 /usr/lib/pulse/gsettings-helper
│ │ ├─app.slice
│ │ │ ├─mpd.service
│ │ │ │ └─1963 /usr/bin/mpd --no-daemon
[...]
$ systemctl status mpd.service
○ mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:mpd(1)
man:mpd.conf(5)
In the commands above, I don't understand why systemctl status
shows that mpd
was started from mpd.service
, but systemctl status mpd.service
shows that mpd.service
is inactive/dead.
If I kill mpd
, then start mpd.service
, then $ systemctl status mpd.service
shows the service as "active":
$ killall mpd
$ systemctl start mpd.service
$ systemctl status mpd.service
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2021-10-17 20:01:57 CEST; 4min 55s ago
Docs: man:mpd(1)
man:mpd.conf(5)
Main PID: 4237 (mpd)
Tasks: 3 (limit: 18719)
Memory: 8.9M
CPU: 96ms
CGroup: /system.slice/mpd.service
└─4237 /usr/bin/mpd --no-daemon
oct. 17 20:07:59 pad systemd: Starting Music Player Daemon...
oct. 17 20:07:59 pad mpd: exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use
oct. 17 20:07:59 pad mpd: config: Found database setting without music_directory - disabling database
oct. 17 20:07:59 pad mpd: output: No 'audio_output' defined in config file
oct. 17 20:07:59 pad mpd: output: Successfully detected a alsa audio device
oct. 17 20:07:59 pad systemd: Started Music Player Daemon.
oct. 17 20:08:00 pad mpd: avahi: Service 'Music Player @ pad' successfully established.
As an extra, I don't understand the error bind to '0.0.0.0:6600' failed
above, because lsof -i :6600
gives no output:
$ lsof -i :6600
$
Could somehow give me clues on how to find where mpd
service is started?
Thanks in advance
yolenoyer
(519 rep)
Oct 17, 2021, 06:26 PM
• Last activity: Oct 18, 2021, 05:57 AM
3
votes
1
answers
5231
views
PulseAudio and MPD
# Problems when using `mpd` with `pulse` Pulseaudio was created in order to enable using more than 1 audio source for one sink (**correct?**). If so, it should be possible to use one `sink` for `mpd` and another audio source right? That's exactly what I'm trying to do and I can't find the way. ### R...
# Problems when using
**Bonus Question:** Why are there **2** groups for
mpd
with pulse
Pulseaudio was created in order to enable using more than 1 audio source for one sink (**correct?**). If so, it should be possible to use one sink
for mpd
and another audio source right? That's exactly what I'm trying to do and I can't find the way.
### Relevant Info
- I use Awesome WM
and pulseaudio
so I rely purely commands to change audio settings - No gnome-settings
for example.
- I use mpd as a service and the user running it is mpd
in group audio
.
- I have 2 audio outputs of type pulse
defined in my /etc/mpd.conf
that use the following sinks:
alsa_output.pci-0000_00_03.0.hdmi-stereo
and alsa_output.pci-0000_00_1b.0.analog-stereo
.
- I can switch between those 2 audio outputs with mpc
or other client for mpd
like ncmpcpp
.
- This is the output of grep -E "pulse|mpd|audio"
:audio:x:29:pulse
pulse:x:123:mpd
pulse-access:x:124:mpd
**Bonus Question:** Why are there **2** groups for
pulse
and what is the difference between them?
- I use Ubuntu 16.04.
**The problem is** that if I want to hear music from my browser for example, I have to pause mpd
and refresh the page. It's quite annoying and sometimes I have to refresh the page more than once to hear something.
### What I know
- I can view the programs that use (or want to use audio) with pacmd list-sink-inputs
and I never see mpd
there.
- I know that mpd
is running it's own pulseaudio session because I can see with htop
/top
/ps aux
the following:doron [..] /usr/bin/pulseaudio --start --log-target=syslog -vvvv
mpd [..] /usr/bin/pulseaudio --start --log-target=syslog -vvvv
Doron Behar
(773 rep)
Jun 4, 2016, 04:20 PM
• Last activity: Jul 13, 2021, 12:39 PM
0
votes
1
answers
2054
views
How to use mopidy-youtube?
I am using Arch bspwm on my laptop. I installed `mpd`, `ncmpcpp` and `mopidy` (with mopidy-yt extension) and enabled the required stuff for mopidy-youtube. How do I use it? I am new to all this and hope you guys can explain.
I am using Arch bspwm on my laptop. I installed
mpd
, ncmpcpp
and mopidy
(with mopidy-yt extension) and enabled the required stuff for mopidy-youtube. How do I use it? I am new to all this and hope you guys can explain.
Kailash K S
(1 rep)
Dec 27, 2020, 05:10 PM
• Last activity: Dec 28, 2020, 08:37 PM
0
votes
1
answers
281
views
MPD ignoring music_directory specification in config
I have been struggling with MPD for several hours now. I have referenced nearly every post that has been made on the issue of MPD failing to detect the music directory properly and have made no progress. In my configuration file, I have specified `'music_directory'` as both `/home/user/Music` and as...
I have been struggling with MPD for several hours now. I have referenced nearly every post that has been made on the issue of MPD failing to detect the music directory properly and have made no progress. In my configuration file, I have specified
'music_directory'
as both /home/user/Music
and as ~/Music
several times in different methods, I have completely removed and purged mpd and reinstalled it twice, deleted all old configuration files, and remade these configurations. The only thing that has solved my problem is moving the music library to /var/lib/mpd/Music
despite this not being the specified music directory. I don't want to have to resort to using this as a solution, as my I have /home
on a separate partition and dont want to waste my limited space in the system partition
mpd config
db_file "/home/user/.mpd/db"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd/pid"
music_directory "~/Music"
auto_update "yes"
user "mpd"
Any help would be appreciated I'm at my wits end
AnK
(1 rep)
Aug 17, 2020, 04:39 PM
• Last activity: Aug 29, 2020, 05:03 PM
1
votes
2
answers
10922
views
Socket already in use, but is not listed (mpd)?
Running $ mpd I am prompted with > socket: Failed to bind to '127.0.0.1:6600': Address already in use But if I run: $ sudo service mpd start and check its status, I get > systemd[1]: Started Music Player Daemon. Note that in what is to come, assume that: $ sudo service mpd stop has been run. ### Que...
Running
$ mpd
I am prompted with
> socket: Failed to bind to '127.0.0.1:6600': Address already in use
But if I run:
$ sudo service mpd start
and check its status, I get
> systemd: Started Music Player Daemon.
Note that in what is to come, assume that:
$ sudo service mpd stop
has been run.
### Questions
- What is the difference between the two, why does one give an error, and the other not?
- How can I track/find how the socket is being used? As mentioned, first we stop the service, if it is running?
$ sudo service mpd stop
I search over stackexchange, and the solutions mentioned don't find anything.
$ sudo lsof -i -n -P|grep 6600
returns nothing
$ sudo netstat -tulpn |grep 6600
return nothing
$ sudo ss -npt|grep 6600
return nothing. But, again,
$ mpd
returns
> socket: Failed to bind to '127.0.0.1:6600': Address already in use
What do I not understand?
LeastSquaresWonderer
(111 rep)
Jul 18, 2018, 04:41 AM
• Last activity: Apr 10, 2020, 12:13 PM
2
votes
1
answers
3240
views
Unable to disable daemon using Systemd
I've tried disabling MPD (Music Player Daemon) using Systemd: sudo systemctl disable mpd sudo systemctl status mpd mpd.service - Music Player Daemon Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: disabled) Active: inactive (dead) But MPD runs at every boot regardless. ps a...
I've tried disabling MPD (Music Player Daemon) using Systemd:
sudo systemctl disable mpd
sudo systemctl status mpd
mpd.service - Music Player Daemon
Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
But MPD runs at every boot regardless.
ps aux | grep mpd
user 1691 0.1 0.8 995424 33108 ? Ssl 09:07 0:00 mpd
user 2154 0.0 0.0 14216 2464 pts/5 S+ 09:17 0:00 grep --color=auto mpd
How can I disable MPD from running at boot?
Rocket Singh
(53 rep)
Mar 12, 2016, 09:19 AM
• Last activity: Mar 27, 2020, 11:44 AM
4
votes
2
answers
8144
views
Stream system audio through mpd
I use mpd to stream music to my phone (connected to Hi-Fi) via `http`. Yet, this only works for songs in my mpd database. I oftentimes want to play stuff in my browser and would like that to be streamed over `mpd`, too. Is there a way to route the `pulse audio` output to `mpd` instead of the speaker...
I use mpd to stream music to my phone (connected to Hi-Fi) via
http
.
Yet, this only works for songs in my mpd database. I oftentimes want to play stuff in my browser and would like that to be streamed over mpd
, too.
Is there a way to route the pulse audio
output to mpd
instead of the speakers?
Profpatsch
(1869 rep)
Apr 26, 2013, 09:52 AM
• Last activity: Dec 13, 2019, 01:04 PM
5
votes
5
answers
10866
views
How to play the result of "mpc search"?
Example: $ mpc search title "when I was your man" Bruno Mars/Unorthodox Jukebox/06 Bruno Mars - When I Was Your Man.mp3 How do I play the song? I've tried piping it to `mpc play` but no luck. $ mpc search title "when I was your man" | mpc play
Example:
$ mpc search title "when I was your man"
Bruno Mars/Unorthodox Jukebox/06 Bruno Mars - When I Was Your Man.mp3
How do I play the song? I've tried piping it to
mpc play
but no luck.
$ mpc search title "when I was your man" | mpc play
Jürgen Paul
(517 rep)
Aug 22, 2013, 07:15 AM
• Last activity: Sep 9, 2019, 06:17 AM
2
votes
0
answers
646
views
mpd stopped working under systemd, works when run on the command line
Yesterday my mpd stopped working. It has worked for several months until now, but when choosing music in `ncmpcpp` no sound would be output. Today I tried stopping mpd: $ sudo systemctl stop mpd $ sudo systemctl stop mpd.socket Then I tried running it interactively on the command line: $ sudo mpd -v...
Yesterday my mpd stopped working. It has worked for several months until now, but when choosing music in
ncmpcpp
no sound would be output.
Today I tried stopping mpd:
$ sudo systemctl stop mpd
$ sudo systemctl stop mpd.socket
Then I tried running it interactively on the command line:
$ sudo mpd -v --no-daemon --stdout
When I re-ran ncmpcpp
this worked; music could be played. I have no mpd conf files in my home folder so I think it should be using the same conf file (/etc/mpd.conf
) as systemd.
So then I looked into the log files. They show:
Jun 14 10:06 : player: played "Orbital/The Middle Of Nowhere/01-Way Out -_.mp3"
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Jun 14 10:06 : alsa_output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "default": Device or resource busy
Jun 14 10:06 : output: Failed to open audio output
Jun 14 10:06 : player: problems opening audio device while playing "Orbital/The Middle Of Nowhere/01-Way Out -_.mp3"
It looks like some sort of ALSA problem but...
1. Why does it only affect me when running with systemd?
2. Why has it only just started being a problem (I don't think I've updated my system...)
I tried listing any other users of the sound devices:
$ lsof /dev/snd/*
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 3992 gravelld mem CHR 116,3 460 /dev/snd/pcmC0D0p
pulseaudi 3992 gravelld 16u CHR 116,8 0t0 521 /dev/snd/controlC1
pulseaudi 3992 gravelld 23u CHR 116,8 0t0 521 /dev/snd/controlC1
pulseaudi 3992 gravelld 24u CHR 116,2 0t0 459 /dev/snd/controlC0
pulseaudi 3992 gravelld 31u CHR 116,2 0t0 459 /dev/snd/controlC0
pulseaudi 3992 gravelld 36u CHR 116,2 0t0 459 /dev/snd/controlC0
pulseaudi 3992 gravelld 42u CHR 116,17 0t0 576 /dev/snd/controlC2
pulseaudi 3992 gravelld 52u CHR 116,2 0t0 459 /dev/snd/controlC0
pulseaudi 3992 gravelld 58u CHR 116,3 0t0 460 /dev/snd/pcmC0D0p
(gravelld
is my user - the same one I can successfully run mpd on the command line from).
Dan Gravell
(225 rep)
Jun 14, 2019, 09:15 AM
• Last activity: Jun 14, 2019, 01:24 PM
1
votes
1
answers
5088
views
mpd with bluetooth speaker has no sound
My environment has two audio output: HDMI and Bluetooth speaker. Usually both of them work correctly. For example, #this plays sound via bluetooth speaker $ aplay -D default jingle.wav #this plays sound via HDMI $ aplay -D plughw:1,7 jingle.wav However, `mpc play` doesn't play any sound. My `/etc/mp...
My environment has two audio output: HDMI and Bluetooth speaker. Usually both of them work correctly. For example,
#this plays sound via bluetooth speaker
$ aplay -D default jingle.wav
#this plays sound via HDMI
$ aplay -D plughw:1,7 jingle.wav
However,
mpc play
doesn't play any sound. My /etc/mpd.conf
is a default one except for the music directory. So
music_directory "smb://xxx.xxx.xx.x/some_directory"
...
audio_output {
type "alsa"
name "My ALSA Device"
# device "hw:0,0" # optional
# mixer_type "hardware" # optional
# mixer_device "default" # optional
# mixer_control "PCM" # optional
# mixer_index "0" # optional
}
I use a remote music directory (smb
protocol) and the connection is ok. According to man mpd.conf
, the default value of device
field is "default"
. But mpc play
plays no sound though I expect it plays via the bluetooth speaker as the aplay -D default
command above. sudo mpd --no-daemon --stderr
says
exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
avahi: Service 'Music Player' successfully established.
client: opened from xxx.x.x.x:xxxxx
No protocol specified
xcb_connection_has_error() returned true
No protocol specified
No protocol specified
xcb_connection_has_error() returned true
exception: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
The last line may be the cause, so I set the mixer_type
field as "none"
. But still no sound. mpc play
successes and the current position (e.g. 00:56/3:20 (58%)
) progresses but no sound.
How can I use my bluetooth speaker? If I set device
to plughw:1,7
, mpc play
actually plays sound via HDMI as the aplay
command above. However, I would like to use the bluetooth speaker.
Environment:
$ lsb_relase -d
Description: Linux Mint 19 Tara
$ mpd --version
Music Player Daemon 0.20.18
I installed mpd
via sudo apt install mpd
.
ynn
(998 rep)
May 8, 2019, 02:27 PM
• Last activity: May 9, 2019, 03:13 AM
Showing page 1 of 20 total questions