Beta Roku Channel/App...What is it actually doing???

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
Post Reply
BLWedge09
Posts: 6
Joined: Tue Apr 23, 2019 9:38 am

Beta Roku Channel/App...What is it actually doing???

Post by BLWedge09 » Thu Sep 19, 2019 8:47 pm

Ok, I realize that the answer I’m most likely to receive here is either “we can’t tell you” or just no answer at all, but I’m going to ask anyway. For reference, I’m running a HDHomeRun Quatro and a current gen Roku Ultra. It’s on hardwired Ethernet, but this issue is the same on wireless as well. I’ve mentioned before here that I’ve got this 1 problem channel. It’s WVTM (NBC) channel 13 in Birmingham, AL. Now, I normally use Plex and allow it to pass through the raw MPEG2 stream from the HDHomeRun. This works perfectly for every channel except WVTM. That channel will immediately pixelate and the video stream gets way behind...completely unwatchable. It looks like it completely overwhelms the Roku with too much data.

As a test, I installed the Roku Media Player channel that can see and play the raw streams as passed over from the HDHomeRun. Same thing happens. That rules out it being a Plex issue.

Now we come to the HDHomeRun beta Channel. Of course, it plays that channel just fine. I originally thought that the HDHomeRun channel was really just the Roku video player with a rudimentary guide. It’s obviously doing something else...but what? What is it that needs to be done to this one stream for the Roku to be able to play it? Is it stripping some sort of extra data off of the stream? Limiting the bit rate? What?

I’m not the only one with this issue in Plex on Roku. There are other people with the same problem on certain OTA stations. It’s great to be able to watch WVTM live now...I just wish I could view it via Plex alongside all my other channels.

Online
jasonl
Silicondust
Posts: 14733
Joined: Sun Oct 28, 2007 9:23 pm

Re: Beta Roku Channel/App...What is it actually doing???

Post by jasonl » Sun Sep 22, 2019 2:52 pm

It's doing nothing different. The app is a UI that invokes the Roku video player, since that's all you can do on Roku. The stream is the same one that the Roku Media Player is getting. Why it behaves differently I have no idea, other than that the Roku video player is quite buggy.

BLWedge09
Posts: 6
Joined: Tue Apr 23, 2019 9:38 am

Re: Beta Roku Channel/App...What is it actually doing???

Post by BLWedge09 » Mon Oct 21, 2019 4:03 pm

I wanted to test this out some more before I replied. I’m not sure of your position at SD, but i wish you'd check with the dev/engineering team. Forget Plex for a minute. The Roku media player invokes the base Roku Video player. It uses the Roku purple loading bar and takes about 10 seconds to start (attempt really) playing the feed i mentioned before.

The HDHomerun app loads the feed in about a second and shows a white loading bar that is different than any other app. It also consistently works with the WVTM feed where nothing else does. Clearly there is some sort of a difference.

NedS
Silicondust
Posts: 584
Joined: Mon Dec 10, 2018 12:38 pm

Re: Beta Roku Channel/App...What is it actually doing???

Post by NedS » Mon Oct 21, 2019 5:24 pm

BLWedge09 wrote:
Mon Oct 21, 2019 4:03 pm
I wanted to test this out some more before I replied. I’m not sure of your position at SD, but i wish you'd check with the dev/engineering team. Forget Plex for a minute. The Roku media player invokes the base Roku Video player. It uses the Roku purple loading bar and takes about 10 seconds to start (attempt really) playing the feed i mentioned before.

The HDHomerun app loads the feed in about a second and shows a white loading bar that is different than any other app. It also consistently works with the WVTM feed where nothing else does. Clearly there is some sort of a difference.
There is a difference in protocol used. The Roku media player finds and plays channels as UPnP AV network share, while the Roku channel is using HTTP (UPnP AV can also be used to just relay a URL for the video, but I believe in the Roku case, it is using UPnP AV to actually transmit the video). Actual video decoding is still handled by the same player, but how that data is presented to the player can possibly change the behavior that you see. It's probably due to a bug in the Roku media player, and it might not even be due to the protocol. It's a bit of a black box that only Roku can realistically do something about.

And for your information, Jason is one of our most knowledgeable experts on broadcast media. His skills and duties go far beyond helping customers. I would trust what he says on the matter.

Online
jasonl
Silicondust
Posts: 14733
Joined: Sun Oct 28, 2007 9:23 pm

Re: Beta Roku Channel/App...What is it actually doing???

Post by jasonl » Mon Oct 21, 2019 6:38 pm

