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

    Is it possible to stream retropie to twitch?

    Scheduled Pinned Locked Moved Help and Support
    30 Posts 8 Posters 18.2k 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.
    • K
      kikinaak Banned
      last edited by

      @lwszolek no progress here, but I have not tinkered with it much. My circumstances prevent me from overclocking my pi at present (heat management issues) and I'm thinking an external card is the way to go once I can afford it. It offloads recording to another device and lets the pi focus on far important matters like playing the game :)
      I will toss an update on here if I ever manage to get it working.

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

        Hi,

        I have my third and final part of the guide on recording (and using twitch) 90% complete; I'm sad to say it's been on hiatus due to a family tragedy. I aim to get back to it, if for no better reason than to take my mind somewhere else.

        I dislike releasing unpolished guides, but may have to if I cannot motivate myself sufficiently - maybe rework it at some better time.

        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 0
        • R
          RetroResolution @lwszolek
          last edited by RetroResolution

          @lwszolek to be honest I'm not sure how the pi 2 will handle native capture - this entire project has been undertaken on a pi 3 @ 1350mhz; on less demanding emulators it's likely to be okay. Further tweaking the ffmpeg config to trade quality for speed is also an option.

          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
            lwszolek @RetroResolution
            last edited by

            @RetroResolution - I am sorry to hear you're going through a hard time right now. Online tutorials are not a priority next to RL. If you don't get around to finishing the guide, can I peek at the unfinished version? If you like, I can help edit it or something like that.

            Good to know about the pi3. I do have one of those lying around also, so if I can't get the pi2 at least working with nes emulator (my goal), I'll try that one.

            R mediamogulM 2 Replies Last reply Reply Quote 1
            • R
              RetroResolution @lwszolek
              last edited by

              @lwszolek thanks for your support, it helps!
              I did manage to complete another chunk of the guide - it's not been helping that the on-line editor keeps crashing under the strain (relatively complex layout for a WordPress page)
              I will try and get this finished tonight - lost two days trying to install visual studio on Windows 7...
              I'm happy to give you a copy to look at if I don't get it published today or tomorrow.

              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 0
              • mediamogulM
                mediamogul Global Moderator @lwszolek
                last edited by

                @lwszolek said in Is it possible to stream retropie to twitch?:

                @RetroResolution - I am sorry to hear you're going through a hard time right now.

                I hate to hear this as well. Your guides are always a pleasure to view, right alongside Herb's and Floob's and I look forward to seeing more anytime you feel like producing them.

                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

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

                  @mediamogul thanks for your support, I do appreciate 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.

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

                    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

                    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 0
                    • Z
                      zerojay
                      last edited by

                      Has anyone actually succeeded with streaming to twitch? I just get Retroarch crashing with a bus error when I attempt.

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

                        @zerojay I've not succeeded yet, as Twitch requires a specific x264 video and planar format; the trick to getting it working will be to use ffmpeg as a command-line tool to transcode some existing video file; this allows lots of tests with different configurations to be made without slow, tedious launching of Emulation Station, then dropping back to the terminal to make changes (this is how I worked out the settings for recording).

                        I have a link somewhere to a thread in which the Twitch codec requirements are discussed; it's on another machine, but I'll update this post to include it as soon as I can.

                        [Edit]
                        The link I was looking for is:
                        http://libretro.com/forums/showthread.php?t=115

                        The example Twitch settings as found on the thread can be seen, below. The main issue is that the video codec is libx264 and the pix_fmt must be yuv420p. In the code I use to record to disk, the video codec is libx264rgb with pix_fmt set to bgr24

                        I spent an evening looking into this, but have not been able to directly ouput to yuv420p using any x264 codec. It may be necessary to recompile the ffmpeg library to include some alternative x264 codec library (one which directly supports output to yuv420p).

                        The ffmpeg documentation does mention (somewhere...) commands to interrogate a given code to see which pix_fmts can be used.

                        vcodec = libx264
                        pix_fmt = yuv420p # twitch only supports yuv420p
                        scale_factor = 2 # Upscales with 2x to preserve chroma
                        acodec = libmp3lame
                        audio_global_quality = 75
                        sample_rate = 44100
                        format = flv # Flash muxer
                        
                        video_crf = 25 # -crf
                        video_tune = animation # -tune
                        video_preset = superfast # -preset
                        threads = 3 # x264 threads
                        

                        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
                          selsine
                          last edited by

                          For anyone that's still following this, I've found some FFMPEG settings that work:

                          vcodec = libx264
                          acodec = libfdk_aac
                          pix_fmt = yuv420p
                          threads = 2
                          scale_factor = 1
                          format = flv
                           
                          video_preset = ultrafast
                          video_profile = main
                          video_tune = animation
                          video_bufsize = 512k
                          video_minrate = 512k
                          video_maxrate = 512k
                          video_r = 60
                          video_g = 120
                          video_keyint_min = 60
                           
                          sample_rate = 44100
                          audio_preset = aac_he_v2
                          audio_global_quality = 1
                          

                          You can read more about it in my post: How To Live Stream To Twitch from a RetroPie

                          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.