Jump to content

All gui graphics element flicker when playing music


MisterMoonlight

Recommended Posts

MisterMoonlight

I am running latest emby for roku 3.0.134 with an lubuntu server 16.04 based on emby 4.0.0.2 64bits. I have 2 streaming sticks 36xx, running on latest roku os v9.0 (up to date). The roku apps is working quite well for video, but as soon as i am selecting some music to play in the music library (selected from an artist for example), once i am pressing play on the gui, all elements of the graphics and text are flashing on screen like a stroboscopic effect! Initially, both of my roku devices were having the problem. At some point, one of them stop to have the problerm, after i updated roku os 9.0 to later january version (probably unrelated). But the 2nd unit has been update to the same roku os version, but the bug is still there (at some point it disappear for a short time but came back). Rebooting the roku unit and immediatly starting the roku app to play music is causing the bug. I reinstalled also the emby roku app just in case, still the same problem. I also have an old version of "emby blue neon light" with the old gui style, and this old version can play the same music without any problem at all, so it is not related to the server at all. It is probably some kind of intermittent bug in the newer roku app. The last week beta software was still having the exact same issue as the release version: everything is perfect from video streaming POV, but not good to play music (it could play music, but it is so annoying everything is flashing on screen and the gui is becoming unusable after that until the application is exited  :(
 

Just unzip the attached file and rename the video internally to the mp4 extension and you can see the bug in action  :D

rokumusicbug.zip

Edited by MisterMoonlight
Link to comment
Share on other sites

MisterMoonlight

 

Hi there, can you please attach the emby server log? You can learn how to do that here:

https://emby.media/c...port-a-problem/

 

Attached is the server log. As everything is playing normally on the roku (audio is playing perfect), i would be surprised if you could see something in the server log.

 

I have recreated the same sequence:

1- started the emby server

2- Started the roku app

3- Going in the music library

4- Choosing button "artist"

5- Then choosing abba, press the play button and let it play around 5secs then stop it (it was already buggy on the gui right at the beginning where the music started to play).

embyserver.txt

Edited by MisterMoonlight
Link to comment
Share on other sites

MisterMoonlight

Ok, here a detail that i did not mention, the network bandwidth is limited to 2Mb/s between the server and the roku. Could it be that the audio bitrate is too high as i have seen that the audio was transcoded. Is the roku could not direct play mp3 audio?

Link to comment
Share on other sites

I'm sure this is going to come down to an image that is not being re-sized on the server properly for some reason.

 

What artist or album are you playing when this happens?  Look at their images.  Are any of them really big?  Try deleting/resizing them.

Link to comment
Share on other sites

MisterMoonlight

All my music files have bultin album images using 300X300 pixels. So i doubt this could be an issue as they are so small (and i think these are the one that are used cause the resolution on screen is not so good for the album images... I have updated server version to v4.0.1.0, still same problem...

Link to comment
Share on other sites

MisterMoonlight

 

What about backdrops for artists?

 

Probably enabled, but i did not handle anything myself. What do you suggest to test with backdrops?

Link to comment
Share on other sites

First thing to test would be deleting one, then playing that artist and see if it has any impact. Thanks !

Link to comment
Share on other sites

MisterMoonlight

 

 

First thing to test would be deleting one, then playing that artist and see if it has any impact.

 

Curiously, on the three roku devices i have tried, the bug is now gone on all of them without having change anything  :huh:

I guess the bug is intermittent and would probably come back later. The only thing i have changed recently is the server version, but i have recreated the bug with the server 4.0.1.0 at least a couple of time. But no more...

Edited by MisterMoonlight
Link to comment
Share on other sites

...the bug is not gone on all of them...

 

You mean "now gone" of course. The Roku has a small amount of RAM devoted to textures. Images load into the space. How compressed the images are does not matter. H x W x 4 bytes = consumption. Some models get 20MB of space, others get 44-45MB, yet others get 60MB.

 

https://sdkdocs.roku.com/display/sdkdoc/Texture+Memory

 

Not sure how technical you are but the above document explains the problem.

 

 

 

How Can I Avoid Going Over Memory Limits?

 

Make images smaller

The simplest solution! If you're planning on displaying an image on a 200x200 Poster node, don't load in and render a 1920x1080 image. It will work, but it'll be a waste of system resources for no real benefit. A quick calculation puts a 1920x1080 image at using a whopping (1920•1080•4 = ~8.3MB) of memory, while the appropriately sized 200x200 image will only take up ~0.16MB. Using the loadWidth and loadHeight fields of a Poster node would be an equivalent solution to resizing the images themselves.

 

This gives you an idea of what we are up against. For most (all?) images the app is telling the server a maxwidth and maxheight to send. This builds a /cache on the server of images that can be dispatched to the Roku. The initial building of these images in the /cache is where the problem might happen. If for any reason the server caches a full resolution copy of an image and sends that to the Roku this can be a serious detriment to the texture RAM.

 

Once you run out of room to store the next image in texture RAM the Roku has to clear enough space. To clear enough RAM to stay working with images the Roku will go into "panic mode". This means it will drop the older images in a first-in, first-out (FIFO) fashion. So this will cause the flashing/blinking you are describing. This is the Roku in a texture RAM panic state.

 

We need to make sure in the app all image calls are using the server to scale these prior to sending. We are doing are best but sometimes our best just isn't good enough. We try. Just as I am trying to give you insight into why this is happening. I want you to understand so that you can know what we are up against. There are limits that we must do better to stay within. We will try to do better in the future. :)

Edited by speechles
Link to comment
Share on other sites

MisterMoonlight

 

 

Not sure how technical you are but the above document explains the problem.

 

I am doing programming professionnaly for > 30 years  :)

 

Ok i can understand. If the bug is coming back, i will telnet to the unit and follow the details to get the status of the limited texture memoy.

 

But, the problem is that i am using mostly all server default settings and doing nothing special to make image bigger or not except that i enable backdrop in the roku app settings (maybe could have an effect as it is related). And all my music files have very tiny album art pictures (300X300) as explained above, probably much smaller than anybody else out there (as when buying online music, there are usually several order bigger than that and i shrink them myself to save space).

 

I will try to disable the backdrops once the bug is coming back and telnet info is telling this is exactly the case to see if the problem is gone. But the roku sdk explanation looks like it is my problem...

Edited by MisterMoonlight
Link to comment
Share on other sites

@@MisterMoonlight I will go through the app tonight and make sure we are doing this for every image and asking for properly scaled images. It isn't your problem really it is ours. We have to make sure the Roku does not ask for or receive full resolution images. That the images requested are scaled appropriately and we are not causing the problem in the app. I have checked this once before but I will do a more thorough check this time and make sure I leave no stone unturned. If I find anything peculiar I will address it and cure it. Having issues like this is not acceptable if it is within our control.

Link to comment
Share on other sites

MisterMoonlight

I never recreated the problem in the old blue neon theme graphic version on any of my rokus, neither i never seen it in the 4630 (premiere+) current emby version which has probably more texture memory i guess than the older streaming sticks 3600, but if i remember correctly, this old emby graphic version does not display backdrops at all when playing music, so it could explain the difference (or the images size calculation is better handled in this old version :) )...

Link to comment
Share on other sites

Yeah, Blue Neon Night is my fork of the older official Emby app. It was where I honed my skills for developing on Roku. Now I am part of the Emby team and we collaborate on one core app for Roku. The older app uses an entirely different SDK framework. It was composed of pre-built components called screens. The screen based paradigm texture RAM is the same but does not garbage collect. Once it happens on the older app there is no flashing/blinking just a complete lack of images. Rendering only the Roku stock placeholder in the images place. I have got this to happen on Blue Neon but it takes deep navigation into many screens with a huge back stack of screens. As you drill down into more screens. This is why the Blue Neon app has a "Go To homescreen" button was to collapse this stack that may consume all the texture ram and get the user back to the top screen. Most of the features you see in Blue Neon will eventually find their way into the new Emby Roku app. 

Edited by speechles
Link to comment
Share on other sites

MisterMoonlight

 

 

Most of the features you see in Blue Neon will eventually find its way into the new Emby Roku app.

 

This is good news as i think the current version is good looking, but is missing the kind of customization we could do with the old version which i think is better and make it more interesting. I was an old user of the plex rarflix version for several years for the same reason as i think the official plex app was lacking in term of customization at that time...

 

Thanks

Edited by MisterMoonlight
Link to comment
Share on other sites

@@MisterMoonlight last night I was not able to make sure the app is limiting the size of images requested and received. I will make a point of completing this today and making sure we are doing everything possible to keep images to the proper size they must be when the app stores them into texture RAM. Stay tuned. If I find an issue it will be fixed and I will keep you informed in this thread.

Link to comment
Share on other sites

You can see in his log that all image requests have maxHeight or maxWidth parameters.

 

In all instances in the past, this has been a failure on the server to be able to respect those parameters because the image processor is failing for some reason.  This tends to only happen on Linux based systems due to all the variables involved there with the libraries.

 

If a backdrop is the problem we may be able to address this by putting the Roku-side limits on just the background of the window.  The aspect considerations there shouldn't be such an issue as those are all pretty uniform and we can simply crop to fill them.

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...