HEVC/4K with the HD Player

Play your own HEVC videos now

A new major feature has been released today: You can now upload your own HEVC encoded videos. This allows 4K video playback on the Pi4.

You need to update your HD Image/Video player package to the latest version. Additionally you need to enable the next setup editor interface. You can then upload HEVC encoded videos and use them in any HD Image/Video based setup.

There are still some limitations. Some a inherent to the way the Pi4 works:

  • Right now only a single HEVC video decoder can be used at once. This means that a HEVC video cannot be preloaded while another video is playing. Instead the video loading process can only start once the current video has finished. As a result the HD image/video player now has a 0.5s gap while switching to HEVC videos.
  • Some HEVC videos cannot be rotated by 90 or 270 degree due to limitations (or a bug?) in the Pi4 firmware. It seems this only affects 10bit videos, but further investigation is needed. Unrotated or 180 degree rotated videos work fine.
  • HEVC videos cannot completely replace H264 videos. For example HEVC videos cannot be arbitrarily rotated, as needed in the magic video wall player for example.

More packages soon

The HD player is only the beginning. The new abilities of info-beamer hosted will soon be added to more packages. Stay tuned…

Some technical information

The new HEVC feature of the Pi4 complicates configuration a big. Up to the Pi3, all Pi devices were compatible with each other. Configuration was easy as a result. With the Pi4 this changes. The HEVC video codec is only supported on the Pi4. A setup using a HEVC encoded video cannot run on a Pi3 for example. The result is the new features information added to assets, configuration options and devices. The new setup configuration editor uses this information to ensure that setups you create can only be assigned to devices that can actually play them. And of course prevents adding an HEVC video asset to a setup if it’s already assigned to an older Pi.

Similarly an HEVC encoded video cannot be used in all setups that previously only supported H264 videos. It’s for example not possible to use HEVC video in the magic video wall, as HEVC encoded videos cannot be rotated freely. This limitation can now be expressed using the features value for resources.

The asset list API call now returns a features list value for each asset. This list describes which technical feature on a playback device is required to play this asset. Here is a full list of features. Similarly each device returned in the list devices API call now returns a list of supported features in .hw.features. Assets are not directly assigned to a device. Instead they are part of the configuration of a setup. A setup is based on one or more packages and each configuration option that allows the user to select an asset can now also specify which features are supported by the code using that asset. Check out the change that added HEVC support to the HD player as an example of how all that works together: The listed "hevc" feature indicates that the user can choose HEVC videos in addition to H264 videos within the playlist. The Lua code that plays this asset on a device as been updated to handle the new "hevc" format.

Feedback welcome

This is a complicated change and the way the new setup configuration interface present the various limitation when working with HEVC videos can probably be improved. But it’s a start. Feedback on the new HEVC feature is very welcome. If you run into problems with videos that cannot be played, place get in contact!


Is it possible to upload 4k still (not video) images some way for testing?
The host is still denying resolutions >2048px.
Or do I miss some additional updates+ (All updated per your instructions!)

Not yet. Reason is that it’s not yet sure how to best prevent accidental 4K images on older devices: If you upload a 2048x2048 JPG right now, you can play that on all devices, including Pi1-3. You can then replace that asset by uploading a new image with a higher resolution while using the same filename. The asset will be replaced and synced to all devices where playback breaks because older Pis cannot load these files.

In theory the same problem exists for videos, but it’s less likely to happen: Accidentally uploading a higher resolution image can be just an oversight and it would be bad if playback breaks in that case. Ideas welcome.

Is there a way to upload 4K video at 3840x2160? I’m using the latest ‘HD Image/Video Player’ with the ‘experimental editor interface’. I’m able to upload 3840x2160 jpeg using this interface, but not video. Help please?

1 Like

You’ll have to use the H265 video codec. Very likely you’re using H264. The upper limit for H264 is FullHD, so no Pi can decode H264 with a higher resolution. H265 raises that to 4K on the Pi4.

1 Like

Thank you for pointing that out! The video file was in H264. I’ve requested an export in H265 and I’m confident it will work. Thanks for the help!

This is a great feature. One issue I’m running into: an HDR10 file (HEVC Main10) plays, but not in HDR - connected to an LG OLED, it does not switch to HDR mode. (This is perhaps an HDMI signaling issue, perhaps another issue). Confirmed that HDR10 can play from a Pi4 2Gb (using LibreELEC/Kodi), so cabling and basic HW func is there. Any insight? Is this fixable in the LUA script?

info-beamer does not support HDR at the moment.

Thanks. Is it on the roadmap? Do you think it’s a big effort? (I guess there’s HDMI driver work, maybe, plus using perhaps a different OpenGL surface config?)

Not on the roadmap for now. It might be added once the HEVC player gets a rework to use the V4L2 API. There is no ETA for that unfortunately.