[Android Apps and Games] LastSilmaril:
HDHRPrime streaming over the web not working with Chromecast V1 [SOLVED, bugfix reqd]

See ED5 below.

I've been using BubbleUPnP and BubbleUPnP server to transcode video from an HDHomeRun Prime and watch it on my phone successfully for a while (using MX Player Pro as my video playback app). This has worked over mobile as well as wi-fi (over the internet, not at home). When I try to playback on a Chromecast (v1) though, the video does not get transcoded and isn't played back at all - in fact, the tuner doesn't even tune and even ffprobe does not launch. Turning on 'force video transcode' in 'Settings > Chromecast' does not work - again, BubbleUPnP Server apparently never tries to engage the tuner. Disabling 'Transcode unsupported Chromecast media to a compatible format' results in the 'Cannot play: media not natively supported by Chromecast' message. Transcoding of FLAC audio served by Universal Media Server does work with this Chromecast, so it's not like *all* transcoding is disabled when it comes to the Chromecast. Is there some ini setting on BubbleUPnP Server that I'm missing? I'm on the latest version of both the server and client apps. Thanks Bubbleguuum, I appreciate it.

ED: Now music playback from UMS, transcoded or otherwise, is shot on the Chromecast. It works fine with other apps (Netflix, Plex) so I'm really at a loss :(

ED2: To be clear, this is exactly what happens: after starting playback to my Chromecast, regardless of which media server I'm using, the play screen is visible for maybe a second, and the progress bar jumps forward slightly. Then, it drops back to the BubbleUPnP placeholder screen (iow the text 'BubbleUPnP' in the center of the screen on a black background). Neither access_log.txt nor BubbleUPnPServer.log.0 logs the fact that I requested the file in question, nor does it say that the stream was started (though there are logs for the thumbnails associated with the file, which have no trouble coming through). Restarting the Chromecast did not work. Factory resetting the Chromecast also did not work. The Chromecast is connected via Ethernet, not Wi-Fi, and in any case works fine with other apps, so connectivity doesn't seem to be the issue, either.

ED3: I have enabled logging on the BubbleUPnP app itself. I've discovered that when I attempt to playback a video on the Chromecast, the URL substitution appears to be invalid:

When I removed the extra slash before 'chromecast' in the substituted URL and placed it in Firefox, the browser prompted me for my login details, and then began to download the transcoded video stream to a file. This is logged server-side in the main log and the access log as well. Could this be the issue? (I tried changing the webContextPath parameter from "/" to an empty string in the server-side configuration.xml, on the off-chance that was the issue, but this did not change anything.)

I'm not sure, because streaming music from Universal Media Server to my Chromecast also doesn't work, whether the file needs to be transcoded or not, and there is no similar URL 'flaw' (if indeed this is a URL flaw).

ED4: Part of the problem appears to be my domain, which has HSTS preloading enabled via the Chrome list. BubbleUPnP does not respect HSTS, so it connects using that domain without issue (and in any case https is only used for initial authentication, not for the serving of the actual streams). Apparently, Firefox for Android also does not respect HSTS, or doesn't have the preload list, or else it would not have been able to download the transcode using the link I mentioned in ED3. But Chrome definitely respects HSTS - and so does the Chromecast. When connecting to my server using a different domain name which does not have HSTS enabled, or using just the actual IP address, audio streams from Universal Media Server work without issue.

However, video streams from my HDHomeRun Prime quit, per usual, regardless. Sometimes, when using my alternate domain name with only http authentication (does not happen when using https), this error shows up in the logs when trying to playback transcoded video from my HDHR:

This doesn't happen consistently, but I guess it could be a clue? (Of course rebooting did nothing.)

Here's what the docs have to say about it:

Besides this: is there are reason that https is applied only to initial authentication but not to the data streams themselves? Is it possible to enable this in a future update?

ED5: The extraneous slash in the URL is the problem. I set up a proxy on an nginx server which rewrote the url to remove it, and Chromecast streaming of video from my HDHR now works. Hurray! So if you could please remove this from the URL so I don't need to use the proxy at all, that would be nice :)

Also, I'd like to formally put in a feature request to serve all media via https. It doesn't need to be a default - my guess is you do this for performance reasons - but it would be cool to have the option, for use cases like mine (HSTS enabled on a domain + Chromecast). (Right now I'm using the actual IP or that backup domain I mentioned but it would be nice to not have to do that.)