Kodi Community Forum

Full Version: issue : x265 / HEVC - video playbac shows stair-step / zig zag effect
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
======================= < original post > =======================
I just unwrapped a PC I built for my mum as a Crimbo present and ended up scratching my head quite a bit so I thought I'd better provide feedback.

Build is an intel skylake pentium G4400, no extra graphics card. So basically decoding is handled by the CPU alone
Other details include 8GB of memory & Gigabyte B150N motherboard + M2 SSD running on Windows 10 Pro (N+Win media pack)

I'm getting "visual effects" during playback, but only on files I've encoded using handbrake (HEVC, 720p or 1080p, constant quality 25, all else default)
this happens on Jarvis and the latest Krypton beta
best way to describe this is : picture for the most shows all details normally, however, there's a kind of mosaic effect.
essentially there are two lines of super large squares showing, these squares seem to have slightly different colours making them noticeable.
It's like the squares are "translucent", but are set at different percentages.
These squares are arranged diagonally like a set of stairs

I thought maybe I'd done something stoopid with my encode so I got my hands on some less than legal sources (TV series etc.. from PB)
Same issue, so it's not my encodes.
I then tried x264, no issues whatso-ever
I then tried VLC, no issues whatso-ever
I then tried MPC-HC, no issues whatso-ever
All files play just fine on my own HTPC using Kodi
...and I do not remember seeing anything on a really old Pentium PC I installed in the kitchen (this has a very old dedicated graphics card)
conclusion. Perhaps skylake pentiums not fully supported by Kodi if using the onboard graphics??

