[RPi5] YouTube 4K/wqhd playback stutters/freezes

  • Hello everyone,

    I'm having issues with YouTube playback on my Raspberry Pi 5 using the official YouTube add-on for Kodi.

    Whenever I try to play videos above Full HD (e.g., WQHD or 4K), the video freezes after a short time while the audio continues to play. Fast-forwarding or seeking within the video also doesn’t work properly. All affected videos use the VP9 codec.

    As soon as I switch back to 1080p the video runs again and I can skip normally.

    Interestingly, Jeff Geerling’s writes in his blog post that YouTube 4K 30 fps playback runs "butter smooth" on his Pi 5.

    I’ve already tried adding

    Code
    SDRAM_BANKLOW=3

    to rpi-eeprom-config, but unfortunately that didn’t fix the issue.

    Setup details:

    • Raspberry Pi 5 (4 GB RAM)
    • LibreELEC (latest version)
    • Official YouTube Kodi add-on


    I have already reset the add-on cache without success.

    What is causing the streaming problem? Why cant my Pi5 handle more than 1080p?

  • I find "4K" depends on the stream bitrate which normally correlates to the refresh rate. Most 4K@25/30 media in VP9/AV1 plays fine as the CPU has enough grunt to handle software decoding. If the stream is 4K@25/30 with a high bitrate (rare, as YouTube processes all uploaded media so you get a level of bitrate conformity) or if the refresh rate is 4K@50/59.94/60 the stream normally stutters like hell as the CPU simply doesn't have enough grunt to keep up.

  • I find "4K" depends on the stream bitrate which normally correlates to the refresh rate. Most 4K@25/30 media in VP9/AV1 plays fine as the CPU has enough grunt to handle software decoding. If the stream is 4K@25/30 with a high bitrate (rare, as YouTube processes all uploaded media so you get a level of bitrate conformity) or if the refresh rate is 4K@50/59.94/60 the stream normally stutters like hell as the CPU simply doesn't have enough grunt to keep up.

    Thx for your answere!

    The Youtube streams are as follows:

    2160p (4k) (vp9, 3840x2160, 14868968 bps)

    1140p (QHD) (vp9, 2560x1440, 4470482 bps)

    1080p (FHD) (h264, 1920x1080, 2288879 bps)


    Only the h264 Full HD stream works reliably.

    Is it not possible to stream QHD or 4k 30 fps reliably on the Pi5?

    Can you classify the bit rates for me? Should the Pi be able to handle this, or is the bit rate too high?

  • I've never done quantitive testing to find the go/no-go bitrate values for an RPi5 so I can't really comment in that level of detaill. I can only state that most lower refresh-rate 4K/VP9 media that I've played streamed fine, and most higher refresh-rate 4K/VP9 media stuttered like hell because the CPU couldn't handle the workload. Standards like QHD/FHD that solely define the number of pixels in a frame are only one of many variables that impact the stream bitrate (bit-depth and colorspace are also important) so trying to simplify to "FHD works, QHD does not" is not possible. If you encode media with the right settings 4K60 VP9 will play. You'll need to compromise the quality of the image to achieve it, but it will play. You can equally generate 1080@25 media with encoding features that challenge the CPU and tie it in knots. The devil is in the details. NB: the YouTube add-on has controls to cap VP9 at 4K@30 and that normally keeps things in the realm of the possible.