Skip to main content

Forward pulseaudio streams to DLNA devices.

Project description

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.

See the pa-dlna documentation.

Requirements

Python version 3.8 or more recent.

psutil

The UPnP sub-package and therefore the upnp-cmd and pa-dlna commands depend on the psutil Python package. This package is available in most distributions as python3-psutil or python-psutil. It 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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pa_dlna-0.14.tar.gz (100.7 kB view details)

Uploaded Source

Built Distribution

pa_dlna-0.14-py3-none-any.whl (100.9 kB view details)

Uploaded Python 3

File details

Details for the file pa_dlna-0.14.tar.gz.

File metadata

  • Download URL: pa_dlna-0.14.tar.gz
  • Upload date:
  • Size: 100.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for pa_dlna-0.14.tar.gz
Algorithm Hash digest
SHA256 e445e3a5af778f8fe060b44b124bb58b895e85345b56d22c7f0b2a22f7ab154d
MD5 8d381aa2809bf928402d5eca5455e6fa
BLAKE2b-256 1d9fb91422b4b17643942c8ca99c7cf3ac7554b81baebcab5deae7c6617d72c4

See more details on using hashes here.

File details

Details for the file pa_dlna-0.14-py3-none-any.whl.

File metadata

  • Download URL: pa_dlna-0.14-py3-none-any.whl
  • Upload date:
  • Size: 100.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for pa_dlna-0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 2effbd962335a5e34fd235ef54b55d4a742173881c6de840799336a7efad2bad
MD5 e1fe4b799e9bd7d6edb03f74d1a96174
BLAKE2b-256 2b5084272fc534fb433f21509f5ea193766abaa16f39a815a73374cfed89f709

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page