Nächste: , Vorige: , Nach oben: Dienste   [Inhalt][Index]


12.9.28 Audio-Dienste

Das Modul (gnu services audio) stellt einen Dienst zur Verfügung, um MPD (den Music Player Daemon) zu starten.

Music Player Daemon

Der Music Player Daemon (MPD) ist ein Dienst, der Musik abspielen kann und der dabei vom lokalen Rechner oder über das Netzwerk durch verschiedene Clients angesteuert werden kann.

Das folgende Beispiel zeigt, wie man mpd als Benutzer "bob" auf Port 6666 ausführen könnte. Dabei wird Pulseaudio zur Ausgabe verwendet.

(service mpd-service-type
         (mpd-configuration
          (user "bob")
          (port "6666")))
Variable: mpd-service-type

Der Diensttyp für mpd.

Datentyp: mpd-configuration

Datentyp, der die Konfiguration von mpd repräsentiert.

package (default: mpd) (type: file-like)

The MPD package.

user (default: "mpd") (type: string)

Das Benutzerkonto, mit dem mpd ausgeführt wird.

group (default: "mpd") (type: string)

The group to run mpd as.

shepherd-requirement (default: ()) (type: list-of-symbol)

This is a list of symbols naming Shepherd services that this service will depend on.

environment-variables (default: ()) (type: list-of-string)

A list of strings specifying environment variables.

log-file (default: "/var/log/mpd/log") (type: maybe-string)

The location of the log file. Set to syslog to use the local syslog daemon or %unset-value to omit this directive from the configuration file.

log-level (type: maybe-string)

Supress any messages below this threshold. Available values: notice, info, verbose, warning and error.

music-directory (type: maybe-string)

Das Verzeichis, in dem nach Musikdateien gesucht wird.

playlist-directory (type: maybe-string)

Das Verzeichnis, um Wiedergabelisten („Playlists“) zu speichern.

db-file (type: maybe-string)

Der Ort, an dem die Musikdatenbank gespeichert wird.

state-file (type: maybe-string)

Der Ort, an dem die Datei mit dem aktuellen Zustand von MPD gespeichert wird.

sticker-file (type: maybe-string)

Der Ort, an dem die Sticker-Datenbank gespeichert wird.

default-port (default: 6600) (type: maybe-integer)

The default port to run mpd on.

endpoints (type: maybe-list-of-string)

The addresses that mpd will bind to. A port different from default-port may be specified, e.g. localhost:6602 and IPv6 addresses must be enclosed in square brackets when a different port is used. To use a Unix domain socket, an absolute path or a path starting with ~ can be specified here.

database (type: maybe-mpd-plugin)

MPD database plugin configuration.

partitions (default: ()) (type: list-of-mpd-partition)

List of MPD "partitions".

neighbors (default: ()) (type: list-of-mpd-plugin)

List of MPD neighbor plugin configurations.

inputs (default: ()) (type: list-of-mpd-plugin)

List of MPD input plugin configurations.

archive-plugins (default: ()) (type: list-of-mpd-plugin)

List of MPD archive plugin configurations.

input-cache-size (type: maybe-string)

MPD input cache size.

decoders (default: ()) (type: list-of-mpd-plugin)

List of MPD decoder plugin configurations.

resampler (type: maybe-mpd-plugin)

MPD resampler plugin configuration.

filters (default: ()) (type: list-of-mpd-plugin)

List of MPD filter plugin configurations.

outputs (type: list-of-mpd-plugin-or-output)

Welche Tonausgaben MPD benutzen kann. Vorgegeben ist eine einzelne Ausgabe, die Pulseaudio benutzt.

playlist-plugins (default: ()) (type: list-of-mpd-plugin)

List of MPD playlist plugin configurations.

extra-options (default: ()) (type: alist)

An association list of option symbols/strings to string values to be appended to the configuration.

Data Type: mpd-plugin

Data type representing a mpd plugin.

plugin (type: maybe-string)

Plugin name.

name (type: maybe-string)

Name.

enabled? (type: maybe-boolean)

Whether the plugin is enabled/disabled.

extra-options (default: ()) (type: alist)

An association list of option symbols/strings to string values to be appended to the plugin configuration. See MPD plugin reference for available options.

Data Type: mpd-partition

Data type representing a mpd partition.

name (Typ: Zeichenkette)

Partition name.

extra-options (default: ()) (type: alist)

An association list of option symbols/strings to string values to be appended to the partition configuration. See Configuring Partitions for available options.

Datentyp: mpd-output

Data type representing a mpd audio output.

name (default: "MPD") (type: string)

Der Name der Tonausgabe.

type (default: "pulse") (type: string)

Der Typ der Tonausgabe.

