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

    How-to guide: Recording Live Gameplay in RetroPie’s RetroArch Emulators Natively on the Raspberry Pi (and Twitch streaming)

    Scheduled Pinned Locked Moved Help and Support
    recordingvideo captureffmpeglibretroretroarch
    80 Posts 20 Posters 48.5k 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.
    • meleuM
      meleu @LSolrac2
      last edited by meleu

      @LSolrac2
      [EDIT: I'm wrong. The spaces doesn't matter!]
      You can't have spaces before and after the equal sign.

      So, the following line is invalid:

      default = "lr-mgba"
      

      You should use it:

      default="lr-mgba"
      
      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      R 2 Replies Last reply Reply Quote 2
      • R
        RetroResolution @LSolrac2
        last edited by RetroResolution

        @LSolrac2 thanks for the pastebin link; is this a collection of entries from more than one emulators.cfg file? A single emulators.cfg would have an entry for default=..

        Can you post your entire emulators.cfg for a single retroarch emulator?

        [Edit] sorry, didn't spot the default entry, I tend to leave mine at the end of the file

        I haven't tried the gameboy advance emulators (at all, not just for recording), although I have used the following when recording: VCS, megadrive, 32X, SNES, PlayStation, fuse (zx spectrum), and a custom built Atari800, amongst others.

        Any chance you could use any of these, so we can work from a 'known-good' baseline? Preferably, could you try the Atari VCS emulator, as it places relatively little demand on the system, and allows recording to the Pi's SD Card, without needing a custom config.cfg - basically taking everything back to bare-bones?

        There is the possibility that something is amiss due to your system having been updated from 3.8 to 4 rc-1, but let's hope not...

        If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

        RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

        L 1 Reply Last reply Reply Quote 0
        • R
          RetroResolution @meleu
          last edited by RetroResolution

          @meleu good spot meleu - hopefully this is all it is (there's me burrowing down deep, missing the obvious!)

          [Edit] regardless, I'll add this to the guide, as it's definitely likely to trip people up

          If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

          RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

          1 Reply Last reply Reply Quote 1
          • R
            RetroResolution @meleu
            last edited by RetroResolution

            @LSolrac2 I noticed that thethe recording filename in your emulators.cfg has an extension of .mp4, whereas I always use .mkv; I don't' know if this is an issue, but I transcode from .mkv to .mp4 after recording.

            If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

            RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

            R 1 Reply Last reply Reply Quote 0
            • R
              RetroResolution @RetroResolution
              last edited by

              @RetroResolution just for reference, from the guide, here's the emulators.cfg from my system for the VCS emulator, Stella

              lr-stella="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-stella/stella_libretro.so --config /opt/retropie/configs/atari2600/retroarch.cfg %ROM%"
              lr-stella-record-hdd-noconfig="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-stella/stella_libretro.so --record /media/pi/EXT_HDD/RPi_AVI/recording_VCS.mkv --config /opt/retropie/configs/atari2600/retroarch.cfg %ROM%"
              lr-stella-record-hdd="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-stella/stella_libretro.so --record /media/pi/EXT_HDD/RPi_AVI/recording_VCS.mkv --recordconfig /home/pi/RetroPie/recording/config/config.cfg --config /opt/retropie/configs/atari2600/retroarch.cfg %ROM%"
              default="lr-stella-record-hdd"
              stella="stella -maxres 320x240 %ROM%"
              

              If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

              RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

              1 Reply Last reply Reply Quote 1
              • L
                LSolrac2 @RetroResolution
                last edited by

                @RetroResolution
                That's the GBA emulators one.
                And guess what OuO It works for PSX just fine, just noticed a file created when I started it up the emulator.

                R 1 Reply Last reply Reply Quote 1
                • R
                  RetroResolution @LSolrac2
                  last edited by

                  @LSolrac2 excellent!
                  It's possible it's simply an error in your GBA emulators.cfg then - or perhaps it doesn't work with that emulator (I found that the PC Engine emulator would only record sound, not video, for example)

                  If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                  RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    LSolrac2 @RetroResolution
                    last edited by LSolrac2

                    @RetroResolution
                    Taking newer notes such as the recordconfig and emulator specific recording, I've come to notice, lr-vba-next seems to work for recording GBA
                    However, when tested, I did NOT succeed in the shader passing, noted the specific case, just in case someone enjoys playing the game with Shaders (Like me and Sword of Mana) there wouldn't happen to be a way to load these up on a configuration, would there?

                    PS Edit; no luck with ogg/libmp3lame, could be just typo, but libmp3lame crash, and ogg didn't record sound. (done via the recordconfig)

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      RetroResolution @LSolrac2
                      last edited by RetroResolution

                      @LSolrac2 the only way I was able to record the output with shaders enabled was painfully slow; you need to update a setting in the retroarch.cfg to enable recording of the GPU framebuffer. I didn't include this in the guide as the frame rate is totally unplayable, even on the VCS emulator (playback is at full speed, however).

                      Just to show it does work though, here's footage I made of Space Harrier (32X). You can see me enabling the barrel distortion, and barrel distortion-with-phosphor shaders.

                      If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                      RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                      meleuM 1 Reply Last reply Reply Quote 1
                      • meleuM
                        meleu @RetroResolution
                        last edited by

                        @RetroResolution
                        I'm not sure if you use your blog to monetize, but I think your tutorial is the kind of info that fits very well in RetroPie wiki...

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        R 1 Reply Last reply Reply Quote 1
                        • R
                          RetroResolution @meleu
                          last edited by

                          @meleu it's pretty much all done for the love of it!

                          If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                          RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                          meleuM 1 Reply Last reply Reply Quote 2
                          • meleuM
                            meleu @RetroResolution
                            last edited by

                            @RetroResolution I enjoy your writing style. It's precise and detailed! ;-)

                            • Useful topics
                            • joystick-selection tool
                            • rpie-art tool
                            • achievements I made
                            1 Reply Last reply Reply Quote 1
                            • R
                              RetroResolution
                              last edited by RetroResolution

                              From tests it seems that sometime in the last few days some changes have been made to RetroArch 1.3.6; as well as adding a very funky new UI, when recording is enabled using FFmpeg something fails when the PlayStation emulator lr-pcsx-rearmed is used (as soon as runcommand starts the emulator segmentation faults are logged, and the system returns to Emulation Station). Recording from VCS, Megadrive, 32X, and SNES were all working as normal.

                              [Edit - the 'funky new UI' turned out to be an old interface which resurfaced due to a missing default value in the codebase - see @meleu 's post, below]

                              I have determined the steps required to pull a specific version of RetroArch from the Git archive (in this case 1.3.6 as released on 17th July), and have the existing RetroPie setup system build this (instead of the default behaviour of pulling the very latest source code).

                              I'll write this up as an addendum to my original guide, but for now the required process is:

                              OBTAIN AND BUILD SPECIFIC VERSION OF RETROARCH TO ENABLE FFMPEG RECORDING

                              [edit - updated 28th September 2016 - adding manual ./configure step due to minor change in build subsystem; adding sudo to various commands following change in permissions of temporary build directories; adding creation of temporary build directories]

                              Modify the RetroPie setup script for RetroArch:

                              cd /home/pi/RetroPie-Setup

                              If the following directories are not already present:
                              sudo mkdir tmp
                              sudo mkdir tmp/build

                              remove parameter which is disabling ffmpeg in retroarch:

                              sed -i "s/--disable-ffmpeg//" scriptmodules/emulators/retroarch.sh

                              Edit the script to prevent call which obtains the very latest version of RetroArch source from git repository:

                              sed -i 's@\(gitPullOrClone "$md_build" https://github.com/libretro/RetroArch.git\)@#\1@' scriptmodules/emulators/retroarch.sh

                              Obtain RetroArch version 1.3.6 (as a tar) from the git archive:

                              cd /home/pi/RetroPie-Setup/tmp/build

                              sudo wget https://github.com/libretro/RetroArch/archive/v1.3.6.tar.gz

                              Unpack tar archive file:

                              sudo tar xzvf v1.3.6.tar.gz

                              Remove the tar file:

                              sudo rm v1.3.6.tar.gz

                              Rename directory to that expected by setup script:

                              sudo mv RetroArch-1.3.6/ retroarch

                              cd retroarch

                              Manually run the configuration script for RetroArch

                              sudo ./configure

                              Run the setup script to build RetroArch 1.3.6 with ffmpeg enabled:

                              cd /home/pi/RetroPie-Setup

                              sudo ./retropie_packages.sh retroarch

                              Replace the modified script file (to prevent issues when running future updates via the retropie setup script, due to uncommitted changes in the local git repository casused by modifying this file)

                              git checkout scriptmodules/emulators/retroarch.sh

                              NOTE:
                              after running the script, the temporary build folder should be empty
                              /home/pi/RetroPie-Setup/tmp/build

                              ...and /opt/retropie/emulators/retroarchshould contain the freshly rebuilt version 1.3.6 retroarch

                              If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                              RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                              meleuM budegarowerB 2 Replies Last reply Reply Quote 1
                              • meleuM
                                meleu @RetroResolution
                                last edited by meleu

                                @RetroResolution this trick useful for testing bugs between versions. Thanks for sharing.

                                But the RetroArch user interface you mentioned is the xmb menu driver. You can explicitly get the "old" rgui back setting menu_driver = "rgui".

                                Cheers.

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                R 1 Reply Last reply Reply Quote 1
                                • R
                                  RetroResolution @meleu
                                  last edited by RetroResolution

                                  @meleu thanks Meleu. The UI regression threw me somewhat - I started a new thread when I first noticed problems; @dankcushions was on there along with others, and also talked about the UI options - thanks for mentioning it though.

                                  Resolving the loss of recording using the PlayStation emulator was my main focus - it's the main reason I started the entire FFmpeg project in the first place!

                                  [Edit - somehow it's two weeks later and I've not yet written this update into the main guide...]

                                  If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                                  RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                                  1 Reply Last reply Reply Quote 1
                                  • S
                                    shaun040
                                    last edited by

                                    @RetroResolution I seem to hitting a snag. I followed everything to a T and have ffmpeg compiled, built retroarch with ffmpeg, set it up. Boots, emultationstation loads fine, emultators and roms play just fine...however when I go into RGUI and try to verify recording functionality is there, when I select Settings it says "No Information is Available" So I can't seem to see any retroarch settings.

                                    I tried just passing the record parameter as well which launches the ROM but recording never happens or kicks off the ffmpeg process.

                                    Any help would be greatly appreciated!

                                    R 1 Reply Last reply Reply Quote 0
                                    • R
                                      RetroResolution @shaun040
                                      last edited by RetroResolution

                                      @shaun040 Hi,

                                      I'll see what I can do!

                                      Can you let me know which version of RetroPie you have installed?

                                      Regarding the RetroArch RGUI, are you accessing this from within a running emulator, or via the RetroPie sub-menu in Emulation Station?

                                      Can you let me know what the version number of RetroArch is, as reported in the bottom-left of the screen in the RGUI menu?

                                      When following the guide, did you modify the version of RetroArch which RetroPie-Setup pulls by default (e.g. the very latest version from github), or did you follow the modified instructions to build the version of retroarch which was released in July 2016 (e.g. the instructions which are in this comments section ('OBTAIN AND BUILD SPECIFIC VERSION OF RETROARCH TO ENABLE FFMPEG RECORDING') and also in the comments section of the guide at: https://retroresolution.com/2016/07/06/recording-live-gameplay-in-retropies-retroarch-emulators-natively-on-the-raspberry-pi/)?

                                      Thanks

                                      If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                                      RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        shaun040 @RetroResolution
                                        last edited by

                                        @RetroResolution Thanks for replying!

                                        RetroPie - 4.0.3

                                        RGUI - 1.3.6

                                        I've tried both accessing the RGUI menu via an emulator and the sub menu in emulation station. Once in the RGUI menu, I can use the arrow keys to select various menu items then pressing right shift is when I get the error.

                                        In regards to setup, I tried both the default which pulls the latest then also tried the code to pull an exact version with the same results.

                                        The very peculiar thing is I have a old SD card with RP 1.2.2 from a pre-built image and get the same error trying to get deeper into settings. Am I missing something simple? Is there a special key to get into sub menus? Enter doesn't work and it seems right shift and arrow keys are the only keys that do anything.

                                        Cheers,
                                        Shaun

                                        R 1 Reply Last reply Reply Quote 0
                                        • R
                                          RetroResolution @shaun040
                                          last edited by

                                          @shaun040 Hi,

                                          Technically nothing actually needs to be done from within the RetroArch RGUI menu to configure the recording feature once it's been enabled during the build phase, but as you noted the feature isn't working for you via the runcommand menu configuration.

                                          I'm unsure why you're not able to navigate RGUI which makes me wonder if something isn't working in the rebuilding RetroArch step (although given that you've used both approaches it's unlikely that this is the problem).

                                          As a test, can you revert the RetroArch installation by installing the latest binary using the RetroPie-Setup menu, then test if you can navigate RGUI? You should be able to use whichever controller you have configured - if it works within the emulator, it should work within RGUI.

                                          Have you checked the runcommand log ouput to see if it's revealing any information regarding the failure of the recording? On pre v4 RetroPie this was in \tmp\runcommand.log, but on the latest version I tested on I noticed this log file has been moved (unfortunately I can't recall where the new location is - my working system is still running RetropIe 3.8; my test system has just been re-purposed as a media center, and my new Raspberry Pi 3 test machine hasn't yet had RetroPie installed)

                                          If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                                          RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                                          S 1 Reply Last reply Reply Quote 0
                                          • S
                                            shaun040 @RetroResolution
                                            last edited by

                                            @RetroResolution Ok, so I managed to get settings to work.

                                            Before I was logging into the machine via console then launching emulationstation by just running that command from the shell.

                                            From there...rgui would only work with a keyboard since that was always plugged in on boot. Controller wouldn't work even if I unplugged the keyboard.

                                            I then set emulationstation to start on boot and unplugged the keyboard so only the controller is there at the start. I can now get to the sub-menus in Settings! Success!

                                            So as you mentioned in your article, the Recording menu is not there. However, I do see the Record function in the Driver menu but it is set to "null". I did check I ran the script without the --disable-ffmpeg. I'm now in the process of recompiling ffmpeg then going to re-run retroarch_packages.sh and check again.

                                            I'll let you know how that goes!

                                            Cheers,
                                            Shaun

                                            R 1 Reply Last reply Reply Quote 0
                                            • 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.