(or is this because I mistakenly installed Win 10 "N" and had to then install Windows Media pack seperately? I know I couldn't play any music until I did this so I have to wonder if maybe something is still missing)

If this has been reported elsewhere I apologise I did run several searches and didn't find anything (i.e. I hope this is useful)

Merry xmas to one and all

======================= < confirmed fix : advanced settings > =======================
(thanks Michael2063 & Fritcsh)

create an xml file called "advancedsettings.xml"
include the following text

<advancedsettings>
<video>
<forcedxvarenderer>false</forcedxvarenderer>
</video>
</advancedsettings>

save it to %appdata%\Kodi\userdata\
(for example C:\Users\[YourUserName]\AppData\Roaming\Kodi\userdata\advancedsettings.xml)

references :
278799 (thread)
http://kodi.wiki/view/AdvancedSettings.xml

======================= < confirmed fix : external players > =======================
(thanks PatK)

note : there are both benefits and drawbacks to external players, warner306 has done a very comprehensive how to, which includes these details
see : 209596 (thread)

brief summary of side effects of using an external player "watched" tracking and resume functionality will be compromised. Kodi specific onscreen overlays and controls will be replaced by whatever you link up, so while you may still get play pause etc.. in some form.
Things like this program will end at a specified time will not be available

======================= < untested fixes : sounds like the easiest solution > =======================
(thanks Gracus & FernetMenta)

intels contrast enhancement feature may be the culprit, you can disable this in the drivers control panel

* Open IntelĀ® Graphics and Media Control Panel by right clicking in the desktop and selecting Graphics Properties
* Once the software is open, you may click on Media > Image Enhancement > Adaptive Contrast Enhancement
* Uncheck the Adaptive Contrast Enhancement option.

see : 2425481 (post)
Quote:I then tried VLC, no issues whatso-ever

VLC is always my default looking for Kodi playback issues, it's basically the same code that is in Kodi (nice part of open source) but a step back, so from my point of view, if VLC works fine, then Kodi should work fine, although VLC is set for software default, while Kodi tries to default to hardware acceleration. I have found that MPC-HC proprietary drivers seems to play h265 more efficiently, and could be used as an external player stop gap measure until we have new code from hardware manufacturers and our team. I'm not a windows 10 user yet, so couldn't comment on your suppositions of the newly installed o/s. You might want to toggle some of the video attributes in Kodi and see if you can get VLC level of playback, and I have noticed that Krypton is slightly better at handling h265.

Season greetings.
Many thanks for your prompt response. I didn't expect to see anything so soon!

I should have mentioned, I did try monkeying with the auto/hardware/software decode settings. No diff

have seen another post mentioning using an external player by setting up rules in an xml file will try that next time I'm round my mums.

Another post mentions kodi is still using a 32bit decoder (where my VLC will be 64bit) and this has a big effect on performance (??and perhaps abilities??) so I will try to use 32bit VLC and check out whether this replicates the issue
As you seems to use intel IGP, you should look at this thread:

2425481 (post)
I get to the messages as I see them, if the issue is hard to replicate or some effort to diag, then my response is slow... But this area has been discussed at length throughout the forum. The 64 vs 32 is a kind of a red herring, in theory 64bit is going to be faster, but on the code books it doesn't make much difference atm. A proper developer weighed in on this in another thread and had tested an Alpha 64 bit build without any reasonable performance diffs, at least that would justify re-writing the entire code base across multiple platforms; so until we get a lot more volunteer capable coders, the road map is for the future.

I put a lot of blame on the graphic hardware industry, and it would seem their hidden agenda to get consumers to buy more, their acceleration chips should follow guidelines instead of cutting corners with new drivers and making older cards dead weight.

If VLC performs, External players (wiki) 256537 (thread) but I might pick 209596 (thread)
Here, comparison between a core i5 4200U ultra slow mobile CPU (2 cores, 4 threads) 1.6 ghz on linux and a core i 7 Quad with 4 real cores, so 8 threads 2.8 ghz whatever i7 on windows:
Image

In short: Windows SW decoder currently is roughly half the speed of the linux one ... now go and figure.
Hello b0b0baggins,
i had exact the same problem with my G4400. The tip from fritsch helped me perfectly.
Just have a look at this thread:

278799 (thread)

So you dont have to deal with external players.
I hope this helps.
Wow, looks like I have lots to try when I go see my maaaah. Tx everyone!

...and I know what you mean about drivers and deprication. I've lots of old graphics cards that are now unusable because browsers started using 3d rendering
...and after a driver update or two text became illegible
...and now windows 10 developed this issue...but only with high res monitors?? Bring back Cleartype, all is forgiven!!

FYI. I'm a dev although I doubt I could help team kodi, otherwise I would have offered. Bypassing my inbuilt pesimism, you decide.

I've used Borland/codegear/embarcadero/i think it's been sold again, for years (C++). But have never been trained so my knowledge is limited and does not cover any multi-media areas.
The rest of the world seems to use Microsoft stuff and that causes me no end of grief (when I have an integration project), because I'm like a fish out of water with anything else. At least I felt suicidal urges last time I had to do some work using MFC, talk about using a nut to crack a sledgehammer (it felt very backward)
Similarly, the only penguin I'm familiar with is my doorstop so I'd not be able to help with Linux stuff
Once upon a time I looked at bitmap manipulation and I could feel parts of my brain cry with pain so super complicated vector manipulation ain't my thang
I also hate all things web related, so that includes XML (and I think all the skins are heavily reliant on xml so that's out of the question)
The XML thing is more because it's sooo darned ineficient, an access control system I work with went xml, their databases increased in size twenty-fold. the stuff is like bindweed, bleugh!!!
I suppose what I'm saying is I've no idea how you guys n gals do it, y'all rock!

Cool Probably the one thing I could help with is on the database side of things Big Grin, but this is something y'all don't really use...and the one I work on is not very "cross platform" (MS SQL (but it is free on Windows (SQLExpress))).
Having tried the MySQL option I imagine options may not be a bad thing (Am not dissing the effort, it's just the MySQL db's died on me several times (??always after driver updates??) so I completely gave up on it)

That said, I've a painful project that's going to force me to learn some c# over the next quarter so I may become useful (C# seems to be one of the goto languages these days, read as :- most "samples" I recieve don't help because they are in c#)
At any rate if you had plans to integrate MS SQL Express, I'm yer-man and would be happy to contribute (if it's a lot of work, in about 3 months when my c# project is done)
I may also be able to help with database schema's in general...along those lines. A couple of things I learned when trying MySQL.
1) I vaguely remember bulk updating a super large text file to change the paths for media files. If all media showed a root library and there was one entry at the start of the file for the "library" (it's path and perhaps other settings) the import/ transfer procedure could be a little more straight forward...and the file would probably shrink massively ( there's that XML inneficiency I mentioned Wink )
2) If like me you have a profile for kids stuff as well as a profile for teenagers and a profile for full grown adults...and each profile contains everything from the younger versions you get a lot of duplicates for metadata, which isn't the end of the word for text but pictures can mean you lose several GB on a small SSD. Multiply this if you have numerous logins as each user creates his own database, or set of databases, and you get an SSD begging for mercy.....so if the images were downloaded once to a common location (amongst both users and profiles) this could save ooodles of disk space
Nope. He went to the left, but should not have gone there. Afterwards he did: format C: and could start from the beginning.
@b0b0baggins, I haven't been trained in any programming language, nor do I have any knowledge about audio/video processing and also forgot 90% of the advanced maths stuff I learned at school, but that doesn't stop me from a) working as a web developer writing custom applications for customers and b) messing around with the source code of Kodi to improve certain bits and pieces I'd like to see improved. Kodi is so much more than low level audio/video stuff (which is mostly done by ffmpeg anyways, so not our business), so if you already know C++, just poke around and fix/change stuff you like to see fixed/changed.
(2016-12-28, 18:59)da-anda Wrote: [ -> ]@b0b0baggins, I haven't been trained in any programming language, nor do I have any knowledge about audio/video processing and also forgot 90% of the advanced maths stuff I learned at school, but that doesn't stop me from a) working as a web developer writing custom applications for customers and b) messing around with the source code of Kodi to improve certain bits and pieces I'd like to see improved. Kodi is so much more than low level audio/video stuff (which is mostly done by ffmpeg anyways, so not our business), so if you already know C++, just poke around and fix/change stuff you like to see fixed/changed.

