johnmarsden
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
09:56 AM
Testing device 4K capabilities
Is there a sure-fire way right now to determine if someone is using a 4K capable Roku device? I know it's the Roku 4+, but if in the future the model says Roku Ultra, or Roku 5, or Roku Streaming 4K Stick, etc... I'd have to account for that.
The getDisplayType() still shows HDTV as opposed to what one might think is UHDTV.
Any thoughts?
The getDisplayType() still shows HDTV as opposed to what one might think is UHDTV.
Any thoughts?
13 REPLIES 13


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
01:25 PM
Re: Testing device 4K capabilities
"johnmarsden" wrote:
Is there a sure-fire way right now to determine if someone is using a 4K capable Roku device?
It may not be the ideal solution, but I believe if you use roDeviceInfo.GetSupportedGraphicsResolutions() and look for an entry with name = "FHD" that corresponds to 4K video support.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
01:51 PM
Re: Testing device 4K capabilities
Actually, "FHD" is 1080 and the 4k is "UHD" - no?
Just in case, here is hackie :twisted::
Just in case, here is hackie :twisted::
model_no = createObject("roDeviceInfo").getModel()
' 44xx = roku 4, 46xx = Palmieres, 5xxx = HD RokuTV, 6xxx = UHD RokuTV '
i_can_haz_4k = model_no > "44" and left(model_no, 1) <> "5"
ljunkie
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
02:44 PM
Re: Testing device 4K capabilities
We have assumed any device that can support HEVC/VP9 will support 4K. If that is true, then this will work. Note you should wrap it with "FindMemberFunction".
You can also verify if the device is operating in 4k mode
Happy to know if there is a better way.
if FindMemberFunction(device, "CanDecodeVideo") <> invalid then
device = createObject("roDeviceInfo")
supports4k = (device.CanDecodeVideo({codec: "hevc"}).result = true or device.CanDecodeVideo({codec: "vp9"}).result = true)
else
' fallback to model numbers since the current firmware doesn't support `CanDecodeVideo`
end if
You can also verify if the device is operating in 4k mode
device = createObject("roDeviceInfo")
is4k = (val(device.GetVideoMode()) = 2160)
Happy to know if there is a better way.


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
03:41 PM
Re: Testing device 4K capabilities
"EnTerr" wrote:
Actually, "FHD" is 1080 and the 4k is "UHD" - no?
Not in this case. Graphics resolution supporting FHD is synonymous with video resolution supporting 4K, at this time.
I don't recommend making tests based on model number, as that will not work right later if not sooner. 😉


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
04:53 PM
Re: Testing device 4K capabilities
"ljunkie" wrote:
We have assumed any device that can support HEVC/VP9 will support 4K.
That seems like a reasonable assumption. You definitely need to make that as an 'OR' check though.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016
06:37 PM
Re: Testing device 4K capabilities
"RokuKC" wrote:"EnTerr" wrote:
Actually, "FHD" is 1080 and the 4k is "UHD" - no?
Not in this case. Graphics resolution supporting FHD is synonymous with video resolution supporting 4K, at this time.
I don't recommend making tests based on model number, as that will not work right later if not sooner. :wink:
Um, wait... "everybody knows" that HD is 720, FHD is 1080 and UHD is 1920 vertically - are you saying that 3840x1920 gets mis-labeled as FHD?
If so, wouldn't checking for .height number be a better idea than the .name string? I mean, at least the number 1920 or 1080 should be correct, right?
And regarding checking by model# - no need to carve the recognized models in stone, could provision the app with a regex that decides based on model# (i.e. `createObject("roRegEx", is_4k_model_ptrn, "").isMatch(model_no)`). It requires some sophistication of periodic provisioning from central server - but for those who have done it for other reasons - okay, that's just another key for the JSON property bag and when the Co releases a new model, tweak a file on the server and stay merry. E.g.
{..., is_4k_model: "^44", ... }
' oh noes, they released 4k model 6xxx, what we gonna do? ah okay: '
{..., is_4k_model: "^4[4-9]|^6", ... }


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016
10:54 AM
Re: Testing device 4K capabilities
"EnTerr" wrote:
Actually, "FHD" is 1080 and the 4k is "UHD" - no?
Graphics resolution is separate than video resolution.
FHD UI support =~= 4K video support, at least until such time as a specific feature test will be provided (in addition to the roDeviceInfo CanDecodeVideo tests).
You can certainly check the other fields as you like, but checking name = "FHD" is sufficient for the foreseeable future.
No need for complicated model number regex matching... that will be just be an approximation, as well as a ongoing maintenance commitment.
ljunkie
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016
11:18 AM
Re: Testing device 4K capabilities
"RokuKC" wrote:"ljunkie" wrote:
We have assumed any device that can support HEVC/VP9 will support 4K.
That seems like a reasonable assumption. You definitely need to make that as an 'OR' check though.
Yep, that's what I had in the quick code example.
if FindMemberFunction(device, "CanDecodeVideo") <> invalid then
device = createObject("roDeviceInfo")
supports4k = (device.CanDecodeVideo({codec: "hevc"}).result = true or device.CanDecodeVideo({codec: "vp9"}).result = true)
else
' fallback to model numbers since the current firmware doesn't support `CanDecodeVideo`
end if
And really, every 4k device should already support that function because they'd be on the new firmware, right!? 😉
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2016
12:59 PM
Re: Testing device 4K capabilities
"ljunkie" wrote:
And really, every 4k device should already support that function because they'd be on the new firmware, right!? 😉
Wait a minute, there is a problem in that line of thinking - 4k and HEVC are not equivalent? It's "falacy of the converse" along the lines of:
- if you own a building, you can put your name on it
- many buildings have "Trump" on them
- therefore Trump owns all these buildings!
In the same way 4k player => H.265 (HEVC), sure.
Why do you assume HEVC => 4k ?
I would expect better compression methods would make it to FHD too. After all, from ergonomic point of view, 4k TVs are bogus (unlike HDR)...