• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

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

Scheduled Pinned Locked Moved Help and Support
recordingaudio-videonativeffmpegcapture
11 Posts 2 Posters 10.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    RetroResolution
    last edited by RetroResolution 7 Aug 2016, 17:04 10 May 2016, 13:29

    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

    B 1 Reply Last reply 10 May 2016, 13:37 Reply Quote 1
    • B
      BuZz administrators @RetroResolution
      last edited by 10 May 2016, 13:37

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

      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

      R 1 Reply Last reply 10 May 2016, 14:03 Reply Quote 1
      • R
        RetroResolution @BuZz
        last edited by 10 May 2016, 14:03

        @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.

        1 Reply Last reply Reply Quote 0
        • B
          BuZz administrators
          last edited by BuZz 5 Oct 2016, 15:18 10 May 2016, 14:17

          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/retroarch.sh
          # build new retroarch from source
          sudo ./retropie_packages.sh retroarch
          # put the file back how it was
          git checkout scriptmodules/emulators/retroarch.sh
          

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          R 1 Reply Last reply 14 May 2016, 19:58 Reply Quote 1
          • B
            BuZz administrators
            last edited by 10 May 2016, 14:21

            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.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            R 1 Reply Last reply 13 May 2016, 11:19 Reply Quote 1
            • R
              RetroResolution @BuZz
              last edited by RetroResolution 13 May 2016, 11:19

              @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!

              1 Reply Last reply Reply Quote 0
              • R
                RetroResolution @BuZz
                last edited by RetroResolution 14 May 2016, 19:58

                @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 retroarch.sh script, and run the same to pull the latest source, and obtain a clean copy of the script via git.

                [edit]
                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

                1 Reply Last reply Reply Quote 0
                • R
                  RetroResolution
                  last edited by RetroResolution 18 May 2016, 22:15

                  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:
                  https://twitter.com/retroresolution/status/733056153756766209
                  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!

                  1 Reply Last reply Reply Quote 2
                  • R
                    RetroResolution
                    last edited by RetroResolution 22 May 2016, 18:05

                    ...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.

                    1 Reply Last reply Reply Quote 0
                    • R
                      RetroResolution
                      last edited by RetroResolution 23 May 2016, 21:57

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • R
                        RetroResolution
                        last edited by RetroResolution 7 Aug 2016, 00:53 7 Jul 2016, 21:45

                        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:

                        https://retropie.org.uk/forum/topic/2394/how-to-guide-recording-live-gameplay-in-retropie-s-retroarch-emulators-natively-on-the-raspberry-pi-and-twitch-streaming

                        A direct link to the guide is here:

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

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post

                        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.

                          This community forum collects and processes your personal information.
                          consent.not_received