[RPi4] Horrific 4K Performance

  • Hey all,

    I bought an RPi 4B w/ 1GB RAM specifically to play 4K content w/ LibreELEC and have been putting it through its paces. (I know 1GB RAM is cutting it a little close, but AFAIK it is still supported and I couldn't find anyone saying that it wouldn't be able to handle normal playback, so I figured I'd save a few bucks...which I may come to regret.)

    Most of what I watch is <= 1080p, and the Pi has been able to handle that fine, but when it comes to 4K content my experience has been utterly horrific. Even trying to click "play" on local 4K SDR HEVC files causes a black screen and total lockup (and crash, if I'm lucky, although most of the time it just freezes and requires me to literally pull the plug -- especially frustrating because it doesn't even generate a useful log file if I do that). On the rare occasions where I can actually get a file to play it stutters horribly (like, <1fps) and then will freeze/crash if I try to back out to the main menu, or even just bring up the OSD.

    My media is usually being accessed through a Jellyfin server via the official addon. At first I thought it might be an issue with Jellyfin unnecessarily transcoding or something, but even local 4K files fail to play. I have been slowly working my way through the Jellyfin test videos to see if maybe there is some sort of "trigger," but it's a matter of "locks up instantly" versus "might lock up after a few seconds of playback."

    This certainly isn't the reliable workhorse experience I've seen others talk about when mentioning the RPi 4/4B in these forums.

    FWIW, on the (very) few occasions that I've actually gotten a useful crash log vs. just a lockup, it's always an OOM issue: is it just that 1GB RAM isn't enough for 4K playback? I'm testing on an HDR-10 capable 4K monitor with an 8k@60Hz-rated cable and an official RPi 4 power supply, so those shouldn't be the issue. And yes, I have read the wiki page...

  • After continued investigation and experimentation with test files, it seems like 10+bit 4K content crashes consistently, but 8-bit 4K content will play okay so long as it has a bitrate of <70M or so:

    • 4K HEVC 8-bit 80M file plays, but poorly
    • 4K HEVC 10-bit 80M crashes
    • 4K HEVC 8-bit 60M plays okay, w/ GUI lag
    • 4K HEVC 8-bit 40M plays smoothly
    • 4K HEVC 10-bit 40M crashes
    • 4K HEVC HDR10 40M crashes

    The bitrate limitation aligns with the findings from this forum post, so that tracks. It's disappointing to be having issues w/ 10+bit content, though, given that the wiki indicates that LibreELEC "support[s] 8/10/12-bit output for great results with 4K HDR" on Pi 4.

    I suspect this is, in fact, just a consequence of my low RAM (and subsequently low CMA). I would be eager to hear confirmation if indeed this is the case. If so, I'll go propose a change to the wiki so no one else makes the same mistake I did...