• 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

Audio issue when streaming to twitch

Scheduled Pinned Locked Moved Help and Support
audiotwitchstreaming
25 Posts 2 Posters 1.6k 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.
  • Y
    yooodt @mitu
    last edited by 28 Sept 2022, 17:30

    @mitu ah I see. Perhaps this local copy isn't thr one I started with. Might be an old backup of an early experiment.

    This said I did do a rollback and the problem still persisted. On yours, have you tried the latency change mid game to stop the glitching? Be interested to know if the fix is specific to me or if it works on all. This would help me work out if its something I need to fix locally or wait for a RP update.

    If I went down the clean install route, is it as simple as deleting the pie directory? Or is there a command line to do this? Thank you so much for your help

    M 1 Reply Last reply 28 Sept 2022, 19:32 Reply Quote 0
    • M
      mitu Global Moderator @yooodt
      last edited by 28 Sept 2022, 19:32

      @mitu ah I see. Perhaps this local copy isn't thr one I started with. Might be an old backup of an early experiment.

      Not sure what you mean - is the log fragment (with version 4.4) from your current 4.8 system ? (where you have the problem)

      This said I did do a rollback and the problem still persisted.

      How exactly did you do the rollback ? Did you install an earlier backup - from before the update ?

      On yours, have you tried the latency change mid game to stop the glitching? Be interested to know if the fix is specific to me or if it works on all. This would help me work out if its something I need to fix locally or wait for a RP update.

      I haven't tried yet - is this in the Audio settings menu ? Note that I just tried the Record function, since I don't have any streaming account (Twitch or otherwise). What I've noticed is that the lr-snes9x core doesn't have the issue, though a slight audio cracking appears periodically.

      If I went down the clean install route, is it as simple as deleting the pie directory? Or is there a command line to do this? Thank you so much for your help

      No, I was suggesting just to try with a clean image installation - from the latest RetroPie Pi3 image - without any updates. This eliminates any problems caused by an OS upgrade (held libraries, incompatible configs, etc.) If the issue doesn't occur on a clean image, then try a Retropie update, which should install the latest RetroArch and you can re-test to see if the issue occurs after this version upgrade.

      Y 1 Reply Last reply 28 Sept 2022, 19:58 Reply Quote 0
      • Y
        yooodt @mitu
        last edited by 28 Sept 2022, 19:58

        @mitu said in Audio issue when streaming to twitch:

        @mitu ah I see. Perhaps this local copy isn't thr one I started with. Might be an old backup of an early experiment.
        

        Not sure what you mean - is the log fragment (with version 4.4) from your current 4.8 system ? (where you have the problem)

        On a separate disk I have a backup of my emulators etc. All the log files on the actual pi seemed to say 4.8 from current system so I thought perhaps the one i located may have been where I started from.

        This said I did do a rollback and the problem still persisted.

        How exactly did you do the rollback ? Did you install an earlier backup - from before the update ?

        I ran some code from an earlier forum post but changed the hex to the one I saw in the log file which I think made it install the older version. On my phone so can't quote the exact text.

        On yours, have you tried the latency change mid game to stop the glitching? Be interested to know if the fix is specific to me or if it works on all. This would help me work out if its something I need to fix locally or wait for a RP update.

        I haven't tried yet - is this in the Audio settings menu ? Note that I just tried the Record function, since I don't have any streaming account (Twitch or otherwise). What I've noticed is that the lr-snes9x core doesn't have the issue, though a slight audio cracking appears periodically.

        It's on the main menu under 'options' I think, it says latency as a menu header. I access it mid game by holding my menu (ps) button and pressing triangle although this won't mean much unless you're also using a ps3 controller!

        If I went down the clean install route, is it as simple as deleting the pie directory? Or is there a command line to do this? Thank you so much for your help

        No, I was suggesting just to try with a clean image installation - from the latest RetroPie Pi3 image - without any updates. This eliminates any problems caused by an OS upgrade (held libraries, incompatible configs, etc.) If the issue doesn't occur on a clean image, then try a Retropie update, which should install the latest RetroArch and you can re-test to see if the issue occurs after this version upgrade.

        As in wipe the whole sd card and put a clean image of retropie on? I may try this even if this isn't what you mean as I have all my files backed up anyway!

        Thanks

        1 Reply Last reply Reply Quote 0
        • Y
          yooodt
          last edited by 28 Sept 2022, 22:03

          @mitu
          update
          I've completely re-imaged the SD card with the image from rasperry pi imager, I selected the option to install retropie as well from the menu.

          Dropped my Nes test roms on, added the twitch.cfg file (code below)

          vcodec = libx264
          acodec = libshine
          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
          

          and my emulators.cfg file is as follows:

          lr-fbneo-nes = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fbneo/fbneo_libretro.so --subsystem nes --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"
          lr-fceumm = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"
          default = "lr-fceumm"
          lr-nestopia = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-nestopia/nestopia_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"
          lr-quicknes = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-quicknes/quicknes_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"
          lr-fceumm-record-twitch = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg --recordconfig /home/pi/RetroPie/recording/twitch.cfg --record rtmp://live./live my key hidden --recordconfig /home/pi/RetroPie/recording/twitch.cfg %ROM%"
          

          The game audio is perfect but as soon as I use the twitch emulator version, it goes horrific locally. Same as before!

          Does this code make my audio codec both locally AND on the stream 'libshine'? I wonder if its as simple as changing this.

          M 1 Reply Last reply 29 Sept 2022, 04:50 Reply Quote 0
          • M
            mitu Global Moderator @yooodt
            last edited by 29 Sept 2022, 04:50

            @yooodt said in Audio issue when streaming to twitch:

            Does this code make my audio codec both locally AND on the stream 'libshine'? I wonder if its as simple as changing this.

            I don't think that matters, I've tested with another codec (libmp3lame instead of libshine) and it's the same behavior.
            Changing the Audio Latency from the menu, does indeed fix the broken audio (after recording). My guess is that RetroArch simply re-initializes the audio because of that change and this fixes the local output, the value set through the options doesn't matter. It's not a matter of changing the default value - it's the process of changing the value mid-recording that's fixing it.

            I also tested using the latest RetroArch release and it seems the issue doesn't occur, I suppose it may have been fixed with some recent changes so that's a good thing.

            Y 1 Reply Last reply 29 Sept 2022, 07:23 Reply Quote 0
            • Y
              yooodt @mitu
              last edited by 29 Sept 2022, 07:23

              @mitu so I should run the latest update now? Which method shall I use to update?

              Thanks for all your help with this.

              M 1 Reply Last reply 29 Sept 2022, 08:05 Reply Quote 0
              • M
                mitu Global Moderator @yooodt
                last edited by 29 Sept 2022, 08:05

                @yooodt said in Audio issue when streaming to twitch:

                @mitu so I should run the latest update now? Which method shall I use to update?

                RetroPie doesn't always have the latest version of RetroArch included, updating from RetroPie will get you v1.10.0, the latest - upstream - version is v1.10.3. I didn't test with v1.10.3, but with the latest source code from Github.

                You'll have to wait until RetroPie adds v1.10.3 and then update as normal from RetroPie-Setup to validate you don't have the issue.
                I guess there's one more reason to add v1.10.3 in RetroPie.

                Y 1 Reply Last reply 29 Sept 2022, 08:08 Reply Quote 0
                • Y
                  yooodt @mitu
                  last edited by 29 Sept 2022, 08:08

                  @mitu Is there a way I can add the latest retroarch without waiting for it to be added to retropie? I can ssh into it so if theres a cmd line way of doing it, great

                  M 1 Reply Last reply 29 Sept 2022, 08:13 Reply Quote 0
                  • M
                    mitu Global Moderator @yooodt
                    last edited by 29 Sept 2022, 08:13

                    @yooodt If you want to test things, then follow the instructions from
                    https://retropie.org.uk/forum/topic/33047/updating-retroarch-to-1-10-3.

                    Y 1 Reply Last reply 29 Sept 2022, 08:14 Reply Quote 0
                    • Y
                      yooodt @mitu
                      last edited by yooodt 29 Sept 2022, 08:14

                      @mitu thank you. here goes!!

                      Edit - looks a little heavy for me to do right now. I'm going to just run the retropie updater which will put me at 1.10 and patiently wait for the new RA t to be added

                      1 Reply Last reply Reply Quote 0
                      • Y yooodt referenced this topic on 24 Oct 2022, 20:26
                      25 out of 25
                      • First post
                        25/25
                        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