FORUMS

[APP][4.0+][v2.8.3.1] BubbleUPnP - UPnP/DLNA/Chromecast Control Point and Renderer

6,457 posts
Thanks Meter: 2,439
 
By bubbleguuum, Senior Member on 10th June 2011, 09:58 PM
Post Reply Email Thread
16th February 2020, 07:09 PM |#15401  
Senior Member
Thanks Meter: 29
 
More
Quote:
Originally Posted by samnada

Using foobar2000 as a DLNA renderer and BubbleUPnP can't jump forward/back when playing a track. I press on the timeline bar, it highlights at the jump point but then just goes back to the current location. Playing just continues unchanged. If I use the foobar Android control app jump forward/back works fine. Also, if I play a track on the PC directly in foobar it works fine. I can send a log if needed. Thanks.

Log is needed, so do it for short response times
16th February 2020, 08:40 PM |#15402  
Senior Member
Thanks Meter: 107
 
More
Quote:
Originally Posted by samnada

Using foobar2000 as a DLNA renderer and BubbleUPnP can't jump forward/back when playing a track. I press on the timeline bar, it highlights at the jump point but then just goes back to the current location. Playing just continues unchanged. If I use the foobar Android control app jump forward/back works fine. Also, if I play a track on the PC directly in foobar it works fine. I can send a log if needed. Thanks..

Quote:
Originally Posted by nift4

Log is needed, so do it for short response times

Log file sent.
17th February 2020, 02:56 PM |#15403  
OP Senior Member
Thanks Meter: 2,439
 
More
Quote:
Originally Posted by samnada

Log file sent.

Thank you for the log.

@samnada

You are streaming a FLAC hosted by Serviio 2.0.
For some reason, foobar2000 (using latest 1.5.2) refuses to seek in FLAC served by Serviio.
This can be reproduced without BubbleUPnP: in foobar2000, use the UPnP Browser to browse Serviio,play a FLAC and attempt to seek:
it will not work. This is not a generalized issue in foobar2000 as it seeks perfectly fine in FLAC served by MinimServer.
I briefly looked a Serviio to check if it did something wrong when serving http request for seeking, but to me it looked fine.
However, upmpdcli (another renderer based on mpd) also refuses to seek FLAC served by Serviio. So the problem is likely in Serviio, in the way it handle
seek requests (which translates in http Range requests). I suggest to report this issue on the Serviio forum with the info I have given.
17th February 2020, 03:15 PM |#15404  
Senior Member
Thanks Meter: 107
 
More
Quote:
Originally Posted by bubbleguuum

Thank you for the log.

@samnada

