User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 12:55 pm

I've picked up several RPi 4s (2GB models) and I'm trying to play 4K60fps content through them to no avail. I am using Raspbian Buster Full (2019-06-20) and I used apt update & upgrade to get latest. I have tried using several H.265 encoded MP4 video files as well as a few H.264 files. I have been using VLC for playback. No love so far... Usually I can hear the audio but the video is blank. Sometimes the first frame loads but nothing after.

Can anyone point me to a guide or how-to for this? What are the circumstances necessary for 4K60 playback to work?


User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 1:02 pm

Thanks, I've used LibreELEC with other SBCs successfully so I'll give it a try.

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 1:16 pm

rpiMike wrote:
Tue Jul 23, 2019 12:58 pm
Use LibreELEC

https://libreelec.tv/2019/06/libreelec- ... ha1-rpi4b/
LibreELEC plays the video but the logging overlay says its maxing at ~30FPS. System settings also say the display resolution of my screen (32UD60) is 30hz. I'll have to investigate a bit, standby...

dickon
Posts: 705
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 1:32 pm

Code: Select all

hdmi_enable_4k=1
in /boot/config.txt and reboot.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7903
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 2:16 pm

dickon wrote:
Tue Jul 23, 2019 1:32 pm

Code: Select all

hdmi_enable_4k=1
in /boot/config.txt and reboot.
Renamed in the latest firmwares to "hdmi_enable_4kp60=1" as we were getting confused people with 4k30 and wondering why when they hadn't set that.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

twrpi
Posts: 5
Joined: Sun Jul 21, 2019 11:44 am

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 4:47 pm

6by9 wrote:
Tue Jul 23, 2019 2:16 pm
dickon wrote:
Tue Jul 23, 2019 1:32 pm

Code: Select all

hdmi_enable_4k=1
in /boot/config.txt and reboot.
Renamed in the latest firmwares to "hdmi_enable_4k60=1" as we were getting confused people with 4k30 and wondering why when they hadn't set that.
hdmi_enable_4k60 or hdmi_enable_4kp60?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7903
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 4:55 pm

twrpi wrote:
Tue Jul 23, 2019 4:47 pm
6by9 wrote:
Tue Jul 23, 2019 2:16 pm
dickon wrote:
Tue Jul 23, 2019 1:32 pm

Code: Select all

