RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    (Guide) Centralized Screenshots Location

    Scheduled Pinned Locked Moved General Discussion and Gaming
    guidescreenshotssamba
    1 Posts 1 Posters 1.3k 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.
    • mediamogulM
      mediamogul Global Moderator
      last edited by mediamogul

      Lately I've been reworking my controller mappings so that they all behave as closely to each other as possible. This has included mapping the screenshot function of various emulators to the same button combination all around. After doing this, I quickly found out that the actual screenshots themselves get scattered across the drive based on the various software preferences that in many cases are not able to be changed.

      I decided to write a script that would consolidate the various screenshots into one location and then add that location to my Samba shares for easy access. It's been quite a big help to me, so I thought I'd pass it along here to anyone else who is interested. The script is added to /opt/retropie/configs/all/runcommand-onend.sh so that after every gaming session, any screenshots will be moved to /home/pi/RetroPie/screenshots/. I also have the files being moved into a timestamped directory to avoid any naming conflicts that might arise. The script is as follows:

      mkdir > /dev/null 2>&1 -p /home/pi/RetroPie/screenshots/tmp
      
      mv > /dev/null 2>&1 \
      	/home/pi/*.png \
      	/home/pi/.advance/snap/*.png \
      	/home/pi/.openMSX/screenshots/*.png \
      	/home/pi/atari*.png \
      	/home/pi/grab*.png \
      	/home/pi/image*.png \
      	/home/pi/shot*.gif \
      	/home/pi/RetroPie/roms/apple2/linapple*.bmp \
      	/home/pi/RetroPie/roms/mame-advmame/snap/*.png \
      	/home/pi/RetroPie/roms/mame-advmame/advmess/snap/*.png \
      	/home/pi/RetroPie/roms/ports/quake3/full/baseq3/screenshots/shot*.tga \
      	/home/pi/RetroPie/roms/scummvm/scummvm*.bmp \
      	/opt/retropie/configs/all/retroarch/screenshots/*.png \
      	/opt/retropie/configs/pc/capture/*.png \
      	/opt/retropie/configs/ports/doom/screenshots/*.png \
      	/opt/retropie/configs/ports/duke3d/duke*.png \
      	/opt/retropie/emulators/daphne/screen*.bmp \
      	/home/pi/RetroPie/screenshots/tmp/
      
      DIRLS="$(ls /home/pi/RetroPie/screenshots/tmp/)"
      
      DIRNAME="$(date +%Y%m%d%H%M%S)"
      
      if [ -n "$DIRLS" ]; then
      mv > /dev/null 2>&1 /home/pi/RetroPie/screenshots/tmp /home/pi/RetroPie/screenshots/various/"$DIRNAME"
      else
      rm -r > /dev/null 2>&1 /home/pi/RetroPie/screenshots/tmp
      fi
      

      This covers the emulators and ports mentioned below. Of course more can always be added.

      • All RetroArch emulator cores
      • All RetroArch port cores
      • Atari 2600 (Stella)
      • Atari 800
      • Atari 5200
      • Atari ST (Hatari)
      • Daphne
      • Apple II
      • AdvanceMAME
      • AdvanceMESS
      • ColecoVision (CoolCV)
      • Intellivision (jzintv)
      • Quake III Arena
      • Duke Nukem 3D
      • PC (DOSBox)
      • ScummVM
      • MSX (OpenMSX)

      To add the new 'screenshots' folder to your Samba shares, simply add the following to /etc/samba/smb.conf

      [screenshots]
      comment = screenshots
      path = "/home/pi/RetroPie/screenshots"
      writeable = yes
      guest ok = yes
      create mask = 0644
      directory mask = 0755
      force user = pi
      

      After looking at some of these screenshots, you may find that some are incredibly small. Normally, upscaling a tiny image to any reasonable size decreases the quality quite a bit. However, due to the blocky, hard-edged nature of retro-game screenshots (disqualifying Daphne), high quality upscaling can be achieved using the proper settings. In Photoshop you would go to 'image>image size', then change the width and hight to 'percent'. Finally, change the scaling algorithm at the bottom to 'Nearest Neighbor (preserves hard edges)'. As long as you keep the desired size to increments of 100%, the resulting image will look perfect at it's larger size. Many other photo manipulation software packages have similar options and while sometimes they are also titled 'Nearest Neighbor', there are times they are named differently. For example, you can achieve this same effect in GIMP by setting 'Interpolation' to 'None' and resizing in increments of 100%.

      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

      1 Reply Last reply Reply Quote 2
      • 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.