Mpd configuration

From wikinotes
Revision as of 18:05, 7 November 2021 by Will (talk | contribs) (Created page with "= mpd.conf = <blockquote> <source lang="bash"> # ~/.mpdconf music_directory "/home/media/music" db_file "/home/media/.mpd/db" log_file "/home/media/.mpd/log"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

mpd.conf

# ~/.mpdconf

music_directory "/home/media/music"

db_file         "/home/media/.mpd/db"
log_file        "/home/media/.mpd/log"
pid_file        "/home/media/.mpd/pid"
state_file      "/home/media/.mpd/state"
user            "mpd"

Audio Output

HTTPD Streaming

# Streaming Output
#
# this is copied verbatim from /usr/share/doc/mpd/mpdconf.example

audio_output {
    type               "httpd"
    name               "My HTTP Stream"
    encoder            "vorbis"          # optional, vorbis or lame
    port               "8000"
    bind_to_address    "0.0.0.0"        # optional, IPv4 or IPv6
#   quality           "5.0"             # do not define if bitrate is defined
    bitrate            "128"            # do not define if quality is defined
    format             "44100:16:1"
    max_clients        "0"            # optional 0=no limit
}

Listen to Stream

# adds 'track' representing stream
mpc add http://foo.com:8000

# alternatively, use vlc
http://foo.com/mpd.ogg