Please do not post a support request without first reading and following the advice in

Recording in-game video: Do RetroPie's libretro-enabled emulators support the Retroarch core FFmpeg avi recording facility?

  • Hi All,

    I'd like to record footage from the various RetroPie libretro-core enabled emulators, without going to the expense of purchasing an Elgato capture card (or similar).

    According to the Retroarch github documentation there is an in-built feature to record using FFmpeg, as noted here:

    FFmpeg recording and live streaming

    Instructions for installing FFmpeg libraries on the Pi are available here.

    Before I start messing around with my (currently) stable installation, does anybody know if this feature can be enabled on the RetropIe Retroarch core emulators?

    I note that the RetroArch menu option mentioned in the documentation ('Record') isn't present, although there is a Driver | Record entry (however the only selectable option is Null).

    Google hasn't been my friend on this one...

    Thanks in advance

  • administrators

    @RetroResolution it's disabled on the RPI. I doubt the RPI would be fast enough for real-time encode though.

  • @BuZz Thanks for responding, saved me a lot of time!

    It's a shame it's not available; you're right about the Pi not being fast enough, at least not for a smooth recording experience - I have enabled avi recording under Hatari on RetroPie, and it's choppy, but it's good enough to grab 30 second clips for Twitter etc (when played back the video/audio is flawless, it just causes the pie to stutter as sections of the file are written to the SD card).

    If anybody knows if the option can be activated via configuration changes etc, I'd be grateful.

  • administrators

    It probably could be enabled at least for you to test. Assuming you are comfortable in the terminal:

    Install your ffmpeg headers etc, then

    cd ~/RetroPie-Setup/
    # remove the config that disables ffmpeg on the RPI
    sed -i "s/--disable-ffmpeg//" scriptmodules/emulators/
    # build new retroarch from source
    sudo ./ retroarch
    # put the file back how it was
    git checkout scriptmodules/emulators/

  • administrators

    if it turns out to work and be somewhat usable (and will build against the Raspbian Jessie libav headers) we could consider enabling it by default.

  • @BuZz Thanks, I'll definitely give this a go - I'm reasonably comfortable with the command line - I've been writing setup guides for Hatari, and installing Raspbain / RetroPie / Kodi with custom menus etc.

    I've currently broken my 3.6 RetroPie / Raspbian Desktop / Kodi installation due to messing around with codecs to transcode video grabbed from Fuse, so I'm rebuilding with RetroPie 3.7 at present.

    Thanks for the feedback, sorry I didn't reply sooner, was in hospital :(

    Using Hatari's in-built recording on an overclocked Pi 3, using uncompressed (bmp) video, outputting to a file on a usb-connected hard drive, the impact on the system wasn't too bad.

    Setting frameskip to 0 to avoid stuttering in the recording, the emulator was running well (albeit with some audio corruption whilst recording - the final output file had flawless audio and video). Attempting to record to the main micro sd causes all sorts of large pauses and even on a large, fast class 10 card.

    BTW you guys are tremendous, thanks for all the astonishing work you do on RetroPie - I donated today and tweeted encouraging others to do likewise!

  • @BuZz
    Here's a brief update regarding my progress in creating and installing a custom build with ffmpeg for RetroArch core emulators.

    I've installed ffmpeg and associated codecs and confirmed that the tools are working by transcoding some video files.

    I've followed the 3 steps which you kindly provided to excise the --disable-ffmpeg command from the script, and run the same to pull the latest source, and obtain a clean copy of the script via git.

    The next step I took was to run the retropie setup script, and use the 'source based installation' option, installing updates for a few RetroArch core emulators as a test. These emulators now have 'ffmpeg' as an option within the Settings | Driver sub-menu in RGUI, and options for the recording are now available in another sub-menu.

    I'm presently looking at altering the parameters sent when launching the emulators to call the recording config file, and actually start the recording (there appears to be no option within RGUI to start / stop recording, which seems odd)

    Many thanks

  • Another brief update, as it's late:
    I have successfully recorded audio/video via ffmpeg from the Stella Atari VCS emulator running Pitfall II under RetroPie on a Pi 3
    30 seconds of the recording can be seen on the tweet I just made:
    The audio/video look pretty flawless, with no sync issues or artefacts, and no impact on the gameplay whilst recording was underway.

    I tried this on PrBoom (Doom) as well, but the results have some issues - namely the audio/video are not in sync - seems like the video is running too fast.

    Still working on optimisations, including recompiling ffmpeg to take advantage of the newly added native x264 Raspberry Pi encoding!

  • ...I'm still working on this, although Real Life (tm) has reared it's head once more and is slowing things somewhat.

    Although I successfully rebuilt ffmpeg to use the Raspberry Pi's native hardware to handle the encoding, after reading that this was very recently updated in the x264 encoder. Unfortunately it seems this feature is in the very early stages, and whilst it works, it is practically unusable - hopefully it will improve as the developer of the patch is still working on it.

    Currently I'm working on tuning the recording using the config files (and learning more about ffmpeg than I ever wanted to...),

    Megadrive emulation records perfectly as well as does Atari 2600 / VCS, which is a pretty good result.

  • This post is deleted!

  • Just an update in case anybody was watching this (the original) post - I've finally published the guide... I hope that you find it helpful - please feel free to ask me any questions (as I've not had time to polish it quite as much as I'd like)

    Details are on the forum post here:

    A direct link to the guide is here:

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

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.