# {{ ansible_managed }} # # An example configuration file for MPD. # Read the user manual for documentation: http://www.musicpd.org/doc/user/ # or /usr/share/doc/mpd/user-manual.html # Files and directories ####################################################### # # This setting controls the top directory which MPD will search to discover the # available audio files and add them to the daemon's online database. This # setting defaults to the XDG directory, otherwise the music directory will be # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. # music_directory "{{ mpd_music_dir }}" # # This setting sets the location of the MPD database. This file is used to # load the database at server start up and store the database while the # server is not up. This setting defaults to disabled which will allow # MPD to accept files over ipc socket (using file:// protocol) or streaming # files over an accepted protocol. # # TODO: use variable for this, usable for task and this configuration db_file "/home/sonny/.config/mpd/db" # # These settings are the locations for the daemon log files for the daemon. # These logs are great for troubleshooting, depending on your log_level # settings. # log_level "secure" # # TODO: use variable for this, usable for task and this configuration state_file "/home/sonny/.config/mpd/state" # # The location of the sticker database. This is a database which # manages dynamic information attached to songs. # # TODO: use variable for this, usable for task and this configuration sticker_file "/home/sonny/.config/mpd/sticker.sql" # ############################################################################### # General music daemon options ################################################ # # This setting specifies the user that MPD will run as. MPD should never run as # root and you may use this setting to make MPD change its user ID after # initialization. This setting is disabled by default and MPD is run as the # current user. # user "sonny" # # This setting sets the address for the daemon to listen on. Careful attention # should be paid if this is assigned to anything other then the default, any. # This setting can deny access to control of the daemon. Choose any if you want # to have mpd listen on every address. Not effective if systemd socket # activation is in use. # # For network bind_to_address "{{ vpn_listen_address }}" # # This setting is the TCP port that is desired for the daemon to get assigned # to. # port "{{ mpd_port }}" # # This setting enables automatic update of MPD's database when files in # music_directory are changed. # auto_update "yes" # ############################################################################### # Audio Output ################################################################ # # MPD supports various audio output types, as well as playing through multiple # audio outputs at the same time, through multiple audio_output settings # blocks. Setting this block is optional, though the server will only attempt # autodetection for one sound card. # # Use a fixed format for the HTTP stream because it cannot switch its audio # format on-the-fly when the song changes. # See https://mpd.readthedocs.io/en/latest/plugins.html#httpd. # See https://wiki.xiph.org/Opus_Recommended_Settings#Recommended_Bitrates for # recommended Opus settings. audio_output { type "httpd" name "HTTP high quality stream" encoder "opus" port "{{ mpd_http_stream_port }}" bind_to_address "{{ vpn_listen_address }}" bitrate "128000" format "192000:24:2" always_on "yes" tags "yes" max_clients "0" } audio_output { type "httpd" name "HTTP mobile stream" encoder "opus" port "{{ mpd_http_mobile_stream_port }}" bind_to_address "{{ vpn_listen_address }}" bitrate "96000" format "44100:16:2" always_on "yes" tags "yes" max_clients "1" } # # Character Encoding ########################################################## # # If file or directory names do not display correctly for your locale then you # may need to modify this setting. # filesystem_charset "UTF-8"