Comments (12)
This can be done without any change in the code of pulseaudio-dlna by loading default pulseaudio modules.
pactl load-module module-switch-on-connect
To make this work we will also have to disallow pulseaudio to restore a device's stream properties by editing the following line in default.pa
to
load-module module-stream-restore restore_device=false
A minor glitch is the sometimes rather lengthy renderer URL we need to give, which can only easily be found out by running pulseaudio-dlna in -debug mode. Any chance to shorten that in any way (e.g. device name)?
from pulseaudio-dlna.
Hello Takkat. Sorry for the late reply. Was a week in NY for business.
When i understand it correctly, you want a CLI option which enables you to select a single renderer from the list of the detected ones, right?
So, if you have just one renderer in your network everything works without any modification. You just have a problem when there is more than one, thats why you specifiy the renderer url yourself, besides that feature was never meant to be used that way 😄
from pulseaudio-dlna.
@Takkat-Nebuk I made a branch (feature/device-filter) which implements a --device-filter
option.
Can you check it out and report if thats suitable for you?
from pulseaudio-dlna.
@masmu hey thanks for coming back to this, it is a promising approach.
I can restrict discovery to only one device by saying e.g --device-filter [+bubble]
or [+TVUE40ES6100]
but if I say [+BubbleUPnP]
or [+tvue40es6100]
it will still discover and use both devices. It may be just me getting the options wrong but it appears a bit inconsistent.
Nevertheless I am quite happy with the option --renderer-urls
which gives me consistent and good results.
At present I make good progress in adding support for pulseaudio-dlna
to my GUI wrapper for several audio streaming solutions (stream2ip). We are now able to wait for a single renderer to become available then connect and automatically switch sinks. We can also disconnect/reconnect if this renderer was temporarily lost, all provided we had an URL of the device. At present I use the URL from the renderer URL I submit to pulseaudio-dlna --renderer-urls
.
Finding this URL is not so easy however. At present I use pulseaudio-dlna in --debug
mode to search for Response from upnp device
which usually is followed by the renderer URL. It would be nice if we had pulseaudio-dlna
running in normal non-debug mode to also print the renderer URLs in addition to the device names.
A really cool feature I would love to see would be an option --discover-only
when pulseaudio-dlna only prints discovered devices and their renderer URLs but then just quits without connecting to them. Finding the URLs (or parsing them in another application) would then be much much easier (and more consistent, --debug
mode certainly was not meant for that).
Finally, another feature (where I am not sure if and how this could be done easily) would be that pulseaudio-dlna
removed a sink from a renderer as soon as the renderer was disconnected. At present it will still show a sink of a lost device.
Hope this was not too much for now.
from pulseaudio-dlna.
@Takkat-Nebuk : I updated the branch and replaced the regular expression with plain text search.
So, regardless how many devices there are in your network, --device-filter="Wohnzimmer,Nexus 5"
will just find those both and --device-filter="Nexus 5"
just the one.
Could you explain me a little bit more what you are trying to build? 😄
from pulseaudio-dlna.
Well, may app "stream2ip" is a Gtk3 GUI wrapper for all kinds of audio network streaming solutions (it all started with supporting AirTunes for my AirportExpress I had). Over the years I added more and more other streaming solutions. The aim always was to just start stream2ip per a single mouse click (or even from autostart) and it will take care of everything else to switch pulseaudio to any streaming sink we had set up (e.g. RAOP device, Bluetooth device, Icecast server, pulseaudio RTP).
Now pulseaudio-dlna fits in rather nicely as it fills the gap to allow doing that for a DLNA renderer. If you are interested to can get it from https://launchpad.net/stream2ip/+download. It is all Python3 but may also run with Python2. Please don't look at the code, it's awful! It grew over the years without anybody (me) feeling like having time to put it in an appropriate shape. 😳
At present, if we run the setup routine to choose "DLNA live" we can search for a renderer with the looking glass button. This calls pulseaudio-dlna in debug mode just to get the renderer URL of a single DLNA device - then kills it again. A bit hacky, I know. That's where a --discover-only
option would come in handy, also to allow choosing from a list of devices (which then would need an additional window to be made).
The main program can be set up to wait a given interval for the renderer's IP to respond to a ping, only then call pulseaudio-dlna, and if a new sink was created, switch audio output to that sink. If that IP gets lost pulseaudio-dlna will be terminated, and the previous audio sink restored.
from pulseaudio-dlna.
- 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
from pulseaudio-dlna.
Thank you so much Massimo. We can now select from a renderer to support autoconnecting in stream2ip 1.0.8. 😃
After a successful discovery a little selection box will pop up:
In addition I thought it may be a good idea to also support other options for non-default sets. This can now be done either by giving in a full command set as options for "DLNA live" or by a configuration file padlna.cfg
in ~/.config/stream2ip/
to always add additional options before we call pulseaudio-dlna.
from pulseaudio-dlna.
Hi! Pulseaudio-dlna doesn't see the device on hostapd. I have ubuntu with the adjusted point of access of hostapd! When I start pulseaudio-dlna on this ubuntu, the devices connected to hostapd aren't found! Prompt please as to correct it?
from pulseaudio-dlna.
@lavaed Sorry, i really don't understand. Could you explain it a little bit more?
from pulseaudio-dlna.
Forgive for my English! I have ubuntu 14.04 server. And not a simple network configuration. I found out that the started pulseaudio-dlna on server works only with default a route. And options - host, - renderer-host don't help to find the device in a home network!
from pulseaudio-dlna.
Pulseaudio-dlna saw devices in a network after I added a route route add -net 239.255.255.250 netmask 255.255.255.255 wlan1!
Answer please! A sound delay at a pulseaudio-dlna broadcast of 13 seconds it is normal and whether it is possible to correct it?
from pulseaudio-dlna.
Related Issues (20)
- Chrome OS Support
- non-critical (?) error during setup of pulseaudio-dlna with Python 3.8
- The device "Living Room speaker (Chromecast)" failed to play! (500) - Unknown exception
- Outdated? 2020... HOT 3
- Any way to make this never the default ?
- ValueError: invalid literal for int() with base 10: '119,192.168.0.9' HOT 4
- Error after Kodi Update: pyupnpv2 - Connection timeout
- Don't work with pipewire-pulseaudio HOT 11
- "An exception happened" HOT 2
- Kubuntu 21.04 w/ backports HOT 1
- Is this project dead? HOT 1
- [not an issue] Addition to the Tested Device List: Allo Boss2 Player ruinning Moode UPNP (DLNA) - tested
- pulseaudio-dlna connects - but no sound! HOT 2
- Request 24 bit 96000 audio ouput
- Another request for FLAC 24/96 streaming
- Add support for OpenHome HOT 1
- Cannot add PPA: ''This PPA does not support focal''. HOT 1
- pulseaudio_dlna.streamserver provides wrong sample specs HOT 2
- Add more maintainers
- Propose another choice to stream audio to DLNA devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulseaudio-dlna.