- The first directive, music_directory, we can leave as default. If you want to change this so you can use alternative storage, you can do so here.
- Next, the playlist_directory directive is similar to the previous one; we can change it or leave it as default. Typically playlist files are only a few kilobytes in size, so they don’t take up too much space.
- Skip down to the log_file directive. Here, you can change the log file’s location. I recommend leaving this as the default.
- Skip down to the bind_to_address directive, and set it to “127.0.0.1” (with quotes). Make sure to include a space between bind_to_address and “127.0.0.1”.
- The port directive tells mpd which port to bind to; since we’re running both mpd and Icecast2 on the same computer, we can leave this at the default of “6600”.
- Jump down to the save_absolute_paths_in_playlists directive. This doesn’t matter too much. Setting this to yes won’t hurt you in the long run.
- Scroll a long ways down to the audio outputs section of the config file. Here is where we will detail our streams. If you don’t see this section in mpd.conf or you’re making your own mpd.conf file, use this template:
audio_output {
type "shout"
encoding "ogg" # optional, unless you want to force a particular encoding type
name "Example Radio"
host "example.com"
port "8000"
mount "/example.ogg"
password "ExamplePasswordYouShouldChangeThis"
quality "10.0" # This is the defined VBR quality for the stream. Either
# use this setting for a VBR with a target quality of 10
#(numbers vary based on your encoding type).
# bitrate "320" # Uncomment and use this to force a CBR in kbps
format "44100:16:2" # SampleRateKhz:Bits:Channels (1=Mono, 2=Stereo) - Example: 44100:16:2 - *'s are also acceptable
protocol "icecast2" # optional
# user "source" # optional
description "Example Radio Station" # optional
genre "Example Music Genre" # optional
public "yes" # optional, enable this so you can be listed on stream lists
timeout "2" # optional, amount of time you will wait for the output to become available
always_on "yes" # for shoutcast or icecast, always enable this
# MORE DETAILS:
# http://www.musicpd.org/doc/user/config_audio_outputs.html
# http://www.musicpd.org/doc/user/output_plugins.html#shout_output
}
# copy the entire block above for another stream, only mandatory change is the mount option, all others are optional,
# but changing the name, etc. is recommended especially for the end user's sake
# if MPD throws errors about trying to output to a sound card or other physical
# audio device, you can try this to suppress it - ALWAYS LIST THIS OUTPUT LAST
audio_output {
type "alsa"
name "fake out"
driver "null"
}
- If your music or paths to your music contain non-ASCII characters you might need to define the encoding scheme here.
# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting. After modification of this setting mpd
# --create-db must be run to change the database.
#
filesystem_charset "UTF-8"
#
# This setting controls the encoding that ID3v1 tags should be converted from.
#
id3v1_encoding "UTF-8"
#
- Now is a good time to go through mpd.conf and check for stray braces; they can cause MPD to silently fail with no errors!