hdmi_enable_4k=1
in /boot/config.txt and reboot.
Renamed in the latest firmwares to "hdmi_enable_4kp60=1" as we were getting confused people with 4k30 and wondering why when they hadn't set that.
hdmi_enable_4k60 or hdmi_enable_4kp60?
hdmi_enable_4kp60=1
Thanks for correcting me (I've edited my other post).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 6:28 pm

6by9 wrote:
Tue Jul 23, 2019 2:16 pm
hdmi_enable_4kp60=1
Thanks. Switching back to Raspbian Buster with "hdmi_enable_4kp60=1" added into my /boot/config.txt did make my desktop environment less jittery. xrandr looks to confirm my current resolution and frame rate;

Code: Select all

$ xrandr --listactivemonitors
Monitors: 1
0: +*HDMI-1 3840/600x2160/340+0+0	HDMI-1
Unfortunately I'm still not able to play 4K video using VLC. Is there an alternate player or method I should use? I have the same behavior I mentioned before, I can hear audio but the video is blank. 1 of the videos I try the first 1 or 2 frames load (it might be H.264 encoded) but nothing plays after. Lower resolution 720p videos play fine.

gkreidl
Posts: 6193
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 9:23 pm

The H264 decoder can only decode resolutions up to 1080p60.
The H265 decoder isn't working yet in any Raspbian application.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

andrum99
Posts: 1022
Joined: Fri Jul 20, 2012 2:41 pm

Re: RPi 4: 4K60 Video Playback Help

Tue Jul 23, 2019 9:36 pm

gkreidl wrote:
Tue Jul 23, 2019 9:23 pm
The H265 decoder isn't working yet in any Raspbian application.
Indeed. Although it is working in LibreElec. (That's just a note for folk browsing this thread).

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 12:01 pm

andrum99 wrote:
Tue Jul 23, 2019 9:36 pm
gkreidl wrote:
Tue Jul 23, 2019 9:23 pm
The H265 decoder isn't working yet in any Raspbian application.
Indeed. Although it is working in LibreElec. (That's just a note for folk browsing this thread).
Thanks. I have tried LibreELEC too (suggested to me near the start of the thread). In LibreELEC my monitor runs @ 30Hz instead of 60, so in KODI my videos are limited to 30 fps. I couldn't simply force a higher frequency in the UI. The 4K60 demo I have plays but stutters and skips. I remember going through this when I picked up an ODROID C2, I'll just have to figure it out again. My preference would be to just use Raspbian but that will have to wait I guess. :(

dickon
Posts: 705
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 12:12 pm

You need to add the hdmi_enable_4k=1 / hdmi_enable_4kp60=1 to LibreELEC's config.txt (probably mounted as /flash), the same as Raspbian. For some reason, it isn't on by default in the current build.

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 12:44 pm

dickon wrote:
Wed Jul 24, 2019 12:12 pm
You need to add the hdmi_enable_4k=1 / hdmi_enable_4kp60=1 to LibreELEC's config.txt (probably mounted as /flash), the same as Raspbian. For some reason, it isn't on by default in the current build.
Thanks. I tried but no dice. I also have tried adding a custom HDMI mode, nothing has worked so far. I have added the following to my config.txt;

Code: Select all

hdmi_enable_4kp60=1
#hdmi_drive=2
#config_hdmi_boost=4
#hdmi_cvt=3840 2160 60 <aspect> <margins> <interlace> <rb>
#hdmi_group=2
#hdmi_mode=87
Everything that is currently commented out has, at one point, been uncommented in some combination.

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 12:47 pm

J0hnny5 wrote:
Wed Jul 24, 2019 12:44 pm
#hdmi_cvt=3840 2160 60 <aspect> <margins> <interlace> <rb>
When uncommented the line looks like;

Code: Select all

hdmi_cvt=3840 2160 60
Just in case I get some comments.

dickon
Posts: 705
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 12:51 pm

Have you tried hdmi_enable_4k=1 ? The last version I tried had firmware that needed that option, rather than the p60 variant.

My Pi4 now has both, for when I update the firmware...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24945
Joined: Sat Jul 30, 2011 7:41 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 12:52 pm

dickon wrote:
Wed Jul 24, 2019 12:12 pm
You need to add the hdmi_enable_4k=1 / hdmi_enable_4kp60=1 to LibreELEC's config.txt (probably mounted as /flash), the same as Raspbian. For some reason, it isn't on by default in the current build.
Power. p60 requires a LOAD more power than p30, and hence makes the device hotter. All down to clock frequencies. So don't enable 4kp60 unless you are using it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 1:07 pm

dickon wrote:
Wed Jul 24, 2019 12:51 pm
Have you tried hdmi_enable_4k=1 ? The last version I tried had firmware that needed that option, rather than the p60 variant.

My Pi4 now has both, for when I update the firmware...
Do I need to explicitly add "hdmi_enable_4k=1"? I already get 3840x2160 resolutions in both Raspbian & LibreELEC/KODI @ 30Hz, I just dont get 60Hz (or anything else nearby it).

Either way I'll try the suggestion though... my last attempt had a config.txt like so;

Code: Select all

hdmi_enable_4k60=1
hdmi_enable_4kp60=1
hdmi_drive=2
config_hdmi_boost=4
#hdmi_cvt=3840 2160 60 <aspect> <margins> <interlace> <rb>
hdmi_cvt=3840 2160 60
hdmi_group=2
hdmi_mode=87
My config is getting convoluted though, I dont really know what (if any) of the above arguments are working, if any are trumping others, etc...

dickon
Posts: 705
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 1:18 pm

Yes, which is why they renamed it. It's confusing.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7903
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 1:21 pm

hdmi_enable_4k60=1 will do nothing (that was my typo).

hdmi_cvt=3840 2160 60
hdmi_group=2
hdmi_mode=87
on a recent kernel will limit you to only 4k60. DRM/KMS parses the EDID and supports dynamic resolution switching to any of the modes that are advertised by the display. Remove all of these unless you have a very good reason not to.

hdmi_drive=2 won't do a great deal as again audio support should be read from the EDID.

config_hdmi_boost=4 isn't supported on Pi4 yet.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 2:40 pm

Here is what tvservice reports in LibreELEC;

Code: Select all

RPi4LibreELEC:~ # tvservice -s
state 0xa [HDMI CUSTOM RGB lim 16:9], 3840x2160 @ 30.00Hz, progressive
RPi4LibreELEC:~ # tvservice -m CEA
Group CEA has 11 modes:
           mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive
           mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive
           mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive
           mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive
           mode 5: 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced
  (native) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive
           mode 32: 1920x1080 @ 24Hz 16:9, clock:74MHz progressive
           mode 34: 1920x1080 @ 30Hz 16:9, clock:74MHz progressive
           mode 93: 3840x2160 @ 24Hz 16:9, clock:297MHz progressive
           mode 94: 3840x2160 @ 25Hz 16:9, clock:297MHz progressive
  (prefer) mode 95: 3840x2160 @ 30Hz 16:9, clock:297MHz progressive
Here is what tvservice reports in Raspbian (after modifying /boot/config.txt);

Code: Select all

[email protected]:~ $ tvservice -s
state 0xa [HDMI CUSTOM RGB lim 16:9], 3840x2160 @ 60.00Hz, progressive
[email protected]:~ $ tvservice -m CEA
Group CEA has 13 modes:
           mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive
           mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive
           mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive
           mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive
           mode 5: 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced
  (native) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive
           mode 32: 1920x1080 @ 24Hz 16:9, clock:74MHz progressive
           mode 34: 1920x1080 @ 30Hz 16:9, clock:74MHz progressive
           mode 93: 3840x2160 @ 24Hz 16:9, clock:297MHz progressive
           mode 94: 3840x2160 @ 25Hz 16:9, clock:297MHz progressive
           mode 95: 3840x2160 @ 30Hz 16:9, clock:297MHz progressive
           mode 96: 3840x2160 @ 50Hz 16:9, clock:594MHz progressive
  (prefer) mode 97: 3840x2160 @ 60Hz 16:9, clock:594MHz progressive
if I copy the clock over maybe I can get it going...
Last edited by J0hnny5 on Wed Jul 24, 2019 3:58 pm, edited 1 time in total.

noggin
Posts: 99
Joined: Sun Feb 21, 2016 1:55 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Jul 24, 2019 2:41 pm

To precis - on the Pi4B

4K h.264/AVC video has no hardware acceleration and is unlikely to play with software decoding
4K h.265/HEVC video has hardware decoding - but only currently within LibreElec

4K30 and below modes are enabled by default when connected to a monitor that supports 4K30 and below video.
4K50-60 modes are only enabled when 'hdmi_enable_4kp60=1' (formerly 'hdmi_enable_4k=1') is added to the config.txt in the BOOT partition of the uSD card on the Pi4B.

HOWEVER - the Pi4B currently supports RGB 8-bit output at 4K50-60, but not 4:2:0 YCrCb output. Some UHD TVs - particularly early SDR models - don't support any 4K50-60 modes other than 4:2:0, so won't work at 4K50-60 with a Pi 4B. (This is because early HDMI 2.0 UHD TVs only had HDMI 1.4b hardware, and the only 4K50-60 HDMI 2.0 mode that fits into HDMI 1.4b bandwidth is 4:2:0)

4:2:2 YCrCb output may well be supported in future (it may work now - my TV is running RGB with my Pi4B) - but 4:2:0 (which requires vertical subsampling and filtering) may not be.

Also - HDMI 0 (nearest to the USB Type-C power connector) should be used NOT HDMI 1 (nearest to the Composite video and audio output)

User avatar
J0hnny5
Posts: 11
Joined: Mon Apr 02, 2018 2:59 pm

Re: RPi 4: 4K60 Video Playback Help

Mon Jul 29, 2019 2:21 pm

so to recap I'm still not able to do 4K60 playback on a RPi4. In Raspbian I can get 4K60 in the desktop environment, but not video playback. In LibreELEC I'm not able yet force 4K60 but 4K30 playback works.

I'll try again in a few weeks.

seraser
Posts: 1
Joined: Sat Nov 02, 2019 6:58 pm

Re: RPi 4: 4K60 Video Playback Help

Wed Dec 11, 2019 8:18 am

Install kodi with sudo apt-get install kodi and test, for me fine.

Return to “General discussion”