kmayur
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2016
11:27 PM
Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
I am playing a 4K@60fps HEVC stream on a Roku-4 device and observing tearing artifacts.
I am using "customvideoplayer" sample application present in Roku SDK package (Link: http://wwwimg.roku.com/static/sdk/RokuSDK.zip). The "customvideoplayer" uses "roVideoPlayer" and "roImageCanvas" for player and user interface respectively. I have connected Roku-4 to a 4K@60fps TV.
I have some questions.
1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?
2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?
3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?
I am using "customvideoplayer" sample application present in Roku SDK package (Link: http://wwwimg.roku.com/static/sdk/RokuSDK.zip). The "customvideoplayer" uses "roVideoPlayer" and "roImageCanvas" for player and user interface respectively. I have connected Roku-4 to a 4K@60fps TV.
I have some questions.
1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?
2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?
3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?
20 REPLIES 20
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016
09:32 AM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
"kmayur" wrote:if somebody from Roku replied, i think fair answer would be "nunya business" 🙂
1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?
Video player keeps multiple decoded frames at a time but that's not related to "double buffering logic".
2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?Try first - ask if it doesn't work. (Welcome to Roku world!)
3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?No, roScreen will not change your streaming vs roImageCanvas. Video rendering is done on a different plane, which is underneath (z-order) these two.
kmayur
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016
10:26 PM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
Thank you @EnTerr for answering!
I know that the app developer has no control over rendering buffers. I asked this question because I am observing tearing issue with 4K @ 60fps stream. I thought decoder might be writing to a buffer which is in rendering process. I wanted to know if that is the cause for tearing artifacts. 🙂
As I mentioned I am using "customvideoplayer" sample application which is almost 3 years old. I came to know that Roku is not updating it. So wanted to know if any extra configuration parameters to be given for 4K. I did not find any parameters specifically for 4K in SDK documents.
"EnTerr" wrote:"kmayur" wrote:if somebody from Roku replied, i think fair answer would be "nunya business" 🙂
1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?
Video player keeps multiple decoded frames at a time but that's not related to "double buffering logic".
I know that the app developer has no control over rendering buffers. I asked this question because I am observing tearing issue with 4K @ 60fps stream. I thought decoder might be writing to a buffer which is in rendering process. I wanted to know if that is the cause for tearing artifacts. 🙂
2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?Try first - ask if it doesn't work. (Welcome to Roku world!)
As I mentioned I am using "customvideoplayer" sample application which is almost 3 years old. I came to know that Roku is not updating it. So wanted to know if any extra configuration parameters to be given for 4K. I did not find any parameters specifically for 4K in SDK documents.
Yeah. Even I thought so. But I was not sure about it. Thank you 🙂3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?No, roScreen will not change your streaming vs roImageCanvas. Video rendering is done on a different plane, which is underneath (z-order) these two.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2016
08:56 AM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
"kmayur" wrote:
I know that the app developer has no control over rendering buffers. I asked this question because I am observing tearing issue with 4K @ 60fps stream. I thought decoder might be writing to a buffer which is in rendering process. I wanted to know if that is the cause for tearing artifacts. 🙂
Can you take/show picture or video of it happening?
(picture is worth a thousand words, they say)
kmayur
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2016
11:56 PM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
"EnTerr" wrote:
Can you take/show picture or video of it happening?
(picture is worth a thousand words, they say)
I don't have the actual picture right now. But the video on TV is as in the picture below. Please observe part of different frames displayed at same time.

I could only upload image of size less than 800X800. You can see the high resolution image at this path:
https://upload.wikimedia.org/wikipedia/ ... ted%29.jpg
kmayur
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2016
11:59 PM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
I printed device information and I have copied the log below. I referred ifDeviceInfo to get device information.
*******************************************************************
***************** Device Information ******************
*******************************************************************
* GetModel: 4400X
* GetVersion: 177.20E04100A
* GetDisplayType: HDTV
* GetDisplayMode: 720p
* GetDisplayAspectRatio: 16x9
* GetDisplaySize: <Component: roAssociativeArray> =
{
h: 720
w: 1280
}
* GetDisplayProperties:
width= 160
height= 90
Hdr10=false
DolbyVision=false
internal=false
* GetSupportedGraphicsResolutions:
ReslIndex[ 0]
width= 1280
name=HD
preferred=false
height= 720
ui=false
ReslIndex[ 1]
width= 1920
name=FHD
preferred=true
height= 1080
ui=true
* GetVideoMode: 2160p30
* GetModelDisplayName: Roku 4
* CanDecodeVideo INPUT:
profile=high
codec=hevc
level=6.2
CanDecodeVideo OUTPUT:
level=<Component: roArray> =
[
4.1
5.0
5.1
]
updated=level
result=false
* GetUIResolution:
width= 1920
name=FHD
height= 1080
HDMI port connected check passed: true
HDCP 2.2 check passed: true
*******************************************************************
I have connected Roku-4 to a "LG 65EF9500" TV and all HDMI ports are rated as 60Hz on it. My question is: Why Roku is detecting video mode as 4K@30fps? Please observe "GetVideoMode" in the log.
Let me know if I need to check any additional settings.
*******************************************************************
***************** Device Information ******************
*******************************************************************
* GetModel: 4400X
* GetVersion: 177.20E04100A
* GetDisplayType: HDTV
* GetDisplayMode: 720p
* GetDisplayAspectRatio: 16x9
* GetDisplaySize: <Component: roAssociativeArray> =
{
h: 720
w: 1280
}
* GetDisplayProperties:
width= 160
height= 90
Hdr10=false
DolbyVision=false
internal=false
* GetSupportedGraphicsResolutions:
ReslIndex[ 0]
width= 1280
name=HD
preferred=false
height= 720
ui=false
ReslIndex[ 1]
width= 1920
name=FHD
preferred=true
height= 1080
ui=true
* GetVideoMode: 2160p30
* GetModelDisplayName: Roku 4
* CanDecodeVideo INPUT:
profile=high
codec=hevc
level=6.2
CanDecodeVideo OUTPUT:
level=<Component: roArray> =
[
4.1
5.0
5.1
]
updated=level
result=false
* GetUIResolution:
width= 1920
name=FHD
height= 1080
HDMI port connected check passed: true
HDCP 2.2 check passed: true
*******************************************************************
I have connected Roku-4 to a "LG 65EF9500" TV and all HDMI ports are rated as 60Hz on it. My question is: Why Roku is detecting video mode as 4K@30fps? Please observe "GetVideoMode" in the log.
Let me know if I need to check any additional settings.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2016
08:17 AM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
What do you have selected under Settings > Display Type?
--Mark
--Mark
kmayur
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2016
10:20 PM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
"RokuMarkn" wrote:
What do you have selected under Settings > Display Type?
--Mark
Thank you, @Mark 🙂 . We have tested with both 4K-8bit and 4K-10bit options under Settings > Display type. Please note, we are using 4K-8bit content for testing.
To give a brief note on our testing,
1) We have tested by connecting Roku to a different HDMI ports on the TV and also tested with different HDMI cables.
2) We have played the same 4K@60fps content on the same TV with a different media player device (Not Roku). It plays without any issues. So, it is not the issue with the HDMI port or HDMI cable.
3) We have also tried rebooting Roku while TV is switched ON.
Please let me know if you think any other tests to be done.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2016
11:13 PM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
Apparently VSYNC issue. And shot in the dark - i suspect due to adaptive V-sync
(e.g. Roku4 decoded frame rate drops below sync rate), see viewtopic.php?f=34&t=54513#p490795
Can you provide the Co a URL to a sample video that causes the effect?
(e.g. Roku4 decoded frame rate drops below sync rate), see viewtopic.php?f=34&t=54513#p490795
Can you provide the Co a URL to a sample video that causes the effect?
kmayur
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016
01:03 AM
Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream
Hi EnTerr,
I am not using "roScreen" in my application and I am not using any openGL APIs. I am not controlling rendering as well. So, I don't know how V-sync is getting affected. Is there any settings for choosing V-sync mode?
This issue is reproducible with any 4K@60fps stream.
Also, I am more interested about the "GetVideoMode" output. Why it is detecting the HDMI as 30fps? I think that is the root cause of the issue.
"EnTerr" wrote:
Apparently VSYNC issue. And shot in the dark - i suspect due to adaptive V-sync
(e.g. Roku4 decoded frame rate drops below sync rate), see viewtopic.php?f=34&t=54513#p490795
I am not using "roScreen" in my application and I am not using any openGL APIs. I am not controlling rendering as well. So, I don't know how V-sync is getting affected. Is there any settings for choosing V-sync mode?
"EnTerr" wrote:
Can you provide the Co a URL to a sample video that causes the effect?
This issue is reproducible with any 4K@60fps stream.
Also, I am more interested about the "GetVideoMode" output. Why it is detecting the HDMI as 30fps? I think that is the root cause of the issue.