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.
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?
Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?
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?
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?if somebody from Roku replied, i think fair answer would be “nunya business”
Video player keeps multiple decoded frames at a time but that’s not related to “double buffering logic”.
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, 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.
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?if somebody from Roku replied, i think fair answer would be “nunya business”
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.
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.
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.Yeah. Even I thought so. But I was not sure about it. Thank you
“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)
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 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” wrote:
What do you have selected under Settings > Display Type?
–Mark
Thank you, . 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,
We have tested by connecting Roku to a different HDMI ports on the TV and also tested with different HDMI cables.
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.
We have also tried rebooting Roku while TV is switched ON.
Please let me know if you think any other tests to be done.
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?
“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.
“kmayur” wrote:
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?
“It doesn’t matter” I mean Vsync-ing is a very low level thing in producing video signal (below roScreen, OGL, video decoding). It’s not configurable. And if it’s that and there were a way to disable the “adaptive” mode of Vsync - mind you that would be worse overall because it will decrease effective FPS.
“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.
I understand the annoyance when asked to provide sample for something “obvious” but it may help your case. Metaphorically, you know how “class lawsuits” cover everyone from a group? Well they still need a few real humans as “representatives” in the court proceedings, to represent the plaintiff class. The picture you showed is a simulated(“fake”) image from wikipedia, not the real effect - it would be good if there is something tangible for a Co’ person to look at.
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.
That is a good question, though that by itself would not cause tearing.
EnTerr:
“It doesn’t matter” (https://forums.roku.com/images/smilies/icon_smile.gif[/img)] I mean Vsync-ing is a very low level thing in producing video signal (below roScreen, OGL, video decoding). It’s not configurable. And if it’s that and there were a way to disable the “adaptive” mode of Vsync - mind you that would be worse overall because it will decrease effective FPS.
As per my understanding, Adaptive V-sync will be turned ON if the stream has variable frame rate. But my streams have fixed 60fps frame rate, so I don’t think it is turned ON. However, as you mentioned it is not configurable and hence I don’t think that is the issue I am facing.
“EnTerr” wrote:
I understand the annoyance when asked to provide sample for something “obvious” but it may help your case. Metaphorically, you know how “class lawsuits” cover everyone from a group? Well they still need a few real humans as “representatives” in the court proceedings, to represent the plaintiff class. The picture you showed is a simulated(“fake”) image from wikipedia, not the real effect - it would be good if there is something tangible for a Co’ person to look at.
I am using some customer’s stream stream for testing. I have checked with them and I am not able to share them with you. According to me, the issues are reproducible with any 4K@60fps stream.
“EnTerr” wrote:
That is a good question, though that by itself would not cause tearing.
I think this is the issue because display is configured for 30fps and rendering is at 60fps. Decoder might be writing to a buffer when the buffer is being used by the display.
“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,
We have tested by connecting Roku to a different HDMI ports on the TV and also tested with different HDMI cables.
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.
We have also tried rebooting Roku while TV is switched ON.
Please let me know if you think any other tests to be done.
Hi,
Any update on this issue?
As I mentioned, I expected “GetVideoMode” would return “2160p60” for 8-bit and “2160p60b10” for 10-bit display type selection. I am not sure what is going wrong here. Also please let me know if you need any other information.
Hi @RokuJoel , I just wanted to know if there is any update from your side on this issue. Is Roku media team able to reproduce the issue? Is it a bug in the the system or some configuration issue in my application? Please let me know if you need any information from my side.