Can’t open /dev/argon-hevcmem and dual display variable assignment

I’ve installed the standalone info-beamer on my Rpi4 and successfully run samples/shader on my 1920x1080 display.

I’ve installed the hevc decoder using the command:
./info-beamer -install-hevc

I’m trying to run the code below and get the error:
can't open /dev/argon-hevcmem

The video.mp4 is hevc and 1920x1080.

Any thoughts on how to resolve this?

gl.setup(1920, 1080)

local video = resource.load_video{
    file = "video.mp4";
    looped = true;
    raw = true;
}

function node.render()
    video:place(0, 0, NATIVE_WIDTH, NATIVE_HEIGHT)
end

If you have a 1920x1080 display, I highly suggest you use H264 instead of HEVC encoded video files. They are 100% reliable and work without those HEVC libraries.

At some point those files in /dev were renamed, but the library isn’t updated at the moment.

ln -sf /dev/rpivid-intcmem /dev/argon-intcmem
ln -sf /dev/rpivid-hevcmem /dev/argon-hevcmem

might help.

1 Like

Thank you for the response. No surprise: that fixed the issue. And, as you noted, I should be using h264 anyways. (I knew one of the encoders did not work, but I forgot which).

Everything with that code runs well. However, it was just a warm-up to spanning video across (2) 1920x1080 displays.

I read this thread. and below is code I’m running now. But it’s not working. The secondary display is just a duplicate of the primary.

gl.setup(3840, 1080)

INFOBEAMER_DUAL_DISPLAY=1
INFOBEAMER_SECONDARY_OFFSET_X=1920
INFOBEAMER_SECONDARY_OFFSET_Y=0

local video = resource.load_video{
    file = "waves_1920x1080_h264_anamorph.mp4";
    looped = true;
}

function node.render()
    gl.clear(1,1,1,0)
    video:draw(0, 0, 3840, 1080)
end

Relevant part of my config.txt says this:

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

I’ve played around with several variations of node.lua and config.txt to no avail.
What am I missing?

Something small but important :slight_smile:

Those variable assignments

INFOBEAMER_DUAL_DISPLAY=1
INFOBEAMER_SECONDARY_OFFSET_X=1920
INFOBEAMER_SECONDARY_OFFSET_Y=0

are meant to set environment variables, not variables within info-beamer’s Lua environment. So you have to set them in the shell before starting the info-beamer binary. I recommend writing a small shell script that starts the info-beamer process. Like this:

!/bin/sh
export INFOBEAMER_DUAL_DISPLAY=1
export INFOBEAMER_SECONDARY_OFFSET_X=1920
export INFOBEAMER_SECONDARY_OFFSET_Y=0
exec /path/to/info-beamer "$@"

Then make the script executable and use it to start info-beamer. The reason these settings need to be set before starting info-beamer is that they, at least at the moment, cannot be changed dynamically by Lua code at runtime but are set once at the start.

1 Like

Thank you!
I used that code and followed this documentation of yours. Everything runs perfectly!

By the way, is the below highlight a typo? Shouldn’t it be "$@" ?

Also, I wish I could change the title of this post for others. Better title:

Can’t open /dev/argon-hevcmem and dual display variable assignment

Neat.

Nope. It’s correct. The code redirects stderr (file descriptor 2) to stdout (fd 1), so all logs end up in one output stream.