There's no special protocol involved, at least for the HDHomeRun. It's straight HTTP. One channel in the UPnP response looks like this:

Code: Select all

<item id="Channels/v5.2" parentID="Channels" restricted="1">
  <dc:title>5.2 COZI-TV</dc:title>
  <upnp:class>object.item.videoItem.videoBroadcast</upnp:class>
  <upnp:channelNr>5.2</upnp:channelNr>
  <upnp:channelName>COZI-TV</upnp:channelName>
  <res protocolInfo="http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_FLAGS=8D100000000000000000000000000000">http://192.168.0.34:5004/auto/v5.2</res>
</item>
(cleaned up for readability)
The whole thing is just a game of XML-encoded Marco Polo to feed HTTP URLs and metadata to the client. What the client does with it from there is up to the client. The Roku channel uses the json from the device, but ends up in the same place:

Code: Select all

{
  "GuideNumber": "5.2",
  "GuideName": "COZI-TV",
  "VideoCodec": "MPEG2",
  "AudioCodec": "AC3",
  "URL": "http://192.168.0.34:5004/auto/v5.2"
}
Same URL for both, just a different method of getting it.

Yes, we substitute our own loading bar instead of using a default one. It's a couple dozen lines of code to create the layout and make it dance. It's almost as many lines of code as the part that actually makes the video play. There are no magic tricks being done.

NedS
Silicondust
Posts: 584
Joined: Mon Dec 10, 2018 12:38 pm

Re: Beta Roku Channel/App...What is it actually doing???

Post by NedS » Tue Oct 22, 2019 12:43 am

See, I told ya he knows what he's talking about :)

BLWedge09
Posts: 6
Joined: Tue Apr 23, 2019 9:38 am

Re: Beta Roku Channel/App...What is it actually doing???

Post by BLWedge09 » Mon Oct 28, 2019 12:39 pm

jasonl wrote:
Mon Oct 21, 2019 6:38 pm
There's no special protocol involved, at least for the HDHomeRun. It's straight HTTP. One channel in the UPnP response looks like this:

Code: Select all

<item id="Channels/v5.2" parentID="Channels" restricted="1">
  <dc:title>5.2 COZI-TV</dc:title>
  <upnp:class>object.item.videoItem.videoBroadcast</upnp:class>
  <upnp:channelNr>5.2</upnp:channelNr>
  <upnp:channelName>COZI-TV</upnp:channelName>
  <res protocolInfo="http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_FLAGS=8D100000000000000000000000000000">http://192.168.0.34:5004/auto/v5.2</res>
</item>
(cleaned up for readability)
The whole thing is just a game of XML-encoded Marco Polo to feed HTTP URLs and metadata to the client. What the client does with it from there is up to the client. The Roku channel uses the json from the device, but ends up in the same place:

Code: Select all

{
  "GuideNumber": "5.2",
  "GuideName": "COZI-TV",
  "VideoCodec": "MPEG2",
  "AudioCodec": "AC3",
  "URL": "http://192.168.0.34:5004/auto/v5.2"
}
Same URL for both, just a different method of getting it.

Yes, we substitute our own loading bar instead of using a default one. It's a couple dozen lines of code to create the layout and make it dance. It's almost as many lines of code as the part that actually makes the video play. There are no magic tricks being done.
NedS wrote:
Tue Oct 22, 2019 12:43 am
See, I told ya he knows what he's talking about :)
Guys, I realize how this probably came off sounding. I really didn't mean to sound like an @$$, it's just getting frustrating trying to figure out why only your player works correctly on this channel. Kudos to y'all for getting it to though. I wish I could debug Plex's code myself...I've been a dev for like 15 years, but I don't have access to Plex's code...nor have I ever done any work with Rokus. THey really don't seem to want to acknowledge the issue. FWIW, it's not just me and this one channel.

Anyway, It ain't the end of the world having to use your player for 1 single channel, I just wish I could figure out why Plex...when passing through direct MPEG2 and with the Roku set to play direct MPEG2, chokes on that one channel.

Online
jasonl
Silicondust
Posts: 14733
Joined: Sun Oct 28, 2007 9:23 pm

Re: Beta Roku Channel/App...What is it actually doing???

Post by jasonl » Mon Oct 28, 2019 1:42 pm

Forget Plex's code, I wish you could debug Roku's code. The video player is just so terrible at playing broadcast streams. Something that the Plex server is doing when remuxing is probably triggering the problem, but good luck figuring out what specifically. The Roku doesn't even give useful information in the developer logs, just a generic error, so even if you had access to the entire Plex codebase there would be no indication of where to start looking.

Post Reply