How To Capture Minecraft Screenshots On The Raspberry Pi

In a previous post I told you how you could capture screenshots on the Raspberry Pi using “scrot”. That method worked fine for most applications but like many screen capture techniques resulted in a black rectangle when used with Minecraft. This has led many bloggers to simply photograph the screen with a real camera in order to get a screenshot of their Minecraft adventures.

There is a solution and it comes in the form of “raspi2png” by Andrew Duncan. His raspi2png utility can capture the Minecraft window and is available from his Github page.

Minecraft Screenshot

Setting up raspi2png is easy so keep on reading!

Step 1 – Install libpng12-dev

First we need to install a package required by raspi2png :

sudo apt-get install libpng12-dev

Step 2 – Download and make raspi2png

Let’s create a directory to put the files :

mkdir raspi2png

Now navigate to it :

cd raspi2png

Now we can download the project files from Github :

wget https://github.com/AndrewFromMelbourne/raspi2png/archive/master.zip

Then unzip the files into our new folder :

unzip -j master.zip

The “-j” option unzips the archive without creating any sub-directories.

Step 3 – Capturing the screen

Capturing the screen is simply a case of running the following command :

./raspi2png

The screenshot is saved as “screenshot.png” in the same directory as the raspi2png files. This can be copied to a USB stick or transferred via SSH.

There are some command line options you can use for some added functionality :

Usage: raspi2png [-p pngname] [-v] [-w ] [-h ] [-t ] [-d ]
-p - name of png file to create (default is snapshot.png)
-v - verbose
-h - image height (default is screen height)
-w - image width (default is screen width)
-t - type of image captured
     can be one of the following: RGB565 RGB888 RGBA16 RGBA32
-d - delay in seconds (default 0)

The most useful are d and p. For example :

./raspi2png -d 5 -p "mysnapshot_01.png"

This creates an image file called “mysnapshot_01.png” after a delay of 5 seconds.

Minecraft Screenshot

The delay is useful if you need time to arrange your windows before the screen capture takes place. Being able to specify the image file name is useful if you want to capture a series of images without re-using the default “snapshot.png” file.

When taking Minecraft screenshots you will need to use the following process :

  1. Launch a LXTerminal window and cd to the raspi2png directory
  2. Run Minecraft and decide what you want to capture
  3. Press TAB to release the mouse
  4. Use the mouse to click in your terminal window
  5. Type the raspi2png command as above with a delay of 5 seconds
  6. Press Enter
  7. Click the Minecraft window to return to the game
  8. Wait for raspi2png to take the screenshot

Repeat steps 3-8 using a different file name as required.

Here are some shots I took. I have cropped the images (using Gimp) to just focus on the Minecraft window :

Although I originally discovered raspi2png while looking to capture Minecraft images you can use it for your other screen capture needs as well.

This entry was posted in Minecraft, Tutorials & Help and tagged , , , . Bookmark the permalink.



2 Responses to How To Capture Minecraft Screenshots On The Raspberry Pi

  1. Tim Smith says:

    This would have been so useful when I was writing workshops about Minecraft on the Pi for Computeractive and the Ultimate Guides! Thanks for sharing.
    Tim

  2. Ivan Roulson says:

    Awesome… I’ve found your work very handy as a reference and it’s inspired me to want to tinker. I’ve linked you into my own website if you’re happy with that. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>