mpd.conf 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. # An example configuration file for MPD.
  2. # Read the user manual for documentation: http://www.musicpd.org/doc/user/
  3. # Files and directories #######################################################
  4. #
  5. # This setting controls the top directory which MPD will search to discover the
  6. # available audio files and add them to the daemon's online database. This
  7. # setting defaults to the XDG directory, otherwise the music directory will be
  8. # be disabled and audio files will only be accepted over ipc socket (using
  9. # file:// protocol) or streaming files over an accepted protocol.
  10. #
  11. music_directory "~/Music"
  12. #
  13. # This setting sets the MPD internal playlist directory. The purpose of this
  14. # directory is storage for playlists created by MPD. The server will use
  15. # playlist files not created by the server but only if they are in the MPD
  16. # format. This setting defaults to playlist saving being disabled.
  17. #
  18. playlist_directory "~/.config/mpd/playlists"
  19. #
  20. # This setting sets the location of the MPD database. This file is used to
  21. # load the database at server start up and store the database while the
  22. # server is not up. This setting defaults to disabled which will allow
  23. # MPD to accept files over ipc socket (using file:// protocol) or streaming
  24. # files over an accepted protocol.
  25. #
  26. db_file "~/.config/mpd/database"
  27. #
  28. # These settings are the locations for the daemon log files for the daemon.
  29. # These logs are great for troubleshooting, depending on your log_level
  30. # settings.
  31. #
  32. # The special value "syslog" makes MPD use the local syslog daemon. This
  33. # setting defaults to logging to syslog, otherwise logging is disabled.
  34. #
  35. log_file "~/.config/mpd/log"
  36. #
  37. # This setting sets the location of the file which stores the process ID
  38. # for use of mpd --kill and some init scripts. This setting is disabled by
  39. # default and the pid file will not be stored.
  40. #
  41. pid_file "~/.config/mpd/pid"
  42. #
  43. # This setting sets the location of the file which contains information about
  44. # most variables to get MPD back into the same general shape it was in before
  45. # it was brought down. This setting is disabled by default and the server
  46. # state will be reset on server start up.
  47. #
  48. state_file "~/.config/mpd/state"
  49. #
  50. # The location of the sticker database. This is a database which
  51. # manages dynamic information attached to songs.
  52. #
  53. sticker_file "~/.config/mpd/sticker.sql"
  54. #
  55. ###############################################################################
  56. # General music daemon options ################################################
  57. #
  58. # This setting specifies the user that MPD will run as. MPD should never run as
  59. # root and you may use this setting to make MPD change its user ID after
  60. # initialization. This setting is disabled by default and MPD is run as the
  61. # current user.
  62. #
  63. #user "nobody"
  64. #
  65. # This setting specifies the group that MPD will run as. If not specified
  66. # primary group of user specified with "user" setting will be used (if set).
  67. # This is useful if MPD needs to be a member of group such as "audio" to
  68. # have permission to use sound card.
  69. #
  70. #group "nogroup"
  71. #
  72. # This setting sets the address for the daemon to listen on. Careful attention
  73. # should be paid if this is assigned to anything other then the default, any.
  74. # This setting can deny access to control of the daemon. Not effective if
  75. # systemd socket activiation is in use.
  76. #
  77. # For network
  78. #bind_to_address "any"
  79. #
  80. # And for Unix Socket
  81. #bind_to_address "~/.mpd/socket"
  82. #
  83. # This setting is the TCP port that is desired for the daemon to get assigned
  84. # to.
  85. #
  86. #port "6600"
  87. #
  88. # This setting controls the type of information which is logged. Available
  89. # setting arguments are "default", "secure" or "verbose". The "verbose" setting
  90. # argument is recommended for troubleshooting, though can quickly stretch
  91. # available resources on limited hardware storage.
  92. #
  93. #log_level "default"
  94. #
  95. # If you have a problem with your MP3s ending abruptly it is recommended that
  96. # you set this argument to "no" to attempt to fix the problem. If this solves
  97. # the problem, it is highly recommended to fix the MP3 files with vbrfix
  98. # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
  99. # point gapless MP3 playback can be enabled.
  100. #
  101. #gapless_mp3_playback "yes"
  102. #
  103. # Setting "restore_paused" to "yes" puts MPD into pause mode instead
  104. # of starting playback after startup.
  105. #
  106. restore_paused "yes"
  107. #
  108. # This setting enables MPD to create playlists in a format usable by other
  109. # music players.
  110. #
  111. #save_absolute_paths_in_playlists "no"
  112. #
  113. # This setting defines a list of tag types that will be extracted during the
  114. # audio file discovery process. The complete list of possible values can be
  115. # found in the user manual.
  116. #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
  117. #
  118. # This setting enables automatic update of MPD's database when files in
  119. # music_directory are changed.
  120. #
  121. auto_update "yes"
  122. #
  123. # Limit the depth of the directories being watched, 0 means only watch
  124. # the music directory itself. There is no limit by default.
  125. #
  126. #auto_update_depth "3"
  127. auto_update_depth "10"
  128. #
  129. ###############################################################################
  130. # Symbolic link behavior ######################################################
  131. #
  132. # If this setting is set to "yes", MPD will discover audio files by following
  133. # symbolic links outside of the configured music_directory.
  134. #
  135. #follow_outside_symlinks "yes"
  136. #
  137. # If this setting is set to "yes", MPD will discover audio files by following
  138. # symbolic links inside of the configured music_directory.
  139. #
  140. #follow_inside_symlinks "yes"
  141. #
  142. ###############################################################################
  143. # Zeroconf / Avahi Service Discovery ##########################################
  144. #
  145. # If this setting is set to "yes", service information will be published with
  146. # Zeroconf / Avahi.
  147. #
  148. #zeroconf_enabled "yes"
  149. #
  150. # The argument to this setting will be the Zeroconf / Avahi unique name for
  151. # this MPD server on the network.
  152. #
  153. #zeroconf_name "Music Player"
  154. #
  155. ###############################################################################
  156. # Permissions #################################################################
  157. #
  158. # If this setting is set, MPD will require password authorization. The password
  159. # setting can be specified multiple times for different password profiles.
  160. #
  161. #password "password@read,add,control,admin"
  162. #
  163. # This setting specifies the permissions a user has who has not yet logged in.
  164. #
  165. #default_permissions "read,add,control,admin"
  166. #
  167. ###############################################################################
  168. # Database #######################################################################
  169. #
  170. #database {
  171. # plugin "proxy"
  172. # host "other.mpd.host"
  173. # port "6600"
  174. #}
  175. # Input #######################################################################
  176. #
  177. input {
  178. plugin "curl"
  179. # proxy "proxy.isp.com:8080"
  180. # proxy_user "user"
  181. # proxy_password "password"
  182. }
  183. #
  184. ###############################################################################
  185. # Audio Output ################################################################
  186. #
  187. # MPD supports various audio output types, as well as playing through multiple
  188. # audio outputs at the same time, through multiple audio_output settings
  189. # blocks. Setting this block is optional, though the server will only attempt
  190. # autodetection for one sound card.
  191. #
  192. # An example of an ALSA output:
  193. #
  194. #audio_output {
  195. # type "alsa"
  196. # name "My ALSA Device"
  197. ## device "hw:0,0" # optional
  198. ## mixer_type "hardware" # optional
  199. ## mixer_device "default" # optional
  200. ## mixer_control "PCM" # optional
  201. ## mixer_index "0" # optional
  202. #}
  203. #
  204. # An example of an OSS output:
  205. #
  206. #audio_output {
  207. # type "oss"
  208. # name "My OSS Device"
  209. ## device "/dev/dsp" # optional
  210. ## mixer_type "hardware" # optional
  211. ## mixer_device "/dev/mixer" # optional
  212. ## mixer_control "PCM" # optional
  213. #}
  214. #
  215. # An example of a shout output (for streaming to Icecast):
  216. #
  217. #audio_output {
  218. # type "shout"
  219. # encoder "vorbis" # optional
  220. # name "My Shout Stream"
  221. # host "localhost"
  222. # port "8000"
  223. # mount "/mpd.ogg"
  224. # password "hackme"
  225. # quality "5.0"
  226. # bitrate "128"
  227. # format "44100:16:1"
  228. ## protocol "icecast2" # optional
  229. ## user "source" # optional
  230. ## description "My Stream Description" # optional
  231. ## url "http://example.com" # optional
  232. ## genre "jazz" # optional
  233. ## public "no" # optional
  234. ## timeout "2" # optional
  235. ## mixer_type "software" # optional
  236. #}
  237. #
  238. # An example of a recorder output:
  239. #
  240. #audio_output {
  241. # type "recorder"
  242. # name "My recorder"
  243. # encoder "vorbis" # optional, vorbis or lame
  244. # path "/var/lib/mpd/recorder/mpd.ogg"
  245. ## quality "5.0" # do not define if bitrate is defined
  246. # bitrate "128" # do not define if quality is defined
  247. # format "44100:16:1"
  248. #}
  249. #
  250. # An example of a httpd output (built-in HTTP streaming server):
  251. #
  252. #audio_output {
  253. # type "httpd"
  254. # name "My HTTP Stream"
  255. # encoder "vorbis" # optional, vorbis or lame
  256. # port "8000"
  257. # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
  258. ## quality "5.0" # do not define if bitrate is defined
  259. # bitrate "128" # do not define if quality is defined
  260. # format "44100:16:1"
  261. # max_clients "0" # optional 0=no limit
  262. #}
  263. #
  264. # An example of a pulseaudio output (streaming to a remote pulseaudio server)
  265. #
  266. #audio_output {
  267. # type "pulse"
  268. # name "My Pulse Output"
  269. ## server "remote_server" # optional
  270. ## sink "remote_server_sink" # optional
  271. #}
  272. #
  273. # An example of a winmm output (Windows multimedia API).
  274. #
  275. #audio_output {
  276. # type "winmm"
  277. # name "My WinMM output"
  278. ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
  279. # or
  280. ## device "0" # optional
  281. ## mixer_type "hardware" # optional
  282. #}
  283. #
  284. # An example of an openal output.
  285. #
  286. #audio_output {
  287. # type "openal"
  288. # name "My OpenAL output"
  289. ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
  290. #}
  291. #
  292. # An example of an sndio output.
  293. #
  294. #audio_output {
  295. # type "sndio"
  296. # name "sndio output"
  297. # mixer_type "software"
  298. #}
  299. #
  300. # An example of an OS X output:
  301. #
  302. #audio_output {
  303. # type "osx"
  304. # name "My OS X Device"
  305. ## device "Built-in Output" # optional
  306. ## channel_map "-1,-1,0,1" # optional
  307. #}
  308. #
  309. ## Example "pipe" output:
  310. #
  311. #audio_output {
  312. # type "pipe"
  313. # name "my pipe"
  314. # command "aplay -f cd 2>/dev/null"
  315. ## Or if you're want to use AudioCompress
  316. # command "AudioCompress -m | aplay -f cd 2>/dev/null"
  317. ## Or to send raw PCM stream through PCM:
  318. # command "nc example.org 8765"
  319. # format "44100:16:2"
  320. #}
  321. #
  322. ## An example of a null output (for no audio output):
  323. #
  324. #audio_output {
  325. # type "null"
  326. # name "My Null Output"
  327. # mixer_type "none" # optional
  328. #}
  329. #
  330. ###############################################################################
  331. # Normalization automatic volume adjustments ##################################
  332. #
  333. # This setting specifies the type of ReplayGain to use. This setting can have
  334. # the argument "off", "album", "track" or "auto". "auto" is a special mode that
  335. # chooses between "track" and "album" depending on the current state of
  336. # random playback. If random playback is enabled then "track" mode is used.
  337. # See <http://www.replaygain.org> for more details about ReplayGain.
  338. # This setting is off by default.
  339. #
  340. #replaygain "album"
  341. #
  342. # This setting sets the pre-amp used for files that have ReplayGain tags. By
  343. # default this setting is disabled.
  344. #
  345. #replaygain_preamp "0"
  346. #
  347. # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
  348. # By default this setting is disabled.
  349. #
  350. #replaygain_missing_preamp "0"
  351. #
  352. # This setting enables or disables ReplayGain limiting.
  353. # MPD calculates actual amplification based on the ReplayGain tags
  354. # and replaygain_preamp / replaygain_missing_preamp setting.
  355. # If replaygain_limit is enabled MPD will never amplify audio signal
  356. # above its original level. If replaygain_limit is disabled such amplification
  357. # might occur. By default this setting is enabled.
  358. #
  359. #replaygain_limit "yes"
  360. #
  361. # This setting enables on-the-fly normalization volume adjustment. This will
  362. # result in the volume of all playing audio to be adjusted so the output has
  363. # equal "loudness". This setting is disabled by default.
  364. #
  365. #volume_normalization "no"
  366. #
  367. ###############################################################################
  368. # Character Encoding ##########################################################
  369. #
  370. # If file or directory names do not display correctly for your locale then you
  371. # may need to modify this setting.
  372. #
  373. #filesystem_charset "UTF-8"
  374. #
  375. ###############################################################################
  376. audio_output {
  377. type "pulse"
  378. name "pulse audio"
  379. mixer_type "software"
  380. }
  381. ## Add visualizer for ncmpcpp
  382. audio_output {
  383. type "fifo"
  384. name "toggle_visualizer"
  385. path "/tmp/mpd.fifo"
  386. format "44100:16:2"
  387. }