Line of corrupt pixels on poster / thumbnail

Hi, hoping someone can suggest a way of troubleshooting this issue…

My system is as follows, all devices running 19.3 updated to latest build as of today. All using Estuary skin.

1 Pi 4 acting as server via NFS, running headless with USB HDD connected containing media. Only .nfo are present, no artwork.

1 Vero 4K+ sharing library from server via MySQL

1 Pi 3 sharing library from server via MySQL

When viewing TV Shows or Movies and the Viewtype is set to List, on some poster art there is a vertical line of 1 (possibly 2) pixels on the right hand side. This is sometimes a solid white line, sometimes dotted, sometimes very irregular or corrupt looking. The rest of the image is perfectly fine.

If you scroll up or down so that the Movie or TV Show is no longer visible in the list, then scroll back to it, it sometimes will cause the line to disappear or change from being solid/dotted/corrupt or vice versa.

If you enter the info page for the selected Movie or TV Show, the poster art is always perfect. However if you go to Choose Art, the line is sometimes visible again on some of the thumbnails you can choose from.

If relevant I am using TheTVDB (new) for TV scraping, The Movie Database Python, for Movies.

When I have identified a thumbnail which is showing the vertical line in the GUI, I have checked the Thumbnails folder /home/osmc/.kodi/userdata/Thumbnails on both the server and client machine, but the actual .jpg shows no such issues.

Therefore I’m wondering if this is a case of the corruption being generated on the fly, or if there is a 2nd cache which temporarily holds in use artwork.

I have made the decision to backup and remove my Thumbnails folder and Textures13.db files to allow the artwork to redownload but I can already see several instances of the line reappearing on some posters.

Update…

When reviewing some of the newly downloaded posters I scrolled through them in the list, verified they were good, then scrolled back only to find that previous good images now had a line of corrupt vertical pixels.

Again, if I go into the info page for the selected media the image (I’m presuming the same artwork file) is displayed perfectly. Exit out to the list view and the line is back again.

I’ve also switched to the OSMC skin and verified the issue also occurs (albeit not as frequently).

Any ideas what’s going on here?

I should add this issue occurs on both my 4K TV with GUI resolution set at 1080p and my Plasma set at 1360 x 768 though as yet doesn’t appear to be affecting my test install of Kodi on my laptop at 1366x768.

Can you show us a photo of this issue?

It could be a scaling issue

Can you confirm that the Kodi userdata directory (Thumbnails and Textures) aren’t being shared across devices with something like an NFS mount?

Hi Sam, thanks for responding. No I haven’t knowingly set up a mount for anything other than my media sources on the server Pi.

Here’s a close up shot of the issue. I just refreshed the artwork for this TV show. Verified it was OK, then scrolled down and back up the list. When it was selected the corrupt white line was then visible

While we are on the subject of textures and thumbnails, perhaps you could clarify something for me…

When following the guide https://kodi.wiki/view/MySQL/Setting_up_Kodi, step #5 does say to copy textures13.db and thumbnails folder from the server device to the clients sharing the mqsql db. I will have done that originally when setting things up with the library as it was at the time.

As I understand it, each media file is given a hash and the corresponding artwork uses that hash to identify itself to the library. If I scan my for new media on say my Vero 4K+ the film/show will appear with the relevant artwork on the other devices, so isn’t it sharing this artwork and then caching it anyway?

Apologies, I’ve given some incorrect info. I’ve just been checking the Thumbnails directory on my Pi 3 client and have found that the corrupt line does actually appear on some of the .jpg files (movie and TV artwork as well as actor thumbnails.) Does this point to a problem with the way the images are being cached?

We’ve looked at this issue before (a few years back) and it seems it’s a general Kodi issue… Kodi’s image scaling is not good at all (if no OpenGL is present which can be utilized by Kodi to do better scaling). Unfortunately, nothing much has changed regarding this since we last checked.

1 Like

Hi, thanks for your input. Just trying to understand the process of what is going on here. As I’ve now discovered that the corruption is actually embedded in the files (I’m presuming as they are cached) is there any way to force the system not to cache them or any other workaround? I’m ultimately trying to discover if starting to use a media manager and using only local artwork would be pointless.

This is 100% optional and unless you have some significant bandwidth restriction or data cap on your internet it is likely to be worth the effort.

When you scrape an item Kodi looks for local art and if it doesn’t find it then it takes the info it got from scraping about where the online artwork is and it downloads that. Kodi at this point displays in the UI art that it just downloaded and then as a separate process saves a scaled copy into the “Thumbnails” folder and makes a note of that in texturecache.db. From that point forward Kodi will only bring up the artwork that had been saved to the cache. In a MySQL setup the clients that didn’t do the scraping will automatically generate this cache on demand. The location of what art is to be displayed is stored in the shared db so when the clients go looking in texturecache.db and don’t find an entry they just download and cache on their own.

I don’t see a media manager making a difference. You could try changing the resolution of the cached thumbs and see if that helps. You would need to edit your advancedsettings.xml file and include something like…

<imageres>720</imageres>
<fanartres>1080</fanartres>

Thank you, I appreciate you explaining the process to me, it makes a lot of sense with the behaviour I’ve been seeing.

If I were to set the cache resolution in advancedsettings.xml, would I just do that on the server Pi? I very rarely do a library update using that Pi so I’m guessing I might need to set it on all devices.

Also would I then need to do a complete refresh of artwork or would Kodi rescale the images that already exist in the cache?

