26 Jan 2023, 21:13

Running Recalbox 8.1.1 on a Pi4 2GB with 2x displays attached via HDMI, I've been trying out showing images/video on the 2nd display.

When EmulationStation is not running this works well:

mpv --no-audio --vo=drm --drm-connector=1.HDMI-A-2 --loop /recalbox/share_init/system/tft_logos/320p/recalbox.png

And this works (HDMI1 display resolution is 1650x1080, so top-left corner of display on HDMI2 is (1650,0):

ffplay -left 1650 media/mame/asteroid.mp4

However, when ES is running, both of those commands fail with some variation of 'unable to initialise video device':

# mpv --no-audio --vo=drm --drm-connector=1.HDMI-A-2 --loop /recalbox/share_init/system/tft_logos/320p/recalbox.png
 (+) Video --vid=1 (png 320x240 1.000fps)
[vo/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/drm] Cannot set CRTC: Permission denied
Error opening/initializing the selected video_out (--vo) device.


# ffplay -left 1650 media/mame/asteroid.mp4
...
Could not initialize SDL - No available video device
(Did you set the DISPLAY variable?)

Is this because ES has exclusive access to the SDL device? And can anyone think of a workaround?

I can get it to work by writing direct to the single framebuffer device, but it's not ideal as my displays are using different resolutions.