You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

432 lines
13 KiB

2 years ago
  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 "~/Music/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 "~/.mpd/database"
  27. # These settings are the locations for the daemon log files for the daemon.
  28. #
  29. # The special value "syslog" makes MPD use the local syslog daemon. This
  30. # setting defaults to logging to syslog.
  31. #
  32. # If you use systemd, do not configure a log_file. With systemd, MPD
  33. # defaults to the systemd journal, which is fine.
  34. #
  35. #log_file "~/.mpd/log"
  36. # This setting sets the location of the file which stores the process ID
  37. # for use of mpd --kill and some init scripts. This setting is disabled by
  38. # default and the pid file will not be stored.
  39. #
  40. # If you use systemd, do not configure a pid_file.
  41. #
  42. #pid_file "~/.mpd/pid"
  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 "~/.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 "~/.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 than the default, any.
  74. # This setting can deny access to control of the daemon. Not effective if
  75. # systemd socket activation 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. # Suppress all messages below the given threshold. Use "verbose" for
  89. # troubleshooting. Available setting arguments are "notice", "info", "verbose",
  90. # "warning" and "error".
  91. #
  92. #log_level "notice"
  93. #
  94. # Setting "restore_paused" to "yes" puts MPD into pause mode instead
  95. # of starting playback after startup.
  96. #
  97. #restore_paused "no"
  98. #
  99. # This setting enables MPD to create playlists in a format usable by other
  100. # music players.
  101. #
  102. #save_absolute_paths_in_playlists "no"
  103. #
  104. # This setting defines a list of tag types that will be extracted during the
  105. # audio file discovery process. The complete list of possible values can be
  106. # found in the user manual.
  107. #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
  108. #
  109. # This example just enables the "comment" tag without disabling all
  110. # the other supported tags:
  111. #metadata_to_use "+comment"
  112. #
  113. # This setting enables automatic update of MPD's database when files in
  114. # music_directory are changed.
  115. #
  116. #auto_update "yes"
  117. #
  118. # Limit the depth of the directories being watched, 0 means only watch
  119. # the music directory itself. There is no limit by default.
  120. #
  121. #auto_update_depth "3"
  122. #
  123. ###############################################################################
  124. # Symbolic link behavior ######################################################
  125. #
  126. # If this setting is set to "yes", MPD will discover audio files by following
  127. # symbolic links outside of the configured music_directory.
  128. #
  129. #follow_outside_symlinks "yes"
  130. #
  131. # If this setting is set to "yes", MPD will discover audio files by following
  132. # symbolic links inside of the configured music_directory.
  133. #
  134. #follow_inside_symlinks "yes"
  135. #
  136. ###############################################################################
  137. # Zeroconf / Avahi Service Discovery ##########################################
  138. #
  139. # If this setting is set to "yes", service information will be published with
  140. # Zeroconf / Avahi.
  141. #
  142. #zeroconf_enabled "yes"
  143. #
  144. # The argument to this setting will be the Zeroconf / Avahi unique name for
  145. # this MPD server on the network. %h will be replaced with the hostname.
  146. #
  147. #zeroconf_name "Music Player @ %h"
  148. #
  149. ###############################################################################
  150. # Permissions #################################################################
  151. #
  152. # If this setting is set, MPD will require password authorization. The password
  153. # setting can be specified multiple times for different password profiles.
  154. #
  155. #password "password@read,add,control,admin"
  156. #
  157. # This setting specifies the permissions a user has who has not yet logged in.
  158. #
  159. #default_permissions "read,add,control,admin"
  160. #
  161. ###############################################################################
  162. # Database #######################################################################
  163. #
  164. # An example of a database section instead of the old 'db_file' setting.
  165. # It enables mounting other storages into the music directory.
  166. #
  167. #database {
  168. # plugin "simple"
  169. # path "~/.local/share/mpd/db
  170. # cache_directory "~/.local/share/mpd/cache"
  171. #}
  172. #
  173. # An example of database config for a satellite setup
  174. #
  175. #music_directory "nfs://fileserver.local/srv/mp3"
  176. #database {
  177. # plugin "proxy"
  178. # host "other.mpd.host"
  179. # port "6600"
  180. #}
  181. # Input #######################################################################
  182. #
  183. input {
  184. plugin "curl"
  185. # proxy "proxy.isp.com:8080"
  186. # proxy_user "user"
  187. # proxy_password "password"
  188. }
  189. #
  190. ###############################################################################
  191. # Audio Output ################################################################
  192. #
  193. # MPD supports various audio output types, as well as playing through multiple
  194. # audio outputs at the same time, through multiple audio_output settings
  195. # blocks. Setting this block is optional, though the server will only attempt
  196. # autodetection for one sound card.
  197. #
  198. # An example of an ALSA output:
  199. #
  200. #audio_output {
  201. # type "alsa"
  202. # name "My ALSA Device"
  203. ## device "hw:0,0" # optional
  204. ## mixer_type "hardware" # optional
  205. ## mixer_device "default" # optional
  206. ## mixer_control "PCM" # optional
  207. ## mixer_index "0" # optional
  208. #}
  209. #
  210. # An example of an OSS output:
  211. #
  212. #audio_output {
  213. # type "oss"
  214. # name "My OSS Device"
  215. ## device "/dev/dsp" # optional
  216. ## mixer_type "hardware" # optional
  217. ## mixer_device "/dev/mixer" # optional
  218. ## mixer_control "PCM" # optional
  219. #}
  220. #
  221. # An example of a shout output (for streaming to Icecast):
  222. #
  223. #audio_output {
  224. # type "shout"
  225. # encoder "vorbis" # optional
  226. # name "My Shout Stream"
  227. # host "localhost"
  228. # port "8000"
  229. # mount "/mpd.ogg"
  230. # password "hackme"
  231. # quality "5.0"
  232. # bitrate "128"
  233. # format "44100:16:1"
  234. ## protocol "icecast2" # optional
  235. ## user "source" # optional
  236. ## description "My Stream Description" # optional
  237. ## url "http://example.com" # optional
  238. ## genre "jazz" # optional
  239. ## public "no" # optional
  240. ## timeout "2" # optional
  241. ## mixer_type "software" # optional
  242. #}
  243. #
  244. # An example of a recorder output:
  245. #
  246. #audio_output {
  247. # type "recorder"
  248. # name "My recorder"
  249. # encoder "vorbis" # optional, vorbis or lame
  250. # path "/var/lib/mpd/recorder/mpd.ogg"
  251. ## quality "5.0" # do not define if bitrate is defined
  252. # bitrate "128" # do not define if quality is defined
  253. # format "44100:16:1"
  254. #}
  255. #
  256. # An example of a httpd output (built-in HTTP streaming server):
  257. #
  258. #audio_output {
  259. # type "httpd"
  260. # name "My HTTP Stream"
  261. # encoder "vorbis" # optional, vorbis or lame
  262. # port "8000"
  263. # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
  264. ## quality "5.0" # do not define if bitrate is defined
  265. # bitrate "128" # do not define if quality is defined
  266. # format "44100:16:1"
  267. # max_clients "0" # optional 0=no limit
  268. #}
  269. #
  270. # An example of a pulseaudio output (streaming to a remote pulseaudio server)
  271. #
  272. #audio_output {
  273. # type "pulse"
  274. # name "My Pulse Output"
  275. ## server "remote_server" # optional
  276. ## sink "remote_server_sink" # optional
  277. ## media_role "media_role" #optional
  278. #}
  279. #
  280. # An example of a winmm output (Windows multimedia API).
  281. #
  282. #audio_output {
  283. # type "winmm"
  284. # name "My WinMM output"
  285. ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
  286. # or
  287. ## device "0" # optional
  288. ## mixer_type "hardware" # optional
  289. #}
  290. #
  291. # An example of a wasapi output (Windows multimedia API).
  292. #
  293. #audio_output {
  294. # type "wasapi"
  295. # name "My WASAPI output"
  296. ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
  297. # or
  298. ## device "0" # optional
  299. ## Exclusive mode blocks all other audio source, and get best audio quality without resampling.
  300. ## exclusive "no" # optional
  301. ## Enumerate all devices in log.
  302. ## enumerate "no" # optional
  303. #}
  304. #
  305. # An example of an openal output.
  306. #
  307. #audio_output {
  308. # type "openal"
  309. # name "My OpenAL output"
  310. ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
  311. #}
  312. #
  313. # An example of an sndio output.
  314. #
  315. #audio_output {
  316. # type "sndio"
  317. # name "sndio output"
  318. # mixer_type "hardware"
  319. #}
  320. #
  321. # An example of an OS X output:
  322. #
  323. #audio_output {
  324. # type "osx"
  325. # name "My OS X Device"
  326. ## device "Built-in Output" # optional
  327. ## channel_map "-1,-1,0,1" # optional
  328. #}
  329. #
  330. ## Example "pipe" output:
  331. #
  332. #audio_output {
  333. # type "pipe"
  334. # name "my pipe"
  335. # command "aplay -f cd 2>/dev/null"
  336. ## Or if you're want to use AudioCompress
  337. # command "AudioCompress -m | aplay -f cd 2>/dev/null"
  338. ## Or to send raw PCM stream through PCM:
  339. # command "nc example.org 8765"
  340. # format "44100:16:2"
  341. #}
  342. #
  343. ## An example of a null output (for no audio output):
  344. #
  345. #audio_output {
  346. # type "null"
  347. # name "My Null Output"
  348. # mixer_type "none" # optional
  349. #}
  350. #
  351. ###############################################################################
  352. # Normalization automatic volume adjustments ##################################
  353. #
  354. # This setting specifies the type of ReplayGain to use. This setting can have
  355. # the argument "off", "album", "track" or "auto". "auto" is a special mode that
  356. # chooses between "track" and "album" depending on the current state of
  357. # random playback. If random playback is enabled then "track" mode is used.
  358. # See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for
  359. # more details about ReplayGain.
  360. # This setting is off by default.
  361. #
  362. #replaygain "album"
  363. #
  364. # This setting sets the pre-amp used for files that have ReplayGain tags. By
  365. # default this setting is disabled.
  366. #
  367. #replaygain_preamp "0"
  368. #
  369. # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
  370. # By default this setting is disabled.
  371. #
  372. #replaygain_missing_preamp "0"
  373. #
  374. # This setting enables or disables ReplayGain limiting.
  375. # MPD calculates actual amplification based on the ReplayGain tags
  376. # and replaygain_preamp / replaygain_missing_preamp setting.
  377. # If replaygain_limit is enabled MPD will never amplify audio signal
  378. # above its original level. If replaygain_limit is disabled such amplification
  379. # might occur. By default this setting is enabled.
  380. #
  381. #replaygain_limit "yes"
  382. #
  383. # This setting enables on-the-fly normalization volume adjustment. This will
  384. # result in the volume of all playing audio to be adjusted so the output has
  385. # equal "loudness". This setting is disabled by default.
  386. #
  387. #volume_normalization "no"
  388. #
  389. ###############################################################################
  390. # Character Encoding ##########################################################
  391. #
  392. # If file or directory names do not display correctly for your locale then you
  393. # may need to modify this setting.
  394. #
  395. #filesystem_charset "UTF-8"
  396. #
  397. ###############################################################################
  398. audio_output {
  399. type "fifo"
  400. name "Visualizer feed"
  401. path "/tmp/mpd.fifo"
  402. format "44100:16:2"
  403. }
  404. audio_output {
  405. type "pulse"
  406. name "pulseaudio output"
  407. #server "localhost" # optional
  408. #sink "alsa_output" # optional
  409. }