2 × micro-HDMI ports (up to 4kp60 supported)
Would be cool if you we could make video walls with just 1 Pi4 or scheduled player that support two different playlists; one per screen.
2 × micro-HDMI ports (up to 4kp60 supported)
Would be cool if you we could make video walls with just 1 Pi4 or scheduled player that support two different playlists; one per screen.
Totally, but let’s start with the basics first: Getting anything drawn on the Pi4
Speaking of: I managed to overlay a GL layer (the cube) over a video (that lego thingy in the background).
That might not look like much, but proofs that what info-beamer did in the past can also be done on the Pi4. The only major uncertainty now is the ability to render videos into a texture. This is for example used in the magic video wall to rotate the videos into their correct position. No idea how to approach this yet…
Another update and some observations, but first a snapshot:
This is existing info-beamer code running on a current build of the Pi4 version. This version now uses the DRM & GBM APIs to open up an OpenGL context. This GL layer can then be combined with video layers as seen in the above image where a video is used as the background. This means that packages like the HD Player should in theory work with that version. \o/
Some observations:
gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)
is guaranteed to work.If you want to play around with the current version on Raspbian buster, feel free to download this preview release for evaluation purposes only.
Making good progress
I’ve also found examples that show how to decode video into GL textures on the Pi4. But that’s in no way added to info-beamer pi yet. It’s all still very early and the complete programming environment feel very unstable and undocumented. Basically the same mess I had to go through when initially porting info-beamer to the Pi a few years ago. I also expect quite a few bug fixes on the Pi4 firmware/kernel itself before I would recommend using it in production.
Don’t expect any major updates in the next 2-3 weeks. I’ll have to ingest a lot of new (underdocumented) APIs.
Until then, my recommendation would be: Unless you need 4K in the future, the Pi4 doesn’t seem to bring anything major to the table yet. It needs more power, gets hotter and will have to proof itself first. For now, just use Pi3s
Smallish steps. A first official info-beamer pi for the Pi4 prerelease is now available on the info-beamer pi download page. A few things that don’t work right now:
Documentation on all of that (e.g. linux DRM/GBM/mmal/how to play H265) is utter garbage, so it’s continuing to be a slow progress due to a lot of trial and error and waiting on more usable example code or documentation. It’s all quite frustrating.
A new info-beamer hosted OS using buster and this new info-beamer pi release will eventually be available for testing. Don’t expect that to be usable in any kind of production environment for a while though. The recommendation to use the battle tested Pi3 still stands
I’ve successfully managed to get the dual display support for GL content. See this picture:
The Pi is connected to the left and top monitor and powers both of them. In this example the combined screen area is then 3840✕1080 (so 2✕ FullHD) and I load a 3840✕1080 JPEG and show that across both screens. The updated info-beamer pi version is available now.
Here’s how that works currently (subject to change in the future):
INFOBEAMER_DUAL_DISPLAY=1 ./info-beamer example
This instructs info-beamer pi to try to open two attached displays. It will use the preferred mode from the display connected to the HDMI0 port on the Pi (in the above case that’s 1920✕1080) and will try to find a matching mode (same width/height/refresh rate) for the display connected to HDMI1.
You can also manually specify modes using
INFOBEAMER_PRIMARY_MODE=xxx
INFOBEAMER_SECONDARY_MODE=xxx
with xxx being one of the modes listed in the info-beamer pi output.
You can freely place the secondary screen relative to the primary screen by using:
INFOBEAMER_SECONDARY_OFFSET_X=x
INFOBEAMER_SECONDARY_OFFSET_Y=y
with x/y being the pixel offset of the top left corner of the secondary screen relative to the top left corner of the primary screen. Having both values set to 0 (the default) effectively clones the output, so both show the same content. Setting INFOBEAMER_SECONDARY_OFFSET_X=1920
will place the second display right of the primary display. And so on.
It seems that right now the Pi4 software doesn’t allow hotplugging of displays. It sounds like the displays are only detected when the Pi boots. This might make reliable installations using dual displays difficult, if the screens are not guaranteed to be turned on when the Pi starts. If a screen is not detected at boot, info-beamer (and I’m pretty sure any other Pi based solution) won’t be able to detect the screen later once it gets turned on). As a result, I’m not yet sure how practical the dual screen mode will be. We’ll see.
Right now only GL content can be shown across dual screens. Videos of any kind won’t work as of now.
I consider that a major breakthrough. Here’s it in action (I’ll probably upload a YouTube video tomorrow):
I’m using the placement feature from the previous post to create s surface spanning two screens. Then I load and play a video across both of them:
gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)
local vid = resource.load_video{
file = "costa-rica.mp4",
}
function node.render()
gl.clear(1,0,0,1)
vid:draw(0, 0, WIDTH, HEIGHT)
end
This was probably one of the biggest hurdles porting info-beamer pi to the Pi4 and at least the hard part seems solved. I cannot really make any definitive statement about performance, but I looks pretty good so far.
Of course there’s still a lot to do with regards to video decoding:
Unsolved: 4K and H265 video support. Decoding required a completely different approach and that sounds like a hell to implement. The library/kernel(?) code required to make this work doesn’t seem to exist yet, so that’s going to be interesting.
Exciting news: A new prerelease is now available for download. It’s almost feature complete! What works:
What doesn’t work yet:
/boot/config.txt
. I’ll have to see how this all fits together when integrated with info-beamer hosted, so that the resolution selector works as before.:target
, :source
and :rotate
methods for raw videos (see here) are difficult to support with the new potential dual screen setups. There has been a more sensible :place
method for multiple years now and I think it’s time to remove the obsoleted methods. This might require some minor changes for existing packages.The next step is now to release a new testing
version of info-beamer hosted using the new Pi4 version. Exciting indeed
There’s now a first working version of info-beamer hosted OS for the Pi4! It’s still a bit rough around the edges but some packages immediately work out of the box. The OS grew massively from 37MB in total size to 67MB. Eventually this is something that might get improved, but for now it’s acceptable.
The next step is now to add compatibility information to the web dashboard and the package description, so you can immediately see which packages are ready and get a warning if a package isn’t marked as compatible with the Pi4. This will be finished this week and I’ll hope to have a first testing
release publicly available by Friday.
Known issues at the moment:
If you have a Pi4 and want to try out a first release, please get in contact and you’ll get a few free credits so you play around with it. This is limited to the first 20 requests.
Progress is being made. The UI has been updated. Each package now specifies which devices it’s compatible with:
See here for a full list. By default all packages are compatible with pi/epoch-1
, so all devices up to the Pi3B+. Next step is now to update all packages in the store. As I mentioned before, most changes should be fairly minimal. See this change for example.
When assigning a setup to a device, you might now see a red Assign button like this:
This means that the setups uses a package that isn’t marked as compatible. Clicking the Assign button then warns you about this. If you want, you can assign the setup anyway, but don’t expect that to work.
Next up: A first testing
release. Most likely tomorrow. Stay tuned and ready up your Pi4s
The testing
release is now available. If you have a Pi4, feel free to play around with it. Known issues right now:
Not yet supported:
New features:
New versions of the info-beamer hosted testing
release as well as a new standalone info-beamer-pi version is now available.
Changes from previous version:
Improvements regarding screen tearing and most of the issues should now be fixed. In addition on a dual monitor installation, the framerate should improve quite a lot.
OpenGL based videos (like used in the Magic Video Wall) are now faster than before on the Pi4. FullHD should now work perfectly smooth.
The info-beamer hosted distribution size shrunk by almost 16MB and it’s now back under 50MB for the complete OS. That keeps things nice and fast.
If you have a Pi4, please test with this version. If you have the previous version installed, simply visit the device page and click on Manage > Activate testing channel… to upgrade. As mentioned before: Contact support for some free credits so you can play around without thinking about your wallet.
The big remaining feature that should eventually end up in info-beamer is H265 support. Some standalone experiments seem promising, but it’s in no way integrated into the rest of the info-beamer program. Stay tuned.
Configuration editor UI has been updated for new Pi4 dual screen features
For a Pi4, the screen resolution settings now look a bit different than before. You can now not only select a video mode, but also select how and if you want to handle multiple screens. Right now there’s 6 different modes:
Right now the UI only allows the same resolution on both screens. Additionally, you can’t freely place the screens, which might be interesting if they don’t have the same size. That might be added in the future though as the system already supports that.
Update: Of course that now means that dual screen video playback is now possible with a single Pi4. Have a look at this quickly created video showing this feature in action. Right now it’s still limited to H264 and thus 1920x1080 (or most likely something like 1920x540) for videos like the one below, but once H265 support is done, you’ll be able to use 3840x1080 for example.
This is another important milestone on using the Pi4’s full potential: My in-dev version of info-beamer pi can now play 4K videos encoded in the H265/HEVC format for the first time. As it’s getting integrated into the normal info-beamer video runtime, splitting a video like this across two screens also works:
This can be used to play 3840x1080 (so 2xFullHD) across two FullHD displays. Previously you have been limited to 1920x1080 stretched across two displays thus cutting the horizontal resolution in half. With the H265 decoder, you can now use the full native resolution of both displays.
On 4K displays, playing 4K videos also works.
It’s still some work to get everything running smoothly and to properly understand all the limitations of the new decoding mechanism. Right now I’m not sure if it’s possible to decode two videos at once, for example. In addition, decoding H265 into a GL texture (for use with the magic video wall for example) also doesn’t work yet.
And for course for integration into the info-beamer hosted service, some changes have to be made regarding device compatibility. This would prevent you from installing a 4K setup on an older Pi that cannot decode them. So there’s still a ton of work to do, but it’s getting there. Stay tuned!
Quick status update. The core video player component has been rewritten to be more generic. It can now decode H264 into GL textures, H264 into fullscreen over/underlays as well as HEVC (so 4K videos!) into over/underlays. See this screenshot:
All of that works seamlessly across two displays as well!
It’s still a bit more work to make pausing, preloading, audio and looping possible with all modes, but I see light at the end of the tunnel. Hopefully there’s a new info-beamer pi release supporting all that in the near future. Stay tuned.
They wait is over: A first public release with all these features is now available: https://info-beamer.com/blog/dual-display-or-4k-and-hevc-on-the-pi-4
The current testing
release now correctly shows information about both connected displays and gives a full preview of what’s currently on both screens in the Live View snapshot: