Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Pi4 digital marquee on HDMI2

    Recalbox General
    marquee pi4 hdmi
    1
    2
    897
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • poppadum
      poppadum last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • poppadum
        poppadum last edited by

        I've done a bit more testing and it seems it is possible to display an image or video by writing to the framebuffer e.g.

        fbv2 <image.png>
        

        i.e. the same way that miniTFT support works.

        The only problem is that with the default KMS graphics driver overlay dtoverlay=vc4-kms-v3d, both displays share the same framebuffer device, so the image shows on both displays.

        But it's only visible on the main display when EmulationStation isn't running. In practice you only see it for a brief second when launching a ROM (the time between ES exiting and the emulator launching) or exiting a game. It doesn't seem to break anything so I think I can probably live with that minor annoyance.

        If anyone else is interested in this, when I've written some code I'm happy with I can stick it on github for others to use.

        1 Reply Last reply Reply Quote 0
        • Locked by  admin admin 
        • First post
          Last post

        Want to support us ?

        66
        Online

        99.7k
        Users

        28.1k
        Topics

        187.1k
        Posts

        Copyright © 2021 recalbox.com