pa-dlna forwards audio streams to DLNA devices.
A Python project based on asyncio, that uses ctypes to interface with the libpulse library and supports the PulseAudio and PipeWire [1] sound servers.
pa-dlna is composed of the following components:
The pa-dlna program forwards PulseAudio streams to DLNA devices.
The upnp-cmd is an interactive command line tool for introspection and control of UPnP devices [2].
The UPnP Python sub-package is used by both commands.
The documentation is hosted at Read the Docs:
The stable documentation of the last released version.
The latest documentation of the current GitLab development version.
To access the documentation as a pdf document one must click on the icon at the down-right corner of any page. It allows to switch between stable and latest versions and to select the corresponding pdf document.
Requirements
Python version 3.11 or more recent.
psutil and h11
The UPnP sub-package and therefore the upnp-cmd and pa-dlna commands depend on the psutil and h11 Python packages. These packages are available in most distributions as python3-psutil or python-psutil and python3-h11 or python-h11. They will be installed by pip as a dependency of pa-dlna if not already installed as a package of the distribution.
libpulse
libpulse is a Python asyncio interface to the Pulseaudio and Pipewire libpulse library. It was a sub-package of pa-dlna and has become a full-fledged package on PyPi. It will be installed by pip as a dependency of pa-dlna.
parec
pa-dlna uses the pulseaudio parec program [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 owns parec must be installed. On archlinux the package name is libpulse, on debian it is pulseaudio-utils.
systemd
The python-systemd package is required to run the pa-dlna systemd service unit. It is packaged by almost all Linux distributions but under different names. To install the package from a Linux distribution or from PYPi, see the Installation section on the main page of the python-systemd git repository.
Encoders
No other dependency is required by pa-dlna when 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-dlna currently supports the ffmpeg (mp3, wav, aiff, flac, opus, vorbis, aac), the flac and the lame (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-default
pavucontrol
Optionally, one may install the pavucontrol package for easier management of associations between sound sources and DLNA devices.
Installation
pipewire as a pulseaudio sound server
The pipewire, pipewire-pulse and wireplumber packages must be installed and the corresponding programs started. If you are switching from pulseaudio, make sure to remove /etc/pulse/client.conf or to comment out the setting of default-server in this file as pulseaudio and pipewire do not use the same unix socket path name.
The parec ‘s package includes the pactl program. One may check that the installation of pipewire as a pulseaudio sound server is successfull by running the command:
$ pactl info
pa-dlna
Install pa-dlna with pip:
$ python -m pip install pa-dlna
Configuration
A pa-dlna.conf user 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 the sample_format, rate and channels parameters of the parec program used to forward PulseAudio streams, for a specific device, for an encoder type or for all devices.
See the configuration section of the pa-dlna documentation.
Metadata
Release files for pa-dlna 2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pa_dlna-2.0.tar.gz | 219.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pa_dlna-2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 457.3 kB
Release files / pa_dlna-2.0.tar.gz
| Download URL | pa_dlna-2.0.tar.gz |
|---|---|
| Size | 219.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a7251ae9227716b29cb06063045261a1eb2e97c98dc816fa7664c417c07dba0
|
|
BLAKE2b-256 checksum How to use checksums |
8559502f3223e4a447c2501c9acb72727ca48a3e001bc7cc22e3b3e6ba67e07c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / pa_dlna-2.0-py3-none-any.whl
| Download URL | pa_dlna-2.0-py3-none-any.whl |
|---|---|
| Size | 238.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b46a80a570d920c1e10694de5c03d1bbb3304aed191fd0a8b1fc15d8d703b3da
|
|
BLAKE2b-256 checksum How to use checksums |
9af642dd74bddc941ee8327f9fd6faa0ba3ecbacfe3dd49f16d582390e40cc2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Security for pa-dlna 2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.