ASCII by Jason Scott

Jason Scott's Weblog

Rise of the Screen Shotgun —

Continuing the thoughts I had in the previous entry, I’ve been working on a side-project to improve access to all the software and console games I’ve been uploading to the archive.

To some percentage of the populace, it is a simple and obvious thing, but that’s how a lot of efficient breakthroughs happen – doing simple and obvious things.

Forever. To everything.

Expanding out the console living room collection on archive.org to 2,300 cartridges representing 21 console systems had a not-entirely-unexpected side effect: it blew up the volunteer metadata gang. When things were in the hundreds with these cartridges, a small handful of folks could add some descriptions and other metadata pairs to the entries and reasonably get through them all. Not so anymore.

I’ve got some brave individuals moving through the sets, and they’re heroes to me for doing so. But the pain of a couple thousand cartridges will be nothing to the inevitable hundreds of thousands of individual disks I’m going to end up ingesting. There’s multiple thousands of disks in my room as we speak, not to mention all the other collections I’m working to make playable. It doesn’t scale. It can’t. But I’ve got a step in the right direction.

Mused about by Andrew Perti in the metadata-entry IRC channel we’re hanging out with, and implemented by myself and Kyle Way, is a system I’m calling the Screenshotter or the Screen Shotgun, depending on your mood and taste.

The goal with it is to automate, 100%, the creation of screenshots and informative image grabs of these many, many software projects with essentially zero or minimal human intervention. I’ve been running it for about a week.

It is working very, very well.

00_coverscreenshot (4)00_coverscreenshot00_coverscreenshot (1)00_coverscreenshot (2)Again, these are generated automatically – other than writing the robot that’s doing this, I didn’t make them happen and I certainly didn’t sit there doing screengrabs and turning them into usable, clickable screenshots. And I definitely didn’t shove them into Internet Archive entries for the software items – that was done by a script.

It gets better, too. Click on this image:

Alex_Kidd_in_the_Enchanted_Castle_1988_Sega_JP_en_screenshotIt’s an animated GIF file, and it goes on for a while. It’ll show the title screen, some credits, and a little bit of gameplay (in this case, attract mode gameplay). It’ll be possible to say “re-generate this, but press this key at the end”, so I can finesse some of these (hence it being “minimal” human interaction – I can nudge if I look at dozens of screenshotted programs and realize a software item fell down).

Having these screenshots often verifies a ton of properties: who made it, what kind of program it is (miscategorized?), what the selections are (if it shows a menu), and what one might expect if it’s run in JSMESS – since it is being run in JSMESS.

It’s a simple enough process. Steal it from me and refine it.

screenshot_03

A machine that will be living the doomed life of eternally playing software packages is installed with:

  • An X server (Actually Xvfb, which is a virtual X server used for testing which has a fraction of the space).
  • A copy of Firefox.
  • ImageMagick, that eternal, ubiquitous bastard of image manipulation.
  • Fdupes.
  • The Internet Archive Command-Line Interface.

Some of that you likely know about, others you might not. They’re all readily available, however, and not that secret.

On a very high level, here’s what my script does.

  • Assume the X server is running.
  • Start firefox, running the JSMESS emulator/player for a piece of software
  • Wait roughly 50 seconds (about how long it takes the JSMESS “machine” to boot on my shared, weighed down server).
  • Take 40 screenshots, cropped to JUST the JSMESS player window, with a 4 second delay between each.
  • Run FDUPES against the 40 resulting screenshots, to get rid of shots of static or unchanging images. Sometimes this pulls it down to a single shot, and other times all 40 stay.
  • Upload the resulting full-size unique screenshots into the Internet Archive item, making one the “representative” based on (ahem) being the largest. (This actually works pretty well – often the largest is the one with the most variety, hence often the title screen or gameplay).
  • Compress the screenshots into an animated GIF and upload that.
  • Get rid of all the evidence, and kill Firefox.

Obviously, things can go wrong, but among the things that go wrong that are my favorite are where the resulting screenshot gives an error about the software itself:

Alien_Soldier_1995_Sega_EU_en_screenshot

In this way, the software is basically doubling duty as a free-labor Quality Assurance department, making it instantly obvious as I walk the collections that Something Was A Little Off. Often it’s a simple matter of making a slight change to the emulator parameters or putting the software into a quiet corner because it just doesn’t work. That’s less frustration for future users, and one less concern that the collection is accessible.

screenshot_02 (1)

Notably, this destroys the Screenshot Economy.

There’s a certain amount of work that exists to generate metadata or representative imagery related to, well, anything. But in this case, the work needed is to generate representative screenshots, attach them to the right name, and keep track of them. It’s both simple and boring yet annoying enough that if someone “stole” your screenshots, you might get really angry at them. You might even watermark your screenshots, since you slaved away putting all of them together. You might hound people you saw as lifting the screenshots away, even though they’re using them as purely informative purposes and you yourself didn’t really generate any of the art inside.

Whatever, to that debate. I’m about to put either tens of thousands or hundreds of thousands of screenshots up. And you can use them any darn way you please. The Screenshotgun will not get angry with you. And I just follow the Screenshotgun’s lead.

screenshot_30

There are solid debate chunks available for the Gift Horse Dental Inspection Squad, of course. These are screenshots off an emulator, for example – if you want “true authentic” screenshots as one might take off a monitor, then these are not those. Some folks might not be happy that the Screenshot Economy has been taken down with a flood of “inferior” images, and the old adage of Perfect is the Enemy of Done can rear its head. Obviously, the emulator can be dinged in terms of color reproduction, aspect ratio, brightness/sharpness, and how it renders the graphics/text related to the original hardware. No doubt some of that error-ridden mess will creep into the crop.

I am not worried.

Over time, this process will refine itself. Right now, I have to do some initial setup related to the cropping of the emulator. Different machines yield slightly different Firefox rendering, and with that comes the window showing up at different coordinates. After I get the machine done for that screenshot robot, however, it can just be run, again and again, and most importantly, it can run in a way where it overwrites a previous screenshotting, replacing old bad with new good. I suspect that as time goes on, revisions or improvements to the simple scripting I have in place will handle contingencies of keypresses, performance, detecting bad frames, and so on.

Until then… many, many software items on archive.org’s Console Living Room and ultimately the entire software collection are going to get some excellent illustration, essentially out of thin air. And it won’t murder a volunteer or pile of volunteers to do it. Give me a week or two to get all the consoles properly filled with these screenshots, and then enjoy the beginning of a world where you can see what’s coming if you click the emulation link.

If you want a picture of the future, imagine a rack-mounted server joylessly playing videogames and taking screenshots.

Forever.

00_coverscreenshot (5)


Categorised as: computer history | Internet Archive

Comments are disabled on this post


8 Comments

  1. This is pure, complete brilliance. Goodbye Screenshot Economy, Hello Infinite Screenshot Library.

  2. picklefactory says:

    What’s that one with the trees in the background? It looks awesome.

  3. Jason, there are scripts that can play the games, such as RZX for ZX Spectrum games. By doing so, you can let the server play the game and keep on taking screenshots, making maps.

  4. daggar says:

    Brilliant idea. Is it at all practical or useful to send the resulting screenshots through some OCR’ing to generate keywords?

  5. Just wanted to say that I find this utterly brilliant.

  6. mocha says:

    Can you share your IM script for making animated GIF?

  7. mar77i says:

    Will fail on custom intros which were common on some platforms.