RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Screenshot using cat /dev/fb0?

    Scheduled Pinned Locked Moved Help and Support
    retroarchscreenshot
    5 Posts 2 Posters 1.1k Views
    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.
    • busywaitB
      busywait
      last edited by busywait

      I'm trying to take a full 1920x1080px screenshot of a running RetroArch game, launched from EmulationStation, including a bezel overlay.

      I've got RetroPie 4.7.8
      Pi 4B 4GB
      Full (not fake) KMS (vc4-kms-v3d)

      I've tried screenshots via the RetroArch options menu, but they don't include the bezel, and I think that they are always square pixels, not scaled as I see on the screen.

      What options have I got? Something that I can run using an SSH command would be good.

      I've tried raspi2png but that fails

      pi@rpi-tv:~ $ raspi2png -p screen.png
      raspi2png: unable to open display 0
      

      I have taken screenshots outside of an X server before by using

      cat /dev/fb0 > screen.fb
      

      and then converting the dump to a .png with

      pi@rpi-tv:~ $ ffmpeg -f rawvideo -pixel_format rgb565 -video_size 1920x1080  -i screen.fb screen.png
      

      That creates a valid .png file, but it is of the runcommand "Launching" message, not the running game+bezel.

      Can anyone say how to screenshot the whole screen including the bezel?

      busywaitB 1 Reply Last reply Reply Quote 0
      • busywaitB
        busywait @busywait
        last edited by

        I've learned over at the Raspberry Pi forum that some applications (like X, and it seems RetroArch) can draw on the screen without writing to the framebuffer, so that option's out.

        Is there a switch or other config to persuade RetroArch to write to the framebuffer API temporarily? Or other way to get a full screenshot?

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @busywait
          last edited by

          @busywait said in Screenshot using cat /dev/fb0?:

          Is there a switch or other config to persuade RetroArch to write to the framebuffer API temporarily? Or other way to get a full screenshot?

          No, RetroArch 'writes' using the MESA OpenGL drivers, which don't use the framebuffer (/dev/fb0). Have you tried toggling the 'GPU Screenshot' option in RetroArch ?
          Either that or switch to the fkms driver (so raspi2png works again).

          busywaitB 2 Replies Last reply Reply Quote 1
          • busywaitB
            busywait @mitu
            last edited by busywait

            @mitu Thx, I checked that GPU Screenshots was enabled, and it doesn't grab the full 1920x1080 screen area...

            I checked in the RetroArch RGUI, Settings > Video, and I have GPU screenshots enabled, checked in configs/all/retroarch.cfg and it says

            video_gpu_screenshot = "true"
            

            Also I edited configs/all/retroarch.cfg and uncommented

            input_screenshot = f8
            

            Pressing the hotkey on my controller and f8 on the keyboard captures a screenshot that gives me a glimpse of my bezel, but it's cropped to the size and location of the game window (which is overscanned and partially masked by the bezel).

            I'll find a moment to try rebooting with

            dtoverlay=vc4-fkms-v3d
            

            Here's what my "cropped" RetroArch screenshot looked like it - it is stretched to the correct dimensions, 1378x1200px:
            Sonic Chaos-210223-144718.png

            1 Reply Last reply Reply Quote 0
            • busywaitB
              busywait @mitu
              last edited by

              @mitu I got my screenshot the way you suggested:

              • flip back to dtoverlay=vc4-fkms-v3d in /boot/config.txt
              • use raspi2png

              Thanks!

              ===

              SNW9NE~N.PNG

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.