4K Video Playback on Raspberry Pi 4 with LibreELEC (Alpha)

In my short Raspberry Pi 4 review, I tested 4K video output and playback in Raspbian, and sadly neither are working properly, with video output stuck to 1080p60 even after selecting 4K HDMI in the settings and yes, I double checked for “hdmi_enable_4k=1” in config.txt, while H.265 video playback is still clearly using software decode in both VLC and omxplayer.

However, LibreELEC team announced support for Raspberry Pi 4 in LibreELEC 9.2 Alpha1 release based on Kodi 18.3 and Linux 4.19.x. So I downloaded LibreELEC-RPi4.arm-9.1.001.img.gz and flash it to a microSD card with balenaEtcher.

The good news is that I could manually set the resolution to 3840×2160 and confirm it works with my TV, but the refresh is limited to 30 Hz maximum. Other refresh rates currently available include 23.98 Hz, 24 Hz, 25 Hz, and 29.97 Hz. The hardware is capable if 4K 60Hz, so it’s just a question of time before this is fixed. Note LibreELEC for RPi4 is currently at the alpha stage of development.

LibreELEC Raspberry Pi 4K
Click for 4K Resolution Screenshot

Now I went on to play some H.265 4K videos stored in a hard drive connected to the USB 3.0 port of the single board computer:

  • MHD_2013_2160p_ShowReel_R_9000f_24fps_RMN_QP23_10b.mkv (10-bit HEVC) – OK, but some frame dropped as I set refresh rate to 30 Hz (and automatic frame rate switching is not yet supported)
  • BT.2020.20140602.ts (10-bit H.265, Rec.2020 compliant video; 36 Mbps; 59.97 Hz) – OK
  • ifa_WorldCup2014_Uruguay-Colombia_4K-x265.mp4 (4K, H.265, 60 fps) – OK, but could be a bit smoother

It’s a bit hit and miss, but it should improve over time. All were shown to be decoded by hardware with “ff-hevc-mmal (HW)” video decoder.

I went on to play some 4K H.264 and VP9 videos which are NOT supposed to be supported by the hardware:

  • HD.Club-4K-Chimei-inn-60mbps.mp4 (H.264, 30 fps) – Not smooth at all
  • big_buck_bunny_4k_H264_30fps.mp4 – Extremely choppy, A/V sync issues
  • tara-no9-vp9.webm (4K VP9 YouTube video @ 60 fps, Vorbis audio) – Not smooth at all

I was expecting this result, but even worse. What’s strange is that Kodi overlay window implies some sort of hardware decoder is used for both:

  • H.264 – ff-h264-mmal (HW) with only one CPU core used for decoding
  • VP9 – ff-vp9-mmal (HW) with only one CPU core used for decoding

H.264 is not so surprising since VideoCore VI GPU support H.264 up to 1080p60, but there’s no word about VP9 at all.

Raspberry Pi 4 is supposed to support HDR, but “software support has a dependency on the new Linux kernel frameworks merged by Intel developers (with help from Team LibreELEC/Kodi) in Linux 5.2 and a kernel bump will be needed to use them”.

Watch the video below where I try 4K videos in Raspberry Pi 4 SBC.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
26 Comments
oldest
newest
chewitt
chewitt
5 years ago

The default firmware config will result in 4K30 max, but if you set “hdmi_enable_4k=1” in config.txt the 4K60 mode will show up. Also “Big Buck Bunny” is 4K H264 which is CPU decoded (H264 hardware decode is supported to 1080p) so it will stutter like crazy. 4K content needs to be HEVC.

chewitt
chewitt
5 years ago

You might need to stop Kodi, edit guisettings.xml and remove “videoscreen.screenmode” and “videoscreen.whitelist” and restart. I’m definitely looking at 4K modes 🙂

hwti
hwti
5 years ago

See https://www.raspberrypi.org/forums/viewtopic.php?p=1485755&sid=9225d7353bf1c90b00c26ed0b79d72e7#p1485755, 4:2:0 output isn’t currently supported (and given further responses, it’s unclear whether it could be supported or not).

So for 4Kp60 you would need a TV which supports it in 4:4:4 (8 bit), or 4:2:2 (10-12 bit).

Steve
Steve
5 years ago

Just to add 4:2:2 10-bit isn’t a valid HDMI 2.0 output. HDMI 2.0 only supports 4:2:2 12-bit at 2160p50-60 (and from memory also 2160p24-30). If you output 10-bit at 4:2:2 it will be padded to 12-bit. My Pi 4B is currently outputting RGB 8-bit 2160p50-60 with hdmi_enable_4k=1 and a thread at the Pi Forums confirms that 4:2:0 output is currently not supported (only valid in HDMI for 2160p50-60) – and there are question marks about the vertical chroma subsampling processing this would require. SDR 4K TVs that came to market early often only support 4:2:0 8-bit flavours of HDMI 2.0… Read more »

