Recording Live Gameplay in RetroPie’s RetroArch Emulators Natively on the Raspberry Pi

Capturing Footage in Real-Time Without Additional Hardware from RetroPie’s Libretro Core Emulators

Video Captured Natively in RetroPie - Source: RetroResolution

The following guide demonstrates how to enable the capture of real-time gameplay footage from various console systems available in the RetroPie emulator suite, a number of which can utilise the RetroArch framework to provide an integrated audio-video recording facility.

Implemented natively on a standard Raspberry Pi, this approach runs without the need for any external hardware (such as an Elgato capture-card).

Topics

A Little Background Information

My motivation to undertake what has become a sizeable research, development, and experimentation, project grew from a simple desire to obtain recordings of emulators running under RetroPie. I’d previously managed to enable the audio-video feature provided by the Atari ST emulator, Hatari, and was hopeful that a software-only solution was feasible for other systems.

RetroPie Versions Tested

At time of writing this guide has been tested on RetroPie 3.7, 3.8.1, and 4 (rc-1) setups, all running on installations of Raspbian Jessie 2016-05-27, and RetroPie 4.0.3 installed on Raspbian Jessie with Pixel 2016-09-23

Searching for other emulators offering recording, I found only the non-Libretro variant of Fuse to have in-built facilities; whilst serviceable for capturing ZX Spectrum games, the audio-video files generated by the emulator are of a decidedly non-standard format.

Fundamentally it was my experiments when attempting to transcode footage of Technician Ted captured from Fuse, first with avconv, and later with FFmpeg, and a subsequent enquiry on the RetroPie forum, which spawned the series of articles which form this how-to guide.

For reference, the system used whilst researching this project was a Raspberry Pi 3, overclocked to 1300mhz (please see Overclocking the Raspberry Pi 3: Thermal Limits and Optimising for Single vs Multicore Performance for specifics).

Continue reading

Advertisements

Automatically Mounting an External USB Hard Disk on the Raspberry Pi

How-to Guide: Automatically Mount an External USB Storage Device at Boot Time, and Within Emulation Station

Raspbian Logo
External Hard Disk - Image: Clipshrine.com
USB Symbol - Image: Clipshrine.com

This how-to guide shows a method to automatically mount an external USB drive on the Raspberry Pi. The general technique which I have adopted and is common, and whilst there are similar guides available, I have adapted the approach specifically for use on a Pi running Raspbian Lxde Desktop, Kodi Media Center, and Emulation Station with RetroPie.

In this article I aim both to demonstrate and expand upon the steps involved, whilst highlighting some issues which I have encountered when using this approach, and providing their resolutions.

Topics

A Little Background Information

My Raspberry Pi 3 is setup to serve triple duty as a lightweight PC replacement, running the Raspbian desktop, as a media center using Kodi, and as a retro video game emulator suite, via RetroPie. I have my machine set to boot to a custom menu at the command prompt, rather than directly to the desktop, to facilitate easy switching between these options. Please see the Related Posts section for setup guides detailing how this was achieved.

The Raspbian kernel does not automatically mount external USB drives by default; this isn’t an issue when launching the Kodi media center, or the desktop, as both have the capability to detect and mount a USB hard disk or flash storage device once it is connected.

Continue reading

RetroPie Manual Installation Guide, including the Version 4 Setup Script Revised Menu Structure

How-to Guide: Manually Installing RetroPie: Navigating the RetroPie Setup Script Menu Structure

Emulation Station - Emulator Selection - RetroPie 3
Emulation Station – Emulator Selection – RetroPie 3

Following the June 8th 2016 update to the RetroPie Setup Script the functionality and menu structure have changed noticeably from the streamlined earlier incarnation.

Whilst the new (at time of writing) version 4.0 DEV allows far more control over the setup and maintenance of RetroPie, it necessarily appears a little more complex than before; in this guide I illustrate the revised layout.

Sections of this article expand upon my previous guide: Multipurpose Raspberry Pi: Installing a Media, Gaming, PC Replacement

Topics Covered

Manually Installing RetroPie

Installation of RetroPie on an already extant Raspbian system is relatively straightforward. For guidance on installing and setting up Raspbian, please see Multipurpose Raspberry Pi: Installing a Media, Gaming, PC Replacement

First, after completing the steps listed, ensure that the Raspberry Pi has been rebooted.

Continue reading

Compiling Software from Source Code on the Raspberry Pi: The FFmpeg Suite

How-to Guide: Compiling and Installing the FFmpeg Suite and Audio Video Codecs from Source on the Raspberry Pi
 

Raspbian Logo
Bash Shell Command Prompt
FFmpeg Project Logo - Image: Wikicommons

The goals of the following guide are two-fold: Firstly, to install a software package called FFmpeg, which contains numerous tools to facilitate the recording and manipulation of audio-video materials, along with several optional packages known as codecs.

Secondly, I aim not only to present a series of steps and commands, but also to provide a little illumination into the process, providing an overview of some of the key tools and concepts behind obtaining, building, and installing software on a Linux platform.

For those eager to get up and running as quickly as possible, please see the related page: Compiling FFmpeg and Codecs from Source Code: All-in-One Script

Topics Covered
A Little Background Information
What is RetroArch?

Please see the my earlier post: What is RetroPie? for a little background on both RetroPie and RetroArch.

My primary motivation for installing FFmpeg was to be able to capture real-time footage of gameplay from various console systems available in the RetroPie emulator suite, a number of which utilise the RetroArch framework that provides a facility to make live audio-video recordings.

Continue reading