You are streaming a FLAC hosted by Serviio 2.0.
For some reason, foobar2000 (using latest 1.5.2) refuses to seek in FLAC served by Serviio.
This can be reproduced without BubbleUPnP: in foobar2000, use the UPnP Browser to browse Serviio,play a FLAC and attempt to seek:
it will not work. This is not a generalized issue in foobar2000 as it seeks perfectly fine in FLAC served by MinimServer.
I briefly looked a Serviio to check if it did something wrong when serving http request for seeking, but to me it looked fine.
However, upmpdcli (another renderer based on mpd also refuse to seek FLAC served by Serviio. So the problem is likely in Serviio, in the way it handle
seek request (which translated in http Range requests). I suggest to report this issue on Serviio with the info I have given.

Thank you for the prompt and thorough analysis.

I have another observation, if I use BubbleUPnP and Windows Media Player as the renderer with Serviio as the server the seek operation works fine with flac files. So it appears to me that there's something about the way the renderer interacts with Serviio that's causing the issue. I'll pursue the issue with Serviio. Thanks again.
17th February 2020, 03:23 PM |#15405  
OP Senior Member
Thanks Meter: 2,439
 
More
Quote:
Originally Posted by samnada

Thank you for the prompt and thorough analysis.

I have another observation, if I use BubbleUPnP and Windows Media Player as the renderer with Serviio as the server the seek operation works fine with flac files. So it appears to me that there's something about the way the renderer interacts with Serviio that's causing the issue. I'll pursue the issue with Serviio. Thanks again.

Since the issue is happening with 2 entirely different renderers (foobar2000 and upmpdcli), the issue is more than likely on the Serviio side.
For WMP, it might do much more buffering in advance and seek with that instead of making a http request to the server.
17th February 2020, 04:07 PM |#15406  
Senior Member
Thanks Meter: 107
 
More
Quote:
Originally Posted by bubbleguuum

Since the issue is happening with 2 entirely different renderers (foobar2000 and upmpdcli), the issue is more than likely on the Serviio side.
For WMP, it might do much more buffering in advance and seek with that instead of making a http request to the server.

There are some buffer size options in foobar, would that potentially help? I understand this is BubbleUPnP, just looking for a solution. Thanks.
17th February 2020, 06:11 PM |#15407  
Junior Member
Thanks Meter: 0
 
More
Hello,

I am wondering if anyone can help. I have paid for and installed the premium version of the app on my phone (Huawei P Smart) and I am trying to stream media from my phone to my PlayStation 4. I am using the Sony Media Player app on my PlayStation.

The PlayStation can see the media server and I can select media files. My main media format is mkv as that's what mostly everyone uses now. The file opens with video and audio but 60 seconds or so into the file it stops and says "cannot play the media".

If I reopen the file again on my PlayStation it remembers the last location and plays another 60 seconds and stops again with the same error message. I don't understand the message because the video and audio codecs are present because it plays for 60 seconds.

Other formats play such as MP4 and AVI.

Thanks
18th February 2020, 11:17 AM |#15408  
Senior Member
Thanks Meter: 29
 
More
Quote:
Originally Posted by geoffreyireland

Hello,

I am wondering if anyone can help. I have paid for and installed the premium version of the app on my phone (Huawei P Smart) and I am trying to stream media from my phone to my PlayStation 4. I am using the Sony Media Player app on my PlayStation.

The PlayStation can see the media server and I can select media files. My main media format is mkv as that's what mostly everyone uses now. The file opens with video and audio but 60 seconds or so into the file it stops and says "cannot play the media".

If I reopen the file again on my PlayStation it remembers the last location and plays another 60 seconds and stops again with the same error message. I don't understand the message because the video and audio codecs are present because it plays for 60 seconds.

Other formats play such as MP4 and AVI.

Thanks

Logs please, see OP. Else noone can help you
19th February 2020, 01:31 AM |#15409  
Junior Member
Thanks Meter: 0
 
More
So even though the documentation states that putting the BubbleUPnP Server behind a reverse proxy is supported, it doesn't recognize X-Forwarded-For or X-Real-Ip. This means that every request is treated like it is within your LAN because the reverse proxy is the one making the final request to the BubbleUPnP Server. Are there any plans to support X-Forwarded-For or X-Real-Ip? If nothing else, a way to force the stream URLs to use the DNS names would suffice. I saw a previous post that mentioned someone else having issues because X-Fowarded-For is being ignored, but that post seemed to be mostly ignored.

Issue: I connect from the Android app to the BubbleUPnP Server from the internet. While I can browse my media, I cannot play anything because the stream URL has my LAN IP Address while I am outside my LAN.
19th February 2020, 11:33 AM |#15410  
OP Senior Member
Thanks Meter: 2,439
 
More
Quote:
Originally Posted by J4yD4n

So even though the documentation states that putting the BubbleUPnP Server behind a reverse proxy is supported, it doesn't recognize X-Forwarded-For or X-Real-Ip. This means that every request is treated like it is within your LAN because the reverse proxy is the one making the final request to the BubbleUPnP Server. Are there any plans to support X-Forwarded-For or X-Real-Ip? If nothing else, a way to force the stream URLs to use the DNS names would suffice. I saw a previous post that mentioned someone else having issues because X-Fowarded-For is being ignored, but that post seemed to be mostly ignored.

Issue: I connect from the Android app to the BubbleUPnP Server from the internet. While I can browse my media, I cannot play anything because the stream URL has my LAN IP Address while I am outside my LAN.

@J4yD4n

It is true that BubbleUPnP Server will return stream URLs with your LAN ip address in that case. But when you play a media, Android BubbleUPnP is supposed to substitute the LAN ip by whatever hostname you set to connect to BubbleUPnP Server. Although looking at it, I found a bug and this will not work if you play a video to the local renderer or any media to the OpenHome local renderer.
Are you in one of these 2 cases ?
Ideally BubbleUPnP Server should send the proper stream URL but last I looked at it long ago, this was more problematic than it looks.
EDIT: and there's a complication: the stream URL themselves cannot use reverse proxying due to them being always http for compat reasons (while you can connect to BubbleUPnP Server via a reverse https proxy).
So http://<your home hostname>:58050 must still be opened for streaming to work with reverse proxying and the ip/hostname substitution I mentioned.
I do not really recommend to do reverse proxying with BubbleUPnP Server due to the complexity and caveats. Just connecting normally via https is much simplier.
19th February 2020, 02:20 PM |#15411  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by bubbleguuum

@J4yD4n

It is true that BubbleUPnP Server will return stream URLs with your LAN ip address in that case. But when you play a media, Android BubbleUPnP is supposed to substitute the LAN ip by whatever hostname you set to connect to BubbleUPnP Server. Although looking at it, I found a bug and this will not work if you play a video to the local renderer or any media to the OpenHome local renderer.
Are you in one of these 2 cases ?
Ideally BubbleUPnP Server should send the proper stream URL but last I looked at it long ago, this was more problematic than it looks.
EDIT: and there's a complication: the stream URL themselves cannot use reverse proxying due to them being always http for compat reasons (while you can connect to BubbleUPnP Server via a reverse https proxy).
So http ://<your home hostname>:58050 must still be opened for streaming to work with reverse proxying and the ip/hostname substitution I mentioned.
I do not really recommend to do reverse proxying with BubbleUPnP Server due to the complexity and caveats. Just connecting normally via https is much simplier.

I'm playing to the local renderer, so yes I fit one of those cases.
I changed the BubbleUPnP Server to host on ports 80/443, so my external ports are the same as the BubbleUPnP server. They're just pointing to the reverse proxy instead of directly to the BubbleUPnP Server. The stream URL did have the correct port in it. It was only the ip/hostname that was wrong. I guess that is something to note for anyone that tries to replicate my setup, the BubbleUPnP Server's http port must match the external port.
My Packet Path: Internet => Router port 80/443 => Reverse Proxy 80/443 => BubbleUPnP Server 80/443
The reason why I'm doing this is because I have added security on my reverse proxy. If I just open up BubbleUPnP to the internet, eventually someone is going to notice that there's an http server on port 58050 and then they can attack it until they find a bug. My reverse proxy is configured to make that difficult and identify attacks so the source address can automatically be blacklisted.

As for issues generating the proper steam url, why not always use whatever is in the HOST header and fall back to the ip only if it is blank or they specify the useNumericIpInStreamURL option? That could be entered as an if statement that you can put at the beginning of your code that processes incoming web requests to set a variable that can be used as the start of the url during your response. If you have the code hosted in git somewhere, I would be willing to see if I can get it working and then submit a pull request for you to review before, hopefully, merging it in.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes