RPi5 - H.265 Main 10 HDR stuttering - rpi-hevc-dec DPB errors

  • Hi all,

    I've been troubleshooting persistent stuttering when playing 4K HDR H.265 content on my Raspberry Pi 5 running LibreELEC 12.2.1 and wanted to share my findings in case it helps others or someone knows a fix.

    My setup:

    • Raspberry Pi 5 running LibreELEC 12.2.1 (RPi5.aarch64)
    • Synology DS418play NAS serving files over NFS
    • Optoma UHZ35 4K beamer via Denon AVR-X2500H receiver
    • All connections via Cat6 gigabit ethernet and 2.0 HDMI cables

    The problem: 4K HDR H.265 files stutter for 4-5 seconds every 1-2 minutes. Multiple different files all exhibit the same behaviour.

    What I've already ruled out:

    • Network speed is fine (confirmed gigabit via ethtool)
    • SD card speed is fine (87 MB/s confirmed via dd)
    • CPU usage during playback is only ~30%
    • Cache settings are optimized (500MB buffer, readfactor 20 in advancedsettings.xml)
    • NAS drive hibernation is disabled
    • Refresh rate switching is working correctly (3840x2160 @ 23.976Hz)
    • LibreELEC is fully up to date

    What I found in the logs: The kodi.log shows the file is hevc (Main 10), yuv420p10le, bt2020, smpte2084 and the following errors repeat constantly during playback:


    Code
    kernel: rpi-hevc-dec 1000800000.codec: Missing DPB ent 0, timestamp=0
    kernel: rpi-hevc-dec 1000800000.codec: Missing DPB ent for col
    ffmpeg[0x0]: [hevc] Could not find ref with POC 240
    ffmpeg[0x3a48370]: [hevc] frame_post_process: Decode fail
    ffmpeg[0x0]: [hevc] First slice in a frame missing.

    The decoder being used is CDVDVideoCodecDRMPRIME via /dev/dri/card1.

    Disabling hardware acceleration results in unwatchable performance (as expected for 4K software decode), so that's not a viable workaround.

    My question: Is this a known issue with the rpi-hevc-dec driver on Pi 5 for Main 10 content? Is there a nightly build or kernel parameter that addresses this? Any workaround short of transcoding all my files to 8-bit?

    Thanks in advance!

  • The hardware decoder is reporting missing information in the media; which normally indicates a media problem and not a decoder problem. FWIW, i'm running my own RPi5 development image (LE13 not LE12) with a broadly similar setup and I don't see the same errors with a wide selection of test, broadcast, and self-ripped 10-bit HEVC media.

    Feel free to test https://chewitt.libreelec.tv/testing/LibreE…-12.90.1.img.gz - make a backup of /storage/.kodi first as Kodi does not support downgrades. There are also some binary add-ons missing in the repo that image uses right now, but that will resolve itself over the next 24h or so as they are built and published.