Multipurpose Raspberry Pi – Part 2: Adding a Menu to Access RetroPie, Kodi, and the Raspbian Desktop

Switch Between Application Suites on your Multipurpose Pi with Ease

In this article, which builds upon the preceding post Multipurpose Raspberry Pi: Installing a Media, Gaming, PC Replacement, I demonstrate the addition of a menu to allow easy switching between application suites.

multipurpose_selector_menu_extreme_crop

diverging down arrows_alpha

Raspbian Desktop GUI
Raspbian Desktop
Emulation Station - Emulator Selection - RetroPie 3
RetroPie / Emulation Station
Kodi Media Center - Music Playback
Kodi Media Center

Whilst the solution overall is relatively straightforward, I’ve gone into some depth in order that this post can serve as a general how-to guide, providing some insights into Bash shell scripts, including: installing scripts using the desktop GUI or command line tools; how the code file is made executable; automatically running a script after login, and after programs are exited by the user; and other related concepts.

Topics Covered in this Post

Menu Design Requirements and Goals

As noted in the post detailing the installation of the Multipurpose Pi system, the RetroPie emulator system cannot be launched from the X-Windows Raspbian desktop GUI. This restriction forced the requirement that the Pi boot to the text-mode Bash terminal, which in turn required launching of a chosen application suite via typed commands:

startx for the Raspbian desktop,
kodi for the Kodi Media Center, and
emulationstation for RetroPie.

Whilst this wasn’t a major issue, I wanted a method to launch a given suite without having to type commands at the Bash terminal – ideally via a menu-driven selection system. Whilst this necessarily must be text-based, it is friendlier than facing a blank command prompt upon booting.

Furthermore, I wanted the menu to automatically run when the Pi boots to the terminal, and also to be re-displayed whenever the user closes one of the selected application suites (using Kodi‘s power button, Emulation Station‘s Quit submenu, or Raspbian desktop’s main menu Shutdown option):

Kodi Media Center - Power Menu - Exit to Command Line
Emulation Station (RetroPie) - Quit Menu - Exit to Command Line
Raspbian Desktop - Shutdown Menu - Exit to Command Line

converging down arrows_alpha

multipurpose_selector_menu_extreme_crop

Continue reading

Navigating the Raspberry Pi’s File System. Raspbian Linux Shell Commands and Tools – Part 2

Just the Basics

Raspbian Linux GUI File Browser
VS transparent
Raspbian Command Line - Shutdown - help screen

Following on from Don’t Fear The Command Line: Raspbian Linux Shell Commands and Tools – Part 1, in which tools for monitoring the Raspberry Pi’s hardware and running programmes are introduced, along with the Package installer (APT), this post concentrates solely on the file system.

For those of us of a certain vintage, the command line may seem a reasonably natural and intuitive interface with the computer; for many, however, it is arcane and daunting. Even for those well versed in the DOS command line, the Linux shell is sufficiently alien to cause headaches.

The aim here isn’t to educate Linux gurus, rather to provide some guidance to those either new to command line interfaces in general, or to the Linux shell (bash, in the case of Raspbian) in particular.

Navigating the file system from a command line can be especially troublesome when compared to the intuitive visual representations provided by graphical user interfaces, hence this brief guide.

Topics Covered in this Guide

Please note: The Raspbian Linux Command Shell is case sensitive. Commands need to be typed exactly as shown, as do directory (folder) and file names.

Moving Up, Down and Around the Directory Hierarchy

Moving around the file system hierarchy to reach a specific directory is achieved through the cd command.

The cd (short for ‘change directory’) command takes a path as a parameter, which instructs the system in how to reach a different directory. This can be achieved in several different ways.

First, we’ll introduce the building blocks that can be used to construct a path (a route from one location in the file system to another):

/. represents the directory you are currently in.
This is useful when executing a script file, which requires a path to that file to be provided (typing the script file name alone will not work).

../ indicates the directory one level above the one you are currently in.
This is useful both for navigating and for providing partially qualified paths (see below).

~ represents the home directory.
– If you are logged in as a standard user, this will be the user’s own directory. For example, for the user pi, home is /home/pi
– If you are logged in as root, home is /root

image
Raspbian Command Shell - navigation using 'cd' command

Continue reading

Don’t Fear The Command Line: Raspbian Linux Shell Commands and Tools – Part 1

A Basic Guide to Using Several Handy Linux Command Line / Shell Commands and Tools

Just the Basics

Warped Command Shell. Image - Retro Resolution
Warped Command Shell. Image – Retro Resolution

To customise your Raspberry Pi generally requires a little knowledge of the command shell, even if only running the menu-driven Raspbian configuration tool; the operative word being little.

You don’t need to become a Linux guru to make use of a wide range of handy commands and tools to get the most out of the Raspberry Pi, even when using an all-in-one image such as RetroPie.

You can use the command shell to accomplish tasks including:

  • Obtaining a real-time view of running programmes and processes, including their memory and CPU usage.
  • Monitoring the system hardware, viewing temperature, voltage, and component speed information.
  • Running integrity checks on the filesystem.
  • Moving, copying, and renaming files.
  • Sharing files with other systems on the network, including PC, Mac, and Linux machines, and accessing shared files from those systems.
  • Editing or creating text files, such as those controlling configuration for the Pi’s hardware, and individual programmes.
  • For RetroPie, adding or tailoring configuration to support additional hardware, including USB adaptors allowing the use of original controllers for systems such as the PlayStation, N64, Megadrive/Genesis, and the wireless Xbox 360 pad.
image
Command prompt - Image: pixabay.com

Topics Covered in this Guide

Continue reading