Replacement for pulseaudio-dlna on Ubuntu 20.04 to stream music through DLNA
I would like to start music stream to DLNA receiver from Ubuntu 20.04.
I have created DLNA server already through Settings/Sharing/Media Sharing and I'm able to connect to it and play media files using DLNA receiver (some Denon network audio player), but I'm not able to "trigger" music play from Ubuntu side.
I found, that pulseaudio-dlna package would probably resolve my problem, but it looks like the newest supported Ubuntu version is 17.04. What are the alternatives?
Solution 1:
I had the same problem, as I am using Pop OS 20.04 and need to stream music to a raspberry running Volumio. The solution for me was to download the Debian version from https://packages.debian.org/sid/all/pulseaudio-dlna/download Greetings from Chile
Solution 2:
UPDATE at 22nd of February 2022 Versions 0.6.3 and 0.6.1 installed from Cygn/pulseaudio-dlna work just fine in my computer with following dependencies installed:
sudo apt install python3-pychromecast python3-setuptools python3-pip python3-docopt python3-chardet python3-gi python3-dbus python3-docopt python3-requests python3-setproctitle python3-protobuf python3-lxml python3-netifaces python3-zeroconf python3-urllib3 python3-psutil python3-pyroute2 python3-notify2 python3-distutils sox vorbis-tools lame flac opus-tools ffmpeg
and
sudo apt-get install virtualenv python-dev
The newest version 0.6.4 does not work - gives an error:
"pulseaudio-dlna-0.6.4/pulseaudio_dlna/plugins/chromecast/renderer.py", line 191, in from_pychromecast manufacturer=pychromecast.cast_info.manufacturer, AttributeError: 'Chromecast' object has no attribute 'cast_info'".
V. 0.6.2 I have not tried.
UPDATE at 16th of April 2021. None of the methods described below will work anymore. At the moment, pulseaudio-dlna installed with
sudo apt install pulseaudio-dlna
or with Muon, Synaptic or Discover won't work. The Fedora package might work (I don't know). However this new method will work: new pulseaudio-dlna with Python-3 libraries included
EDIT at 27th of October 2020.
Debian package did indeed work in Kubuntu 20.10 (I have updated from 20.04) when installed with Gdebi.
The first time I didn't use Gdebi and the secret may be that Gdebi found the necessary dependencies.
Debian package did not work in Kubuntu 20.04 while trying to render to Google Chromecast Audio, but installing from GitHub and following avodonosov's advice (thanks Anton) in https://github.com/masmu/pulseaudio-dlna/issues/401 worked!
He (and I) did the installation as Masmu advices in https://github.com/masmu/pulseaudio-dlna , except that we edited zeroconf
in setup.py
. (I didn't try without editing setup.py
- you might want to try that first).
For you who are amateurs like me, here's additional advice: Installing from GitHub creates a pulseaudio-dlna
directory in the home directory. After make
you can execute pulseaudio-dlna
from pulseaudio-dlna/bin
folder by clicking the pulseaudio-dlna
icon (if it is not executable yet, right click it and check the box "executable").
From terminal you can execute it by going to /home/username/pulseaudio-dlna/bin
and typing:
$ ./pulseaudio-dlna
Step-by-step direct commands to make pulseaudio-dlna
work in Kubuntu 20.04 (from avodonosov's answer);
Write/copy following commands in terminal:
sudo apt-get install python2.7 python-setuptools python-dbus python-docopt python-setproctitle python-gi python-protobuf python-psutil python-concurrent.futures python-chardet python-netifaces python-netaddr python-lxml vorbis-tools sox lame flac faac opus-tools
sudo apt-get install python2-dev
sudo apt-get install virtualenv
git clone https://github.com/masmu/pulseaudio-dlna.git
cd pulseaudio-dlna/
sudo nano setup.py
-
nano -command opens setup.py in nano-text editor
-
In
setup.py
replacezeroconf >= 0.17.4
withzeroconf-py2compat >=0.19.6
-
Press CTRL+O to write, ENTER to save and CTRL+X to leave nano.
make
After that pulseaudio-dlna
is executable and working in Kubuntu 20.04. The executable file pulseaudio-dlna
is in /home/user/pulseaudio-dlna/bin
.
There's also this https://github.com/masmu/pulseaudio-dlna/pull/404/commits/3a8eed687c2578ee368e826ccfd47045f31128ef that ports pulseaudio-dlna to python 3.8 and is compatible with Ubuntu 20.04 and tested with Google Chromecast
Hint for everybody: Make your life easier and put pulseaudio-dlna
to autostart list in System Settings, so it automatically starts when you turn your computer on. In KDE Plasma (inc. Kubuntu) go to: System-Settings/Start-and-Stop/Automatic-Start and add pulseaudio-dlna
to programs list. (Of course you already have Yakuake there?).
(You have to install pulseaudio-dlna
with make install
if you want to have it in autostart list).
P.S. In my Fedora 32 KDE pulseaudio-dlna works out of the box when installed from https://copr.fedoraproject.org/coprs/cygn/pulseaudio-dlna/