## Copyright (C) 2020-2021 Aditya Shakya <adi1090x@gmail.com>
## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3
music_directory "~/music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/mpdstate"
audio_output {
type "pulse"
name "pulse audio"
}
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "httpd"
name "HTTP Stream"
encoder "lame" #to support safari on ios
port "8000"
bitrate "128"
format "44100:16:1"
always_on "yes"
tags "yes"
}
bind_to_address "127.0.0.1"
port "6600"
#AnexampleconfigurationfileforMPD#Seethempd.confmanpageforamoredetaileddescriptionofeachparameter.#Filesanddirectories#########################################################ThissettingcontrolsthetopdirectorywhichMPDwillsearchtodiscoverthe#availableaudiofilesandaddthemtothedaemon'sonlinedatabase.This#settingdefaultstotheXDGdirectory,otherwisethemusicdirectorywillbe#bedisabledandaudiofileswillonlybeacceptedoveripcsocket(using#file:// protocol) or streaming files over an accepted protocol.
##music_directory"~/music"##ThissettingsetstheMPDinternalplaylistdirectory.Thepurposeofthis#directoryisstorageforplaylistscreatedbyMPD.Theserverwilluse#playlistfilesnotcreatedbytheserverbutonlyiftheyareintheMPD#format.Thissettingdefaultstoplaylistsavingbeingdisabled.##playlist_directory"~/.mpd/playlists"##ThissettingsetsthelocationoftheMPDdatabase.Thisfileisusedto#loadthedatabaseatserverstartupandstorethedatabasewhilethe#serverisnotup.Thissettingdefaultstodisabledwhichwillallow#MPDtoacceptfilesoveripcsocket(usingfile:// protocol) or streaming
#filesoveranacceptedprotocol.##db_file"~/.mpd/database"##Thesesettingsarethelocationsforthedaemonlogfilesforthedaemon.#Theselogsaregreatfortroubleshooting,dependingonyourlog_level#settings.##Thespecialvalue"syslog"makesMPDusethelocalsyslogdaemon.This#settingdefaultstologgingtosyslog,otherwiseloggingisdisabled.##log_file"~/.mpd/log"##ThissettingsetsthelocationofthefilewhichstorestheprocessID#foruseofmpd--killandsomeinitscripts.Thissettingisdisabledby#defaultandthepidfilewillnotbestored.##pid_file"~/.mpd/pid"##Thissettingsetsthelocationofthefilewhichcontainsinformationabout#mostvariablestogetMPDbackintothesamegeneralshapeitwasinbefore#itwasbroughtdown.Thissettingisdisabledbydefaultandtheserver#statewillberesetonserverstartup.##state_file"~/.mpd/state"##Thelocationofthestickerdatabase.Thisisadatabasewhich#managesdynamicinformationattachedtosongs.##sticker_file"~/.mpd/sticker.sql"#################################################################################Generalmusicdaemonoptions##################################################ThissettingspecifiestheuserthatMPDwillrunas.MPDshouldneverrunas#rootandyoumayusethissettingtomakeMPDchangeitsuserIDafter#initialization.ThissettingisdisabledbydefaultandMPDisrunasthe#currentuser.##user"nobody"##ThissettingspecifiesthegroupthatMPDwillrunas.Ifnotspecified#primarygroupofuserspecifiedwith"user"settingwillbeused(ifset).#ThisisusefulifMPDneedstobeamemberofgroupsuchas"audio"to#havepermissiontousesoundcard.##group"nogroup"##Thissettingsetstheaddressforthedaemontolistenon.Carefulattention#shouldbepaidifthisisassignedtoanythingotherthenthedefault,any.#Thissettingcandenyaccesstocontrolofthedaemon.##Fornetwork#bind_to_address"any"##AndforUnixSocket#bind_to_address"~/.mpd/socket"##ThissettingistheTCPportthatisdesiredforthedaemontogetassigned#to.##port"6600"##Thissettingcontrolsthetypeofinformationwhichislogged.Available#settingargumentsare"default","secure"or"verbose".The"verbose"setting#argumentisrecommendedfortroubleshooting,thoughcanquicklystretch#availableresourcesonlimitedhardwarestorage.##log_level"default"##IfyouhaveaproblemwithyourMP3sendingabruptlyitisrecommendedthat#yousetthisargumentto"no"toattempttofixtheproblem.Ifthissolves#theproblem,itishighlyrecommendedtofixtheMP3fileswithvbrfix#(availablefrom<http://www.willwap.co.uk/Programs/vbrfix.php>), at which
#pointgaplessMP3playbackcanbeenabled.##gapless_mp3_playback"yes"##Setting"restore_paused"to"yes"putsMPDintopausemodeinstead#ofstartingplaybackafterstartup.##restore_paused"no"##ThissettingenablesMPDtocreateplaylistsinaformatusablebyother#musicplayers.##save_absolute_paths_in_playlists"no"##Thissettingdefinesalistoftagtypesthatwillbeextractedduringthe#audiofilediscoveryprocess.Optionally,'comment'canbeaddedtothis#list.##metadata_to_use"artist,album,title,track,name,genre,date,composer,performer,disc"##ThissettingenablesautomaticupdateofMPD'sdatabasewhenfilesin#music_directoryarechanged.##auto_update"yes"##Limitthedepthofthedirectoriesbeingwatched,0meansonlywatch#themusicdirectoryitself.Thereisnolimitbydefault.##auto_update_depth"3"#################################################################################Symboliclinkbehavior########################################################Ifthissettingissetto"yes",MPDwilldiscoveraudiofilesbyfollowing#symboliclinksoutsideoftheconfiguredmusic_directory.##follow_outside_symlinks"yes"##Ifthissettingissetto"yes",MPDwilldiscoveraudiofilesbyfollowing#symboliclinksinsideoftheconfiguredmusic_directory.##follow_inside_symlinks"yes"#################################################################################Zeroconf/AvahiServiceDiscovery############################################Ifthissettingissetto"yes",serviceinformationwillbepublishedwith#Zeroconf/Avahi.##zeroconf_enabled"yes"##TheargumenttothissettingwillbetheZeroconf/Avahiuniquenamefor#thisMPDserveronthenetwork.##zeroconf_name"MusicPlayer"#################################################################################Permissions###################################################################Ifthissettingisset,MPDwillrequirepasswordauthorization.Thepassword#cansettingcanbespecifiedmultipletimesfordifferentpasswordprofiles.##password"password@read,add,control,admin"##Thissettingspecifiesthepermissionsauserhaswhohasnotyetloggedin.##default_permissions"read,add,control,admin"#################################################################################Input########################################################################input{plugin"curl"#proxy"proxy.isp.com:8080"#proxy_user"user"#proxy_password"password"}#################################################################################AudioOutput##################################################################MPDsupportsvariousaudiooutputtypes,aswellasplayingthroughmultiple#audiooutputsatthesametime,throughmultipleaudio_outputsettings#blocks.Settingthisblockisoptional,thoughtheserverwillonlyattempt#autodetectionforonesoundcard.##See<http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
#otheraudiooutputs.##AnexampleofanALSAoutput:##audio_output{#type"alsa"#name"MyALSADevice"##device"hw:0,0"#optional##format"44100:16:2"#optional##mixer_type"hardware"#optional##mixer_device"default"#optional##mixer_control"PCM"#optional##mixer_index"0"#optional#}##AnexampleofanOSSoutput:##audio_output{#type"oss"#name"MyOSSDevice"##device"/dev/dsp"#optional##format"44100:16:2"#optional##mixer_type"hardware"#optional##mixer_device"/dev/mixer"#optional##mixer_control"PCM"#optional#}##Anexampleofashoutoutput(forstreamingtoIcecast):##audio_output{#type"shout"#encoding"ogg"#optional#name"MyShoutStream"#host"localhost"#port"8000"#mount"/mpd.ogg"#password"hackme"#quality"5.0"#bitrate"128"#format"44100:16:1"##protocol"icecast2"#optional##user"source"#optional##description"MyStreamDescription"#optional##url"http://example.com" # optional
##genre"jazz"#optional##public"no"#optional##timeout"2"#optional##mixer_type"software"#optional#}##Anexampleofarecorderoutput:##audio_output{#type"recorder"#name"Myrecorder"#encoder"vorbis"#optional,vorbisorlame#path"/var/lib/mpd/recorder/mpd.ogg"##quality"5.0"#donotdefineifbitrateisdefined#bitrate"128"#donotdefineifqualityisdefined#format"44100:16:1"#}##Anexampleofahttpdoutput(built-inHTTPstreamingserver):##audio_output{#type"httpd"#name"MyHTTPStream"#encoder"vorbis"#optional,vorbisorlame#port"8000"#bind_to_address"0.0.0.0"#optional,IPv4orIPv6##quality"5.0"#donotdefineifbitrateisdefined#bitrate"128"#donotdefineifqualityisdefined#format"44100:16:1"#max_clients"0"#optional0=nolimit#}##Anexampleofapulseaudiooutput(streamingtoaremotepulseaudioserver)##audio_output{#type"pulse"#name"MyPulseOutput"##server"remote_server"#optional##sink"remote_server_sink"#optional#}###Example"pipe"output:##audio_output{#type"pipe"#name"mypipe"#command"aplay-fcd2>/dev/null"##Orifyou'rewanttouseAudioCompress#command"AudioCompress-m|aplay-fcd2>/dev/null"##OrtosendrawPCMstreamthroughPCM:#command"ncexample.org8765"#format"44100:16:2"#}###Anexampleofanulloutput(fornoaudiooutput):##audio_output{#type"null"#name"MyNullOutput"#mixer_type"none"#optional#}##Thissettingwillchangealldecodedaudiotobeconvertedtothespecified#formatbeforebeingpassedtotheaudiooutputs.Bydefault,thissettingis#disabled.##audio_output_format"44100:16:2"##IfMPDhasbeencompiledwithlibsampleratesupport,thissettingspecifies#thesamplerateconvertertouse.Possiblevaluescanbefoundinthe#mpd.confmanpageorthelibsampleratedocumentation.Bydefault,thisis#settingisdisabled.##samplerate_converter"FastestSincInterpolator"#################################################################################Normalizationautomaticvolumeadjustments####################################ThissettingspecifiesthetypeofReplayGaintouse.Thissettingcanhave#theargument"off","album"or"track".See<http://www.replaygain.org>
#formoredetails.Thissettingisoffbydefault.##replaygain"album"##Thissettingsetsthepre-ampusedforfilesthathaveReplayGaintags.By#defaultthissettingisdisabled.##replaygain_preamp"0"##Thissettingenableson-the-flynormalizationvolumeadjustment.Thiswill#resultinthevolumeofallplayingaudiotobeadjustedsotheoutputhas#equal"loudness".Thissettingisdisabledbydefault.##volume_normalization"no"#################################################################################MPDInternalBuffering########################################################Thissettingadjuststhesizeofinternaldecodedaudiobuffering.Changing#thismayhaveundesiredeffects.Don'tchangethisifyoudon'tknowwhatyou#aredoing.##audio_buffer_size"2048"##Thissettingcontrolsthepercentageofthebufferwhichisfilledbefore#beginningtoplay.Increasingthisreducesthechanceofaudiofileskipping,#atthecostofincreasedtimepriortoaudioplayback.##buffer_before_play"10%"#################################################################################ResourceLimitations##########################################################ThesesettingsarevariouslimitationstopreventMPDfromusingtoomany#resources.Generally,thesesettingsshouldbeminimizedtopreventsecurity#risks,dependingontheoperatingresources.##connection_timeout"60"#max_connections"10"#max_playlist_length"16384"#max_command_list_size"2048"#max_output_buffer_size"8192"#################################################################################CharacterEncoding############################################################Iffileordirectorynamesdonotdisplaycorrectlyforyourlocalethenyou#mayneedtomodifythissetting.##filesystem_charset"UTF-8"##ThissettingcontrolstheencodingthatID3v1tagsshouldbeconvertedfrom.##id3v1_encoding"ISO-8859-1"#################################################################################SIDPlaydecoder###############################################################songlength_database:#Locationofyoursonglengthsfile,asdistributedwiththeHVSC.#ThesidplaypluginchecksthisformatchingMD5fingerprints.#Seehttp://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
##default_songlength:#Thisisthedefaultplayingtimeinsecondsforsongsnotinthe#songlengthdatabase,orincaseyou'renotusingadatabase.#Avalueof0meansplayindefinitely.##filter:#TurnstheSIDfilteremulationonoroff.##decoder{#plugin"sidplay"#songlength_database"/media/C64Music/DOCUMENTS/Songlengths.txt"#default_songlength"120"#filter"true"#}################################################################################
audio_output {
type "httpd"
name "HTTP Stream"
encoder "lame" #to support safari on ios
port "8000"
bitrate "128"
format "44100:16:1"
always_on "yes"
tags "yes"
}