This is pulseaudio-dlna. A small DLNA server which brings DLNA / UPNP support to PulseAudio and Linux.
It can stream your current PulseAudio playback to different UPNP devices (UPNP Media Renderers) in your network. It's main goals are: easy to use, no configuration hassle, no big dependencies.
pulseaudio-dlna is licensed under GPLv3.
pulseaudio-dlna is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pulseaudio-dlna is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pulseaudio-dlna. If not, see <http://www.gnu.org/licenses/>.
If I could help you or if you like my work, you can buy me a coffee, a beer or pizza.
-
0.3.5 - (2015-04-09)
- Fixed a bug where Sonos description XML could not get parsed correctly
-
0.3.4 - (2015-03-22)
- Fixed Makefile for launchpad
-
0.3.3 - (2015-03-22)
- Added the
--filter-device
option - Send 2 SSDP packets by default for better UPNP device discovery
- Added virtualenv for local installation
- Added the
-
0.3.2 - (2015-03-14)
- Added the Opus Encoder (new dependency:
opus-tools
) (thanks to MobiusHorizons) - Fixed a bug where an empty UPNP device name made the application crash
- Added a missing dependency (
python-gobject
)
- Added the Opus Encoder (new dependency:
-
0.3.1 - (2015-02-13)
- Fixed a bug so that AVTransports other than 1 can be used (thanks to martin-insulander-info)
-
0.3.0 - (2015-02-01)
- Added debian packaging
- Added proper signal handlers (new dependency:
python-setproctitle
) - Fixed a bug where binding to an already used port made the application crash
- HTTP charset encoding is now specified correctly
-
0.2.4 - (2015-01-25)
- Stream changes are now handled correctly (thanks to Takkat-Nebuk)
-
0.2.3 - (2015-01-21)
- Fixed a timing bug where the pulseaudio module was not loaded fast enough (thanks to Takkat-Nebuk)
-
0.2.2 - (2015-01-18)
- Fixed encoding issues
- Try to load the DBus module if it is not loaded before (thanks to Takkat-Nebuk)
-
0.2.1 - (2015-01-11)
- TTL changed to 10 and timeout to 5 for UDP broadcasting
- Added the
--renderer-urls
option to manually add UPNP devices via their control url - Added the
--debug
flag - The host ip address is now discovered automatically, no need to specifiy
--host
anymore
Ubuntu users can install pulseaudio-dlna via the following repository.
sudo apt-add-repository ppa:qos/pulseaudio-dlna
sudo apt-get update
sudo apt-get install pulseaudio-dlna
After that you can start pulseaudio-dlna via:
pulseaudio-dlna
Head over the the using section for further instructions.
Other linux users can clone this git repository, make sure you have all the dependencies installed and the PulseAudio DBus module is loaded.
These are the requirements pulseaudio-dlna acutally needs to run. These dependencies will get installed if you install it via the PPA.
- python2.7
- python-pip
- python-dbus
- python-beautifulsoup
- python-docopt
- python-requests
- python-setproctitle
- python-gobject
- vorbis-tools
- sox
- lame
- flac
- opus-tools
You can install all the dependencies in Ubuntu via:
sudo apt-get install python2.7 python-pip python-dbus python-beautifulsoup python-docopt python-requests python-setproctitle python-gobject vorbis-tools sox lame flac opus-tools
Since version 0.2.2 the DBus module should be loaded automatically, if it was not loaded before. It that does not work, you can load the DBus module in Ubuntu via the following command. Note that you have to do this every time you restart PulseAudio (or your computer).
pacmd load-module module-dbus-protocol
Or to make changes persistant edit the file /etc/pulse/default.pa
with your
favorite editor and append the following line:
load-module module-dbus-protocol
The recommend method of using pulseaudio-dlna is to install it local to a python virtualenv. In that way you will keep your system clean. If you don't like it anymore, just delete the folder. For that method you need some additional dependencies.
- python-virtualenv
- python-dev
You can install all the dependencies in Ubuntu via:
sudo apt-get install python-virtualenv python-dev
Change to the project root folder and start the installation via:
make venv
After that you can start pulseaudio-dlna via:
bin/pulseaudio-dlna
Since some people like it more to install software globally, you can do that too. In many software projects this is the default installation method.
Change to the root folder and start the installation via:
make install
After that you can start pulseaudio-dlna via:
pulseaudio-dlna
pulseaudio-dlna should detect the ip address your computer is reachable within
your local area network. If the detected ip address is not correct or there
were no ips found, you still can specifiy them yourself via the host
option (--host <your-ip>
)
Right after startup it should start searching for UPNP devices in your LAN and add new PulseAudio sinks. After 5 seconds the progress is complete and you can select your UPNP renderers from the default audio control.
In case you just want to stream single audio streams to your UPNP devices you
can do this via pavucontrol
.
You can install pavucontrol
in Ubuntu via the following command:
sudo apt-get install pavucontrol
Note that pulseaudio-dlna has to run all the time while you are listening to your music. If you stop pulseaudio-dlna it will cleanly remove the created UPNP devices from PulseAudio and your UPNP devices will stop playing.
Also note that pulseaudio-dlna won't search for additional UPNP devices after startup. It just does this once and (for me) there is no need in continuously doing that. So if you added a new UPNP device to your network, restart pulseaudio-dlna.
Usage:
pulseaudio-dlna [--host <host>] [--port <port>] [--encoder <encoder>] [--filter-device=<filter-device>] [--renderer-urls <urls>] [--debug]
pulseaudio-dlna [-h | --help | --version]
Options:
--host=<host> Set the server ip.
-p --port=<port> Set the server port [default: 8080].
-e --encoder=<encoder> Set the audio encoder [default: lame].
Possible encoders are:
- lame MPEG Audio Layer III (MP3)
- ogg Ogg Vorbis
- flac Free Lossless Audio Codec (FLAC)
- wav Waveform Audio File Format (WAV)
- opus Opus Interactive Audio Codec (OPUS)
--filter-device=<filter-device> Set a name filter for devices which should be added.
Devices which get discovered, but won't match the
filter text will be skipped.
--renderer-urls=<urls> Set the renderer urls yourself. no discovery will commence.
--debug enables detailed debug messages.
-v --version Show the version.
-h --help Show the help.
Samples:
pulseaudio-dlna
will start pulseaudio-dlna on port 8080 and stream your PulseAudio streams encoded with mp3.pulseaudio-dlna --encoder ogg
will start pulseaudio-dlna on port 8080 and stream your PulseAudio streams encoded with Ogg Vorbis.pulseaudio-dlna --port 10291 --encoder flac
will start pulseaudio-dlna on port 10291 and stream your PulseAudio streams encoded with FLAC.pulseaudio-dlna --filter-device 'Nexus 5,TV'
will just use devices named Nexus 5 or TV even when more devices got discovered.pulseaudio-dlna --renderer-urls http://192.168.1.7:7676/smp_10_
won't discover upnp devices by itself. Instead it will search for upnp renderers at the specified locations. You can specify multiple locations via urls seperated by comma (,). Most users won't ever need this option, but since UDP multicast packages won't work (most times) over VPN connections this is very useful if you ever plan to stream to a UPNP device over VPN.
pulseaudio-dlna was successfully tested on the follwing devices / applications:
- D-Link DCH-M225/E
- Cocy UPNP media renderer
- BubbleUPnP (Android App)
- Samsung Smart TV LED60 (UE60F6300)
- Samsung Smart TV LED40 (UE40ES6100)
- Xbmc / Kodi
- Philips Streamium NP2500 Network Player
- Yamaha RX-475 (AV Receiver)
- Majik DSM
- Pi MusicBox
- Raumfeld Speaker M
pulseaudio-dlna supports the following encoders:
- lame MPEG Audio Layer III (MP3)
- ogg Ogg Vorbis
- flac Free Lossless Audio Codec (FLAC)
- wav Waveform Audio File Format (WAV)
- opus Opus Interactive Audio Codec (OPUS)