tkaiser
tkaiser
5 years ago

> H264 hardware decode is supported to 1080p

This is still the old VideoCore IV IP block handling h.264?

Gaetano
Gaetano
5 years ago

It’s important that it correctly decodes 2160p HEVC HDR 10bit 60Hz in hardware, possibly with hdmi mirroring (setup with TV+VPR). Only if so it’ll a very good media Player for today’s best content, for the living room

theguyuk
theguyuk
5 years ago

Sure I read it is internal bandwidth issue that limits dual 4K.

Steve
Steve
5 years ago

The Pi Devs have confirmed that 2 x 2160p60 (i.e. 2 x 4K60) output is technically possible, but in some desktop scenarios you may run out of scalers causing corruption. That’s why they are currently supporting 2 x 2160p30, 2 x 1080p60, 1 x 2160p6 + 1 x 1080p60, 2 x 1440p60 etc. only.

(After all the Pi 3B supports 2160p25 output with custom modelines 🙂 )

Gaetano
Gaetano
5 years ago

Hi Jean-Luc, no I only mean video mirroring between the 2 HDMI connections, even with one of them at 1080p. I don’t think that all TV+VPR users need 4K for both (example: if you see a ~50 inch TV from 10 foot, you’ll loose the 4K benefit I think), so one of them may be 1080P. I’ve just installed LibreElec beta and it works pretty well (4K files, HDR files are played like a charm) but I didn’t found any settings regarding the two connections, mirroring and so on. But we’ve also have to consider that it’s still an alpha… Read more »

Gaetano
Gaetano
5 years ago

It can process them with hardware decoding; I only have a 1080p setup, so I can’t verify if it really plays them with HDR.

radek
5 years ago

4K? Well, I do not have such requirements. I immediately suspected that this is a marketing gimmick with this 4k and GPU from Broadcom. I have a 2k monitor but I do not use it for video playback. GPUs from such companies as Vivante, Broadcom, ARM-Mali are simply too weak at SBC and do not go beyond FullHD. Even G52 in Odroid N2 is still not enough. This is not what Nvidia from TX series or Qualcolm adreno or even Imagination product.

theguyuk
theguyuk
5 years ago

Cheap TV boxes play such videos. As many on the internet have demonstrated.

TLS
TLS
5 years ago

Look, it’s not the GPU doing video playback, that’s for 3D acceleration. Most ARM based processors have a dedicated VPU or video processor that handles video decoding, transcoding and encoding. ARM offers a range of solutions, but there are also a range of 3rd party solutions. For ARM’s solutions, have a look here https://developer.arm.com/ip-products/graphics-and-multimedia/mali-video-processors There are two problems with these, one is that the hardware manufacturers tend to use older video processors and/or the most basic version they can get away with, so even though the solution from ARM is capable of say 4K120 suck as the Mali-V52 in an… Read more »

Arnaud
Arnaud
5 years ago

This story is very interesting. However, I have the following question: is it possible to have dual display using one HDMI and the DSI port.
Indeed, I wish to build a TV box (and more) that can also control and send audio files to my receiver without having to switch on my 55′ TV set to select the album or playlist that I want to listen to.
Using a Raspberry Pi Touch Display to control the access would be ideal. I would switch the Tv only for videos.
Thanks for your answer.

Steve
Steve
5 years ago

https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=216399&start=350 has some discussion on this wrt to dual frame buffer support in both the Pi4B and previous Pis. Looks like HDMI + DSI is a use case that is covered.

Steve
Steve
5 years ago

I haven’t seen DSI + HDMI demonstrated, but Pimoroni have shown HDMI + DPI (which uses a lot of GPIO) working in Raspbian with a Desktop extended over both displays. They used their Hyperpixel as the DPI screen.

Arnaud²
Arnaud²
5 years ago

Thanks to both of you for your reply. I guess I will have to be patient!

Arnold Chan
Arnold Chan
5 years ago

My experiences are same as you, I have tested 4k playback on Raspberry Pi 4, with latest Raspbian Buster. Both built-in omxplayer and VLC are failed to play, only Kodi can play.

But for some reasons, I have to play video via Python scripts, and Kodi doesn’t provide good connection with Python scripts (please correct me if I am wrong), so I am waiting for upgrade of OMXplayer or VLC player.

Arnold

Hasmin
Hasmin
4 years ago

I’m considering getting the Pi 4B for 4k h265 playback but… what does it do with 4k HDR (Rec 2020) content on a 4k SDR screen? Does it convert the colorspace or does it show full colours?

rpi4 luv
rpi4 luv
4 years ago

4k x265 10b hdr seems not to choke kodi atop android on firefly rk3399 4g/32g

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...