EDIT - I notice from checking the library artwork section of the wiki that there is an option for imagescalingalgorithm, do you think it’s worth changing this? If so any idea what the default option is or what a suitable setting might be?

It would be added to all devices you wanted to set the resolution change on since every device is caching it’s own set.

It will not touch existing cache files. You could delete texturecache13.db and the Thumbnails folder and restart Kodi and then it will recreate the cache on it’s own using the new resolution.

That settings doesn’t do anything with OSMC.

Thank you so much for the advice, I’ve decided to try this method out on my 2nd client Pi and for now I’ve set imageres and fanartres to 9999 to see if there’s any impact on GUI performance. As it stands I’m yet to see any return of the corrupt artwork.

Once I’m happy that everything works nicely with uncompressed artwork, would I be right in thinking it would be easiest to make the edits to advancedsettings.xml on my other devices then delete their Thumbnails and Textures13.db and copy the ones from client Pi 2 over, just to avoid having to wait for everything to download again?

On that subject, do you know if there’s any command I can use to check up on what the system is currently doing with regard to downloading artwork, or is it just a case of running up and down the movie and TV lists to see if I’m going to need to manually refresh some entries?

Thanks again!

For some reason, even after installing Texture Cache Maintenance Utility and running ./texturecache.py c movies, despite it looking as though it was seeking out and downloading missing artwork, I’m still missing many images in my library. It’s now been several hours since I created a new SD for my 2nd client Pi, connected it to the server Pi via MySQL but it doesn’t appear to be doing anything in the background.

What are my options here, other than individually refreshing each movie and TV show with missing artwork?

I doubt this is a good idea. Allowing the artwork to be cached larger than the UI resolution is just wasting space and increasing the amount of work that needs to be done to render the UI on the fly. Although possible there may be some increase in quality by not resizing the images twice (once to scale down for the cache, and a second time when it is being rendered on the screen), I have doubts it would be very noticeable. Furthermore due to a bit of an oddity in the scaler it has been proven that larger resolution cache images can sometimes produce lower quality images in the UI. This does seem a bit dependent on the skin as the settings I use (what I posted above) to me look better than OSMC stock resolution in Estuary (which is the skin I use) but they look worse in the OSMC skin (which is what the stock resolution we have set is made to optimize for).

I suppose it depends on the size of your library but the images are only cached once they are accessed the first time by the UI so other than the first couple times you run up and down your main library lists the caching isn’t normally something you would even notice going on. I can tell you I have been running this type of setup for a very long time with many installs and have never felt the need to bother trying to copy the cache from one client to another.

I suppose you could probably use top through ssh and look at CPU usage. I think your over thinking this one a bit though as artwork should show up within seconds regardless.

It has been a while since running that app but from what I remember everything that was happening was while it was showing progress.

When you initially scrape an item into your library it stores a file path or url into the database linking to the original artwork. If any of these links go bad then there is nothing in Kodi to automatically seek out a valid replacement. If you have a database that is many years old then it stands a good chance to have quite a few bad links do to changes at both TVDB and TMDB. Your choices to rectify this are…

  1. for every movie or TV show with missing art bring up the information window and click “refresh” to force a rescrape

  2. …context menu>manage>delete and then update library to force a rescrape

  3. videos>files>(highlight source)>context menu>change content> set to none, OK, yes to remove from library. Once it finishes cleaning your db then context menu>set content> setup your preferred scraper again and rescan your items. Although this method for later version of Kodi 18 was removing watched status, I believe they changed back to the old setup and watched status is back to being persevered doing it this way.

EDIT: On a client where all the artwork is still there in the cache you can have Kodi export the library to individual files so you can do #3 above and make your db updated to using local art. This means for other clients they don’t need to go to the internet to get art and it is also resized (because it is only saving what is in the thumbnails folder) so the clients don’t need to resize. However in your case you said your cached files themselves have the corruption so this is likely not a valid solution to your missing art issue.

Keep in mind that Kodi’s native scaling of images when they’re rendered becomes worse and worse the larger the source image is… This might even decrease image quality.

OK understood on the resolution issue. I’ve gone with 1080 for now as there doesn’t appear to be much if any lag on the artwork that is currently available.

However, having gone for option three, setting all my sources to none and then resetting them to their actual type to then rescan into the library.

I’m still only getting artwork for movies and shows which I remember previously setting manually. Has anyone got any last minute ideas before I go for deleting everything and starting from scratch?

Thank you

Are you using any nfo files? If you don’t have any nfo files then there isn’t any reason why the artwork shouldn’t be there for almost all, if not all items. You might want to check your actual file system just in case you did a library export in the past and just forgot about it.

Yes there were some NFO files in the mix that I just didn’t think to check for. Images are now appearing after rescraping the source, thank you.

My (hopefully) last little issue is that where the images for movies (scraped by TMDB Python) seems to be avoiding the corrupt line issue, whereas TV shows (scraped by TheTVDB new) is still getting instances of it.

Same situation as before. The artwork looks ok in the list and then after scrolling up and down can reappear with a white line of various styles. It also is visible in the refresh artwork preview window when selecting which remote artwork to download.

As I understand the ‘imageres’ setting should cover all artworks both TV and movies so the only difference here is the scraper. Any thoughts what might be going on or a possible fix?

Thank you so much again for all the assistance so far, hoping that the end is in sight for this niggly problem soon!