enabled? (Vorgabe: #t) (Typ: Boolescher-Ausdruck)

Gibt an, ob diese Tonausgabe aktiviert sein soll, wenn MPD gestartet wird. Vorgegeben ist, alle Tonausgaben zu aktivieren. Das entspricht der Voreinstellung, wenn keine Zustandsdatei existiert; mit Zustandsdatei wird der Zustand von früher wiederhergestellt.

format (type: maybe-string)

Force a specific audio format on output. See Global Audio Format for a more detailed description.

tags? (default: #t) (type: boolean)

Wenn es auf #f steht, sendet MPD keine Tags an diese Ausgabe. Dies wird nur berücksichtigt, wenn das Ausgabe-Plugin Tags empfangen kann, wie beim httpd-Ausgabe-Plugin.

always-on? (default: #f) (type: boolean)

If set to #t, then MPD attempts to keep this audio output always open. This may be useful for streaming servers, when you don?t want to disconnect all listeners even when playback is accidentally stopped.

mixer-type (default: "none") (type: string)

This field accepts a string that specifies which mixer should be used for this audio output: the hardware mixer, the software mixer, the null mixer (allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer External Mixer) or no mixer (none).

replay-gain-handler (type: maybe-string)

This field accepts a string that specifies how Replay Gain is to be applied. software uses an internal software volume control, mixer uses the configured (hardware) mixer control and none disables replay gain on this audio output.

extra-options (default: ()) (type: alist)

An association list of option symbols/strings to string values to be appended to the audio output configuration.

The following example shows a configuration of mpd that configures some of its plugins and provides a HTTP audio streaming output.

(service mpd-service-type
         (mpd-configuration
           (outputs
             (list (mpd-output
                     (name "streaming")
                     (type "httpd")
                     (mixer-type 'null)
                     (extra-options
                      `((encoder . "vorbis")
                        (port    . "8080"))))))
           (decoders
             (list (mpd-plugin
                     (plugin "mikmod")
                     (enabled? #f))
                   (mpd-plugin
                     (plugin "openmpt")
                     (enabled? #t)
                     (extra-options `((repeat-count . -1)
                                      (interpolation-filter . 1))))))
           (resampler (mpd-plugin
                        (plugin "libsamplerate")
                        (extra-options `((type . 0)))))))

myMPD

myMPD is a web server frontend for MPD that provides a mobile friendly web client for MPD.

The following example shows a myMPD instance listening on port 80, with album cover caching disabled.

(service mympd-service-type
         (mympd-configuration
          (port 80)
          (covercache-ttl 0)))
Variable: mympd-service-type

The service type for mympd.

Data Type: mympd-configuration

Available mympd-configuration fields are:

package (default: mympd) (type: file-like)

The package object of the myMPD server.

shepherd-requirement (default: ()) (type: list-of-symbol)

This is a list of symbols naming Shepherd services that this service will depend on.

user (default: "mympd") (type: string)

Owner of the mympd process.

group (default: "nogroup") (type: string)

Owner group of the mympd process.

work-directory (default: "/var/lib/mympd") (type: string)

Where myMPD will store its data.

cache-directory (default: "/var/cache/mympd") (type: string)

Where myMPD will store its cache.

acl (type: maybe-mympd-ip-acl)

ACL to access the myMPD webserver.

covercache-ttl (default: 31) (type: maybe-integer)

How long to keep cached covers, 0 disables cover caching.

http? (default: #t) (type: boolean)

HTTP support.

host (default: "[::]") (type: string)

Host name to listen on.

port (default: 80) (type: maybe-port)

HTTP port to listen on.

log-level (default: 5) (type: integer)

How much detail to include in logs, possible values: 0 to 7.

log-to (default: "/var/log/mympd/log") (type: string-or-symbol)

Where to send logs. By default, the service logs to /var/log/mympd.log. The alternative is 'syslog, which sends output to the running syslog service under the ‘daemon’ facility.

lualibs (default: "all") (type: maybe-string)

See https://jcorporation.github.io/myMPD/scripting/#lua-standard-libraries.

uri (type: maybe-string)

Override URI to myMPD. See https://github.com/jcorporation/myMPD/issues/950.

script-acl (default: (mympd-ip-acl (allow '("127.0.0.1")))) (type: maybe-mympd-ip-acl)

ACL to access the myMPD script backend.

ssl? (default: #f) (type: boolean)

SSL/TLS support.

ssl-port (default: 443) (type: maybe-port)

Port to listen for HTTPS.

ssl-cert (type: maybe-string)

Path to PEM encoded X.509 SSL/TLS certificate (public key).

ssl-key (type: maybe-string)

Path to PEM encoded SSL/TLS private key.

pin-hash (type: maybe-string)

SHA-256 hashed pin used by myMPD to control settings access by prompting a pin from the user.

save-caches? (type: maybe-boolean)

Whether to preserve caches between service restarts.

Data Type: mympd-ip-acl

Available mympd-ip-acl fields are:

allow (default: ()) (type: list-of-string)

Allowed IP addresses.

deny (default: ()) (type: list-of-string)

Disallowed IP addresses.


Nächste: , Vorige: , Nach oben: Dienste   [Inhalt][Index]