Second MPD instance for HTTP streaming
Second MPD instance for HTTP streaming
Hi, I would like to run a 2nd MPD instance specifically for HTTP streaming. How can this be achieved? Thanks, Henry
Re: Second MPD instance for HTTP streaming
By creating a second configuration file with a different port and different output configuration, optionally attached to the first MPD with the "proxy" database plugin (https://www.musicpd.org/doc/html/user.html#satellite).
Then you can create a copy of "mpd.service" which specifies the second configuration file, and launch it with "systemctl". (This assumes that you're using systemd to start MPD. I don't know that, because you didn't provide any insight into your setup.)
Then you can create a copy of "mpd.service" which specifies the second configuration file, and launch it with "systemctl". (This assumes that you're using systemd to start MPD. I don't know that, because you didn't provide any insight into your setup.)
Re: Second MPD instance for HTTP streaming
Thanks for the tips, directions and help. I now have a second instance of a mpd service active.
However, I'm not able connect to my mpd library.
I tried the satellite sharing using the proxy database plugin, but it did not connect.
This is an extract of the 2nd conf file:
music_directory "/media/4tb/music"
playlist_directory "/media/4tb/config/mpd/playlists"
#db_file "/var/lib/mpd/tag_cache"
database {
plugin "proxy"
}
log_file "/home/henry/.mpd/mpd2.log"
pid_file "/run/mpd/pid2"
state_file "/var/lib/mpd/state2"
sticker_file "/var/lib/mpd/sticker2.sql"
port "6600"
log_level "verbose"
auto_update "yes"
follow_outside_symlinks "yes"
follow_inside_symlinks "yes"
zeroconf_enabled "yes"
zeroconf_name "Music Player"
input {
plugin "curl"
}
audio_output {
type "httpd"
name "My Stream"
encoder "lame" # optional, vorbis or lame
port "6608"
quality "3.0" # do not define if bitrate is defined
format "44100:16:2"
always_on "yes"
tags "yes"
}
replaygain "track"
replaygain_preamp "12"
volume_normalization "no"
audio_buffer_size "4096"
buffer_before_play "50%"
samplerate_converter "Best Sinc Interpolator"
id3v1_encoding "UTF-8"
However, I'm not able connect to my mpd library.
I tried the satellite sharing using the proxy database plugin, but it did not connect.
This is an extract of the 2nd conf file:
music_directory "/media/4tb/music"
playlist_directory "/media/4tb/config/mpd/playlists"
#db_file "/var/lib/mpd/tag_cache"
database {
plugin "proxy"
}
log_file "/home/henry/.mpd/mpd2.log"
pid_file "/run/mpd/pid2"
state_file "/var/lib/mpd/state2"
sticker_file "/var/lib/mpd/sticker2.sql"
port "6600"
log_level "verbose"
auto_update "yes"
follow_outside_symlinks "yes"
follow_inside_symlinks "yes"
zeroconf_enabled "yes"
zeroconf_name "Music Player"
input {
plugin "curl"
}
audio_output {
type "httpd"
name "My Stream"
encoder "lame" # optional, vorbis or lame
port "6608"
quality "3.0" # do not define if bitrate is defined
format "44100:16:2"
always_on "yes"
tags "yes"
}
replaygain "track"
replaygain_preamp "12"
volume_normalization "no"
audio_buffer_size "4096"
buffer_before_play "50%"
samplerate_converter "Best Sinc Interpolator"
id3v1_encoding "UTF-8"
Re: Second MPD instance for HTTP streaming
Your configuration doesn't make sense. You configured port 6600, but what port is your first MPD running on? And your "proxy" database by default connects to localhost:6600, which means your second MPD connects to itself.
Re: Second MPD instance for HTTP streaming
Thanks Max. The primary MPD is configured for port 6700. No problems with this install at all.
Re: Second MPD instance for HTTP streaming
Then you should configure the "proxy" to connect to port 6700.
Re: Second MPD instance for HTTP streaming
Thanks Max so much for you help. I now have satellite mode working seamlessly. So cool.
These are conf settings from my secondary player:
music_directory "/media/4tb/music"
playlist_directory "/media/4tb/config/mpd/playlists"
#db_file "/var/lib/mpd/tag_cache"
database {
plugin "proxy"
port "6700"
}
log_file "/home/henry/.mpd/mpd2.log"
pid_file "/run/mpd/pid2"
state_file "/var/lib/mpd/state2"
sticker_file "/var/lib/mpd/sticker2.sql"
These are conf settings from my secondary player:
music_directory "/media/4tb/music"
playlist_directory "/media/4tb/config/mpd/playlists"
#db_file "/var/lib/mpd/tag_cache"
database {
plugin "proxy"
port "6700"
}
log_file "/home/henry/.mpd/mpd2.log"
pid_file "/run/mpd/pid2"
state_file "/var/lib/mpd/state2"
sticker_file "/var/lib/mpd/sticker2.sql"