I do hear you. forgetting all my Bode and Nyquist plots...and what they actually help you solve has not stopped me from running my own business as a program development outfit (sounds fancier than it actually is), but I don't do web stuff...which means I don't do scripting languages or XML so I would definitely be like a fish out of water working on a lot of the kodi bits and pieces (I have briefly looked before as I would like to help). The skins are **way beyond** my capabilities (/chosen "specialisation" = SQL, hence my offer). Even the configuration scripts use XML, which while I can follow and even hand edit, I would not know where to start on programs reading that stuff. Actually that's not strictly true, the access control system I mentioned has rudimentarty XML and I have to process parts of that, which was a ballache.
I might take another look in a few months, when I'm not swamped, to see if there's anything I can do, but the last few days I had to complete my company returns, today I may not even get to go out (!) as I've got to finish my VAT returns by midnight. Since I'm posting on here rather than categorising purchases, checking receipts & calculating VAT content, I think you can tell how much I enjoy that :/ Next week I have to go to Aberdeen, the week after the shetlands, the week after that hull...then I have this C# project I'm not looking forward to. squeeze in to that tech support, installations, site visits...and development of new features and patches. My point is, I'm not making excuses. Life as a chap with many hats simply ain't that easy.
A solution I can confirm as working
(thanks Michael2063 & Fritcsh)

create an xml file called "advancedsettings.xml"
include the following text

<advancedsettings>
<video>
<forcedxvarenderer>false</forcedxvarenderer>
</video>
</advancedsettings>

save it to %appdata%\Kodi\userdata\
(for example C:\Users\[YourUserName]\AppData\Roaming\Kodi\userdata\advancedsettings.xml)

references :
278799 (thread)
http://kodi.wiki/view/AdvancedSettings.xml
2425481 (post) should be a better slution
thanks, I will take a look at that when I get back from my tour of the UK....Scotland....and the Shetlands
Assuming that also solves the problem I will update my list of confirmed fixes

FYI, if you know the sites developer...it would be nice if you could do "stickies" if you started the thread so in cases like this you can move the solution to the start of the thread.
That said, I will see if I can edit the original post to add the relevant info