RetroPie / RetroPie-Setup

Shell script to set up a Raspberry Pi/Odroid/PC with RetroArch emulator and various cores
Other
10.06k stars 1.39k forks source link

Add Universal Screenshot option with Raspi2Png #1242

Closed Omnija closed 8 years ago

Omnija commented 8 years ago

Guide/Tutorial

http://pastebin.com/uPYvF8vF

Screenshot of Proof of concept

http://i.imgur.com/06griWS.png

HerbFargus commented 8 years ago

Heres a working Module:

create a file called screenshot.sh in /home/pi/RetroPie-Setup/scriptmodules/supplementary

and then it can be installed from the experimental section of the retropie setup script.

http://pastebin.com/8c4DT4j7

To add it to samba shares needs to be another line here:

https://github.com/RetroPie/RetroPie-Setup/blob/59e31b525bf25d80e1ce4f365870c48f1889d10b/scriptmodules/supplementary/samba.sh#L53

HerbFargus commented 8 years ago

Also another thought for this, While raspi2png may be helpful for troubleshooting, most errors are logged to tmp directories that are easily accessible so it may actually be better utilised as a function for users to build their own artwork for EmulationStation (particularly considering the recent instability of thegamesdb). But its simple enough to build two scripts: one generic overall screenshot script and one script specific to artwork.

Sselph's scraper provides the ability to link roms to images and produce gamelists in place of the default scraper. Would need some extra coding in runcommand and the scraper module to implement.

see related: https://github.com/RetroPie/RetroPie-Setup/issues/1358

Might also be worth integrating some optimisation for the screenshots with something like pngcrush or pngquant see more info on png optimistation here

I also don't know if its worth integrating it with the current screenshot function of retroarch - the benefit to raspi2png is that it is universal and can be used with any system, not just retroarch based systems.

joolswills commented 8 years ago

yeh that's doable.

joolswills commented 8 years ago

(albeit lower priority than some other things ongoing)

HerbFargus commented 8 years ago

Screenshot Comparison Between RetroArch vs Raspi2png

RetroArch (4:3) (Filesize: 16 KB)

retroarch-0309-014152

Raspi2png (4:3) (disable overscan not set) (Filesize: 449 KB)

03092016_014141

(with overscan disabled) (Filesize: 482 KB) 03092016_014617

Retroarch (16:9) (Filesize: 17 KB)

retroarch-0309-014917

Raspi2png (16:9) (Filesize: 492 KB)

03092016_014924

PNGQUANT OPTIMISATION

163 KB 03092016_014141-fs8 175 KB 03092016_014617-fs8 185 KB 03092016_014924-fs8

(Original Files) Screenshot Comparison.zip

Sselphs Scraper Parametres

All options: http://pastebin.com/9YkES1nZ

As a template in my snes folder I had my rom name:

Super Mario World (USA).sfc

and an images folder with:

Super Mario World (USA)-image.png (If you dont want to append the -image part on the filename you can use -image_suffix=)

and I ran

/opt/retropie/supplementary/scraper/scraper -img_format=png -add_not_found=true -download_images=false

And this was the resulting gamelist.xml:

<?xml version="1.0" encoding="UTF-8"?>
  <gameList>
      <game id="136" source="theGamesDB.net">
          <path>./Super Mario World (USA).sfc</path>
          <name>Super Mario World (USA)</name>
          <desc>Mario&#39;s off on his biggest adventure ever, and this time he&#39;s brought along a friend.  Yoshi the dinosaur teams up with Mario to battle Bowser, who has kidnapped Princess Toadstool once again.  Guide Mario and Yoshi through nine peril-filled worlds to the final showdown in Bowser&#39;s castle.&#xA;&#xA;Use Mario&#39;s new powers and Yoshi&#39;s voracious monster-gobbling appetite as you explore 96 levels filled with dangerous new monsters and traps.  Climb mountains and cross rivers, and descend into subterranean depths.  Destroy the seven Koopa castles and find keys to gain entrance to hidden levels.  Discover more warps and thrilling bonus worlds than ever before!&#xA;&#xA;Mario&#39;s back, and this time he&#39;s better than ever!</desc>
          <image>./images/Super Mario World (USA)-image.png</image>
          <rating>0.73704</rating>
          <releasedate>19901121T000000</releasedate>
          <developer>Nintendo</developer>
          <publisher>Nintendo</publisher>
          <genre>Platform</genre>
          <players>2</players>
      </game>
  </gameList>

After comparing the images though through retroarch's screenshots vs raspi2png, I'm beginning to doubt the efficacy of raspi2png for screenshots due to the lack of image clarity and the excessive filesize.

HerbFargus commented 8 years ago

its in the retropie extra repo for the time being and maybe will address in the future if the quality and filesize can be resolved.