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.
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:
- Beauty_3840x2160_120fps_420_8bit_HEVC_MP4.mp4 (H.265) – OK
- 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.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
26 Replies to “4K Video Playback on Raspberry Pi 4 with LibreELEC (Alpha)”
I’ve just noticed that if pixel format is set to “rpi” videos play smootly, but when set to “yuv420p” video are choppy.
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.
I’ve added “hdmi_enable_4k=1” to config.txt as follows:
and rebooted the board:
But I’m still unable to select anything above 30 Hz.
About “Big Buck Bunny” oops… I don’t know why I really thought it was H.265 when I played it.
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 🙂
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).
OK. So potentially the same problem I had with Rockchip RK3288 processor four 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 (as it’s an HDMI 1.4b bandwidth standard and didn’t require HDMI 2.0 18Gbs rates to be supported) Also some UHD TVs only support the higher bitrate HDMI 2.0 flavours on certain HDMI inputs and not all of them.
> H264 hardware decode is supported to 1080p
This is still the old VideoCore IV IP block handling h.264?
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
2160p HEVC HDR 10bit 60Hz video decoding should eventually work. HDR will need more time as explained in the post.
If by mirroring you mean using the two micro HDMI ports @ 4K 60Hz, then it’s not going to happen. The hardware can’t handle it. For dual display setup only 2x 1920×1080 @ 60 Hz is currently supported, and they are working on having 2x 4K @ 30 Hz to work.
Sure I read it is internal bandwidth issue that limits dual 4K.
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 🙂 )
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 release … the first release for PI4, that at the end of the jokes was announced only a few weesk ago! 🙂
This wonderful RPI4 give me the chance to take away from my hall an Intel Kaby Lake system I used for mediaplaying (the amlogic STB soffered for HDMI blanks in my setup); Intel still didn’t supports HDMI-CEC (Raspberry does!) and now I can use this Kaby as a PC … good! 😛
Do you mean HDR is already working? Or just that the RPI4 can play HDR video files, but not process the HDR data just yet?
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.
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.
Cheap TV boxes play such videos. As many on the internet have demonstrated.
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 MP4 design, the MP1 only does 4K30 decoding. The other problem being lack of drivers, closed or open source available without a license, as without this, the VPU isn’t of much use.
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.
Interesting question, but I just don’t know the answer. So I asked in Raspberry Pi forums: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=243812
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.
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.
Thanks to both of you for your reply. I guess I will have to be patient!
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.
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?
4k x265 10b hdr seems not to choke kodi atop android on firefly rk3399 4g/32g