Package: pa-dlna
pa-dlnaforwards audio streams to DLNA devices.A Python project based onasyncio, that usesctypesto interface with thelibpulselibrary and supports the PulseAudio and PipeWire[1]sound
servers.pa-dlnais composed of the following components:Thepa-dlnaprogram forwards PulseAudio streams to DLNA devices.Theupnp-cmdis an interactive command line tool for introspection and
control of UPnP devices[2].The UPnP Python package is used by both commands.The libpulse Python package is a ctypes interface to thelibpulselibrary.See thepa-dlnadocumentation.RequirementsPython version 3.8 or more recent.psutilThe built-in UPnP package  and therefore theupnp-cmdandpa-dlnacommands depend on thepsutilPython package. This package is available in
most distributions aspython3-psutilorpython-psutil. It can also be
installed withpip.parecpa-dlnauses the pulseaudioparecprogram[3]. Depending on the linux
distribution it may be already installed as a dependency of pulseaudio or of
pipewire-pulse. If not, then the package that ownsparecmust be
installed. On archlinux the package name islibpulse, on debian it ispulseaudio-utils.EncodersNo other dependency is required bypa-dlnawhen the DLNA devices support raw
PCM L16 (RFC 2586)[4].Optionally, encoders compatible with the audio mime types supported by the
devices may be used.pa-dlnacurrently supports theffmpeg(mp3, wav,
aiff, flac, opus, vorbis, aac), theflacand thelame(mp3) encoders. The
list of supported encoders, whether they are available on this host and their
options, is printed by the command that prints the default configuration:$ pa-dlna --dump-defaultpavucontrolOptionally, one may install thepavucontrolpackage for easier management of
associations between sound sources and DLNA devices.Installationpipewire as a pulseaudio sound serverThepipsewire,pipewire-pulseandwireplumberpackages must be
installed and the corresponding programs started. If you are switching from
pulseaudio, make sure to remove/etc/pulse/client.confor to comment out the
setting ofdefault-serverin this file as pulseaudio and pipewire do not use
the same unix socket path name.Theparec‘s package includes thepactlprogram. One may check that the
installation of pipewire as a pulseaudio sound server is successfull by running
the command:$ pactl infopa-dlnaInstallpa-dlnawith pip:$ python -m pip install pa-dlnaConfigurationApa-dlna.confuser configuration file overriding the default configuration
may be used to:Change the preferred encoders ordered list used to select an encoder.Configure encoder options.Set an encoder for a given device and configure the options for this device.Configure thesample_format,rateandchannelsparameters of theparecprogram used to forward PulseAudio streams, for a specific device,
for an encoder type or for all devices.See theconfigurationsection of thepa-dlnadocumentation.[1]When using PipeWire with the Wireplumber session manager,pa-dlnamust be started before the audio streams that are routed to DLNA
devices. Re-starting those audio  streams fixes the problem. Seepa-dlna
issue 15andWireplumber issue 511.[2]Thepa-dlnaandupnp-cmdprograms can be run simultaneously.[3]Theparecprogram also uses thelibpulselibrary which is
included inparec‘s package or is installed as a dependency. Note
also that this package includes thepactlandpacmdprograms.[4]DLNA devices must support the HTTP GET transfer protocol and must support
HTTP 1.1 as specified by Annex A.1 of theConnectionManager:3 ServiceUPnP specification.