NUC10 + LE13 + HEVC

  • Maybe this was discussed already here, but I cannot find anything specific. Perhaps my adventures will help someone.

    In theory NUC10 should be fine with HEVC (hardware decoding is available in 10th gen.). But not in my case, the HEVC movie was just generating sound and video screen was not refreshing. I could see multiple entries in the log file, like: ffmpeg[0x1c3b8a30]: [hevc] hardware accelerator failed to decode picture.

    So it helped to disable hardware acceleration in the Player settings. Apparently hardware driver was not as good as the software driver. Attaching also screenshot for the reference.

  • The error is reported by FFMpeg though since it's in codec code (and switching to software decode works around it) the problem could equally be in the underlying Intel drivers. If you are into self-building images and experimenting there are pull-requests for kernel bumps to Linux 6.9.5 and 6.10-rc3/4 open on our GitHub repo. Bumping FFMpeg to something newer is harder as Kodi has hard API dependencies; v7.x won't be possible but a later 6.x release might work. `At some point we'll move LE13 to Kodi 'P' which will bring a bump to FFMpeg v7.x too, but until then there's not much to do I think. I would be very surprised if it had anything to do with BIOS as that's low-level and codec things are some way above.

    NB: The whitelist suggestions here would help your overall config https://wiki.libreelec.tv/configuration/4k-hdr but will make no difference to the reported problem.

  • Thanks for the pointers. I compiled PR for 6.10-rc3 but the latest kernel didn't change anything.

    In case you want to look int the log file, first part shows software codec (it works), second part shows hardware support enabled (it breaks).

  • Hi chewitt, I checked that all these HEVC samples work well with and without hardware acceleration, so it seems that there is something specific with my tested HEVC stream.

    I could provide like 10 sec sample of that failing HEVC stream for further investigations, but since simple hacks with playercorefactory/ffmpeg are not working with the new Kodi and this is prioprietary Disney contents I suppose I would need some guidance (PM?) how to proceed with this.

  • smp logged the same issue here: https://github.com/xbmc/xbmc/issues/23699

    The log in this thread also shows the same issue (no insights in the threads, only whinging):

    Does bumping ffmpeg to 6.1.1 help? .. I'm expecting 'no' but it would be good to eliminate the idea.

    Can you also enable ffmpeg component logging in Kodi settings and then regenerate a 'bad' log. I'm wondering if ffmpeg will show more internal info.

  • I'm using that setup: <setting id="debug.setextraloglevel">128,2048,32768,262144</setting> so ffmpeg is covered. I didn't try with ffmpeg 6.1.1 though.

    I tried that sample file attached to 23699 and it works fine for both software codec and hardware acceleration, see the log. As expected, with vaapi enabled it plays very smoothly, while it slightly stutters with software codec.

    So I suppose it is something else im my stream which causes these issues.

  • Ok, so to complete this journey here is the log with Linux version 6.10.0-rc3 and FFmpeg version 6.1.1, the stream is not playable when hardware acceleration is enabled.

    Let me know if you think I can contribute with anything else.

  • Some more forensic analysis :D

    Here are the stream properties:

    Suprisingly it plays well from the file, even with enabled vaapi, and the same content fails with vaapi when it is streamed. See attached 2 screenshots from playing file and playing the stream.

    So perhaps the problem is not really in ffmpeg or drivers/kernel, but somewhere between InputStream Adaptive / Disney+ Addon / FFMpeg?

    EDIT: I forgot to add log file.

  • I might be having a similar issue trying to play a 4k SDR HEVC video on a Celeron J5005 with video acceleration enabled.

    The audio plays, but the video does not appear, and instead the menu interface starts flickering.

    Video info


    Video
    Title: 4K HEVC SDR
    Codec: HEVC
    AVC: No
    Profile: Main 10
    Level: 153
    Resolution: 3840x2160
    Aspect ratio: 16:9
    Anamorphic: No
    Interlaced: No
    Framerate: 23.976025
    Bitrate: 15150 kbps
    Bit depth: 10 bit
    Video range: SDR
    Video range type: SDR
    Pixel format: yuv420p10le
    Ref frames: 1

    The video is being played through Jellyfin's Jellycon, so technically streamed, though the Jellyfin server itself is hosted inside a docker container on the same machine and accessed via a localhost ip.

    I will post a LE log as soon as I am back home.

  • IIRc this bug was introduced way back in with graphics switch from le9 to le 10 (or was it 10 to 11), I forgot. That was also the switch that broke hd audio passthru on intel systems (used work ok before that).

    If you go look for it, you might find the "we give up on Intel.." mail in the KODI forum around that time...

    Which is why I don't believe LE will ever come out of it's "raspi is the only system we really work for " niche. might as well go for it.

  • Oh sure, just be patient enough and all the problems will magically solve themselves! 😀

    With the following nightly LE release I can play above stream without problems:


    However someone with fresh eye catched up that it originally failed on HEVC stream and now it is openning H264 stream, so perhaps Kodi in this version has different preferences - not sure if H264 stream was available originally or was added later by Disney...

    Edited once, last by adam.h.: Merged a post created by adam.h. into this post. (October 3, 2024 at 12:28 PM).

  • I don't believe LE will ever come out of it's "raspi is the only system we really work for " niche

    These days LE runs on a wider range of hardware than ever before, but the level of support we receive from upstream maintainers on Intel hardware and most ARM SoC platforms isn't equal to the support that we see from the RPi developers. Project staff are frequently asked for recommendations. Do we suggest something we know has a few glitches and glacial support (Intel) or relies completely on community development (Allwinner, Amlogic, Rockchip). Or do we suggest an RPi board with few issues to report in the first place, and anything we do flag is normally fixed under 24 hours by Engineers super-keen to help and get it resolved. Our influence on the userbase is minor though. Recent modern NUC devices and derivatives are good, but not as-good as the devices that NUC reputations were built upon in the past, and users talk to their friends and relatives and the easiest-to-use and reliable devices are the ones that are purchased most.