Jump to content

Casting To Roku


TheNextVaugeOne

Recommended Posts

TheNextVaugeOne

Hi all,

I'm hoping to find an under-the-hood list of transactions that happen when using the cast icon from either an IOS or Android app with a local Roku device. I'm able to see the Roku with it being on the same network segment, my server is in another zone and normally front ended by a reverse proxy, although I've noticed that IOS tends to want to skip that and go straight to streaming from the server similar to how the Chromecasts used to, regardless of if I set the 'treated as local' network field to only include the server's network, it seems to tell the IOS device to come to the local address. That may or may not be relevant though since the issue is present on both ios and android.

It seems to mobiles connect to the roku just fine, and I noticed the server making a call back to the roku on port 8060 which I passed through, but despite everyone seeming to talk to each other I still get no joy on the actual playback. On the IOS/Android boxes it shows as connected to the roku, but playback wont start, I can't control the roku in any fashion, etc.

Can someone give a flow of the full transaction that should be happening here to see if I might be missing something, or is there some known issue with using the cast function to roku at this time where I should just stop poking at it?

Thanks

Link to comment
Share on other sites

15 hours ago, TheNextVaugeOne said:

or is there some known issue with using the cast function to roku at this time where I should just stop poking at it?

Hi.  It should work fine on a local network but the Roku device itself will not allow these messages from a different network.  It is a security feature on their part.

Link to comment
Share on other sites

TheNextVaugeOne
45 minutes ago, ebr said:

Hi.  It should work fine on a local network but the Roku device itself will not allow these messages from a different network.  It is a security feature on their part.

To clarify then, the Emby server has to be within the same subnet range as the roku for the roku to accept that call back that seems to happen? Wouldn't be impossible to do, but ideally I've tried to keep my potentially outside facing servers separate from the local network. Both the mobiles and the roku are on the same segment but the server is separated from them.

Link to comment
Share on other sites

Quote

To clarify then, the Emby server has to be within the same subnet range as the roku for the roku to accept that call back that seems to happen?

Correct, yes. Roku requirement.

Link to comment
Share on other sites

TheNextVaugeOne

So I did some fairly extensive testing and it seems that the need to be in the same subnet is not actually a thing, at least with the roku I'm testing with, a 3930X - Roku Express for the curious.

Some discoveries and changes, first make sure the 'control by mobile apps' is enabled (I'd turned as many unneeded access venues down a while back because reasons).

Ensure the port 8060 is open from the server to the roku, this port seems to be universal for a lot of roku access, their official app reaches out across the local net to find devices as well.

Be aware that the authentication sent to the roku when casting is in plaintext and can be pulled out of the wire pretty easily, I think that just might be a trait of DLNA servers which is what this appears to be based around though.

All that said, there was mixed results when actually doing the casting though. It seems repeatable for given files that some will work while others won't from within the same library and backing storage location. These same files that failed when trying to 'cast' though worked just fine when invoked directly from within the roku. It's leaving me to wonder if there's some sort of argument between compatible streams from the mobile versus those on the roku with the casting trying to invoke a stream that the roku can't play directly? I attached the decode of a pcap for a couple of them if you can make anything of the responses. In this case the line 2 entries where for a file that played without issue, while the line 39 failed to start.

The first is formatted as 720p H264 / Und AAC stereo (Default)

The second is 1080p HEVC / English EAC3 5.1 (Default)

Any thoughts on where the issue might lie here?

example.txt

Link to comment
Share on other sites

TheNextVaugeOne

Sure, was sent at 9:54 EDT with the user 'test.user' logged in on both the roku and the mobile app. The symptom is pretty bland in the form of a spinning dashed circle, which is notably different from ones that do work which have a solid lined circle just before they start. Otherwise, I should have the network transactions on my system if they might provide help as well.

PXL_20230505_135912575.jpg

Link to comment
Share on other sites

Exactly what did you attempt to play, from where and exactly how? 

Link to comment
Share on other sites

TheNextVaugeOne



The.Simpsons.S28E22.Dogtown, mkv file. It was played via casting from a Pixel 6 phone to the Roku, which fetches to a server which has it's SSL handled by a reverse proxy in another subnet, that server retrieves the files from a store on a 3rd network. The auth is recognized and some/most other files work as expected, but a few selected ones do not, though nothing related to file or user permissions since file ones are universal for the emby user on the server (docker hosted) and the user doesn't have any kind of access restrictions in this case.

Video: 1080p H264
CodecH264
ProfileHigh
Level40

Resolution1920x1080

 

Audio: English AAC 5.1 (Default)
LanguageEnglish
CodecAAC
ProfileLC
Layout5.1
Channels6 ch
Bitrate320 kbps
Link to comment
Share on other sites

4 minutes ago, TheNextVaugeOne said:

The.Simpsons.S28E22.Dogtown, mkv file.

From where in the app did you attempt to play this file?

Link to comment
Share on other sites

TheNextVaugeOne

I'm not quite sure how you mean 'where in the app', I first went to the casting menu within the android emby app to connect to the roku, then found the video, specifically under the 'TV shows' library and selected play. The roku responded to the request but didn't seem to be able to play it, though other ones in the same library work just fine.

Link to comment
Share on other sites

8 minutes ago, TheNextVaugeOne said:

then found the video, specifically under the 'TV shows' library and selected play.

found the video exactly where?  What screen?  

In any case, if you do the exact same thing but cast to the web app, does that work?

Link to comment
Share on other sites

TheNextVaugeOne

From the home screen, My Media, TV shows, The Simpsons, ... Same way as you would find any other video, no special route for it, it's within a mounted NAS store but that wouldn't be relevant since that's all handled at the OS level, and it plays as normal if not called via casting through the app.

It doesn't show any problems playing from the android to a browser on the same net, or from the browser back to the android, but neither the android or browser where able to cast to the roku sucessfully. They invoke a response from it, but the playback fails with the loading wheel as above.

Link to comment
Share on other sites

Okay, so if you go to the detail screen for that exact episode you tried to play when you sent the Roku log and look in the browser address bar, there is an "id=xxxxx" where xxxx is a number.  What is that number?

Link to comment
Share on other sites

Thanks.  FYI this has nothing to do with the content or its format.  It is all about it being "The Simpsons" with 700+ or whatever episodes.

Link to comment
Share on other sites

TheNextVaugeOne

As in the large size index for the series is causing issues, or just trying to find something in the log? I can try and find something with a smaller footprint that fails as well if needed, this wasn't the only one with the same issue, but it's just the one I've been picking on in the troubleshooting since it's easy to find (last in season 28).

Link to comment
Share on other sites

13 minutes ago, TheNextVaugeOne said:

As in the large size index for the series is causing issues, or just trying to find something in the log? I can try and find something with a smaller footprint that fails as well if needed, this wasn't the only one with the same issue, but it's just the one I've been picking on in the troubleshooting since it's easy to find (last in season 28).

Any attempt to play an episode beyond the 100th in the series is going to be an issue.  I'm going to have to get with Luke to figure out how to handle this.

Link to comment
Share on other sites

But just to confirm - you are playing from the episode detail screen or a series detail screen?

Link to comment
Share on other sites

TheNextVaugeOne

Generally from the season details screen, though I just tried it with another series to count out that 100 mark and if my count is right then it did stop working right about there. The behavior didn't change regardless of it I tried to play directly from the season list or the individual episode.

Link to comment
Share on other sites

TheNextVaugeOne

Interestingly enough when I counted again it was actually 109, but the first 9 in the series where not part of an actual season of any kind, so I'm guessing those didn't count towards whatever is limiting it to that number

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...