Comments (5)
The SWYH's DLNA server included for PCM and MP3 stream, one resource per network interface. So each stream is exposed on all your network interfaces of your machine.
For example, on my laptop I have 3 network interfaces (on 3 different networks), so each stream has 3 resources :
It's the responsibility of your DLNA Media Renderer to choose the correct resource that is available to it (IP of the same network).
Otherwise, in the "HTTP Live Streaming" window, I display the first IP address, but you can use anyone !
from swyh.
SWYH 1.4 is on Windows 7 with
eth0 192.168.0.5/255.255.255.0
eth1 172.16.0.5/255.255.255.0
VLC for iOS is on 192.168.0.20
Selecting "Music/Stream What You Hear MP3"
It tries to connect to 172.16.0.5:3727/stream/swyh.mp3
Connection fails
UPnP Device Architecture Version 1.1
"Multi-homed devices MUST send the search response using the same UPnP-enabled interface on which the search request was received. The URL specified in the LOCATION field value MUST specify an address that is reachable on that interface."
from swyh.
Hi dogbertai,
I have check the code and I do test with network analyzer (Wireshark & Upnp Device sniffer) ! SWYH is compliant the UPnP Device Architecture, the Location field is correctly specify the remote address !
SWYH listens on UDP port 1900 (SSDP) and when it receives a M-SEARCH request, it's reply HTTP 200 with Location set to the local address of the interface on which the search request was received ! For example, my laptop is on 3 different networks with Ipv4 & v6, so when I send a multicast M-SEARCH request on each interfaces, SWYH reply his correct location for each.
So SWYH is detectable and any UPnP/DLNA client can connect to the SOAP service on the correct IP address to discover the contents of the Media Server.
Once connected to the SWYH's SOAP service, VLC can now "see" the "Music" folder containing the two media streams (PCM & MP3). The fact that VLC can discover the contents of the SWYH's Media Server proves that network connectivity between VLC and SWYH is working well.
Then the two media streams ("audioItem.audioBroadcast") exposed by SWYH contains various properties such as title, artist, genre .... and a resources list that describes the media format (bitrate, bit, channel) and especially the URI (contentUri) for all network interfaces.
So if VLC can discover SWYH on your network and connect to the Media Server to get the media streams I don't think this is a bug in the implementation of UPnP / SSDP in SWYH. I think that VLC doesn't selects the right contenUri in the resources list of the media.
Maybe because your two network interfaces have the same network mask?
from swyh.
It's the responsibility of your DLNA Media Renderer to choose the correct resource that is available to it (IP of the same network).
Do you have a source for this?
I've been trying to search for more information.
One document I've seen states that most implementations only choose the first resource.
I've seen documents that refer to other attributes like protocol and bitrate, but I haven't seen anything that refer to discriminating based on IP address.
Are DLNA clients required to have a failover? If one resource fails, try the next?
I think the purpose of multiple resources is to provide content in different formats. I don't think it should be to list server-IPs other than the one the client already found and is talking to.
I understand these don't explicity say it, but here are more quotes with the same general idea from UPnP Device Architecture Version 1.1
However, as a general principle, related interactions between control points and devices (e.g. action control request and response messages, event subscription and event messages) MUST occur using the same pair of outgoing and incoming UPnP-enabled interfaces.
On a multi-homed device, all fully qualified URLs contained in response arguments that refer to resources on the device MUST be reachable on the UPnP-enabled interface on which the response message is sent.
On a multi-homed device, all fully-qualified URLs contained in event body that refer to resources on the device MUST be reachable on the UPnP-enabled interface on which the event message is sent.
from swyh.
Hi,
I have released a new version to fixes this issue : https://github.com/StreamWhatYouHear/SWYH/releases/tag/1.4.15258.0
I don't have any problem with other client than VLC (tested with Windows Media Player and Intel Media renderer) so I think that the DLNA client should try all resources.
But as I know the receiver IP used to query the ContentDirectory service, I have updated my code to include only this IP, so the resources, and especially the Content URI, are different depending on the caller. So the DLNA client will get only one IP, the same as he used to query service.
Best,
from swyh.
Related Issues (20)
- Volumio can see SWYH but says "Error: No Result" HOT 9
- Problem with deezer HOT 3
- Adding play to chromecast HOT 2
- Crash when switching to PCM. HOT 1
- Yamaha R-N602 streaming PCM not working. HOT 2
- Audiocast not found
- SWYH crash when startup, if virtual mixer Voicemeeter is running
- SWYH sends Play action before sending SetAVTransportURI HOT 1
- swyh stops when no active audio device
- Hwo to Stream as WAV/PCM (L16) or flac/ape over HTTP? HOT 1
- Xbox 360 cannot access stream via Media Player mode HOT 2
- [Feature Request] option to enable http streaming on startup HOT 2
- Virus Total detects malware (trojan) HOT 1
- Add a virtual speaker for streams HOT 2
- Streaming in high resolution? HOT 4
- SWYH creating one device in control panel (windows 10 settings panel) EACH time it runs HOT 1
- SWYH USER/FAN WITH A 1.5 QUESTION
- [Discussion] When SWYH on Android devices ?
- Random lag in new version
- foo2000 prompts playback error when using PCM/L16 streaming silent transmission
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 swyh.