Announcement

Collapse
No announcement yet.

Automatic swing recording with OBS Studio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic swing recording with OBS Studio

    This is a tutorial on how to setup OBS studio for live streaming/instant replay. You do not need to live stream for this to work.

    Step 1

    Download OBS Studio, Voice attack, and Audio zone trigger.

    Step 2 Setting up OBS Studio:

    1. Open the OBS Studio settings, go to output, and check the box "Enable Replay Buffer"
    Set the length to your desired time. Note: Longer replay buffers require more memory. For this guide we'll use 5 seconds.

    2. In the general settings, check the box to Automatically start replay buffer when streaming.

    3. In the Hotkey settings, set a hotkey for saving the replay buffer. For this guide, we'll use Ctrl+Shift+S.
    Using this hotkey you can still save replays normally, even with Instant Replays setup.

    4. Now, close the settings page and start the replay buffer by clicking on "Start Replay Buffer" towards the bottom right of OBS Studio.

    5. Add a new media source to the current scene, we'll call it "Instant Replay" for this guide, and select the Replay buffer file.
    By default it will be located in the “Videos” folder and the file name will start with Replay.

    6. At the top of OBS Studio, click on tools, then scripts and select “instant-replay.lua”

    7. From the Media Source drop down menu, select the media source you just added to the scene. Then hit close.
    If the media source is not appearing, click on the refresh icon to the left.

    8.Open up the OBS Studio settings again and go to the Hotkeys section. There will be a new hotkey, called "Instant Replay".
    For this guide, we'll set the hotkey to Ctrl+Shift+R.

    9. Now your Instant Replay feature is ready. Simply press the hotkey combination you just chose, and the last 5 seconds will play in the media source. You can now resize the source and move it around.

    10. Add your camera inputs.

    Step 3 Setting up Voice Attack

    1. Open voice attack

    2. Select the option to edit profile

    3. Delete all actions.

    4. Select new command

    5. Setup the command to correspond to the provided screen shot

    6. Hit ok then apply.

    Step 4 Setup Audio Zone Trigger.

    1. Setup According to screen shot, Activate a Key which is f12

    Step 5 Arranging the windows

    1. I can't really walk you though this part but here you will arrange all the windows to fit on your OBS layout. the boxes are all drag and drop.

    2. Change the speed of the "Instant Replay" box to what ever you like. I have mine set at 35.

    3. Once you have everything arranged select lock preview.


    Now you should be all set to go. Here is my setup. Im using 3 cameras.

    Any questions or suggestions I would be glad to help.



    Advanced Version using OBS Plugin plugin Replay Source:

    Ok I'm going to assume you are somewhat comfortable with Obs, you can add camera inputs, and install plugins.

    Step 1 Installing Replay Source OBS

    1. Download from https://github.com/exeldro/obs-replay-source/releases

    2. Unzip the download in the 64 bit plugins folder for example: C:\Program Files (x86)\obs-studio\obs-plugins\64bit

    Step 2 OBS

    1. Create a new scene

    Step 3 OBS

    1. Add one video capture source name it DTL, make sure to adjust the camera and set it to highest fps

    2. Add "ReplayInput" source, name it DTL slow, then select your camera and change the following values:
    Duration 4
    Maximum replays 1

    3. Go to the hot keys section. Find the "DTL slow" source, add shift+S as the hotkey to "Load Replay"

    Step 4 Audio zone trigger

    1. Use the same settings as the previous guide, on trigger press f12

    Step 5 Voice attack

    1. disable / delete the previous command.

    2. Create a command that triggers on f12, pauses for 2 seconds, then presses Shift+S

    Step 5

    1. Hope it works


    Here is a live example if I'm online:
    Twitch is the world's leading video platform and community for gamers.



    Last edited by htdumps; 01-27-2019, 07:24 PM.

  • #31
    Originally posted by jrz View Post
    I'm not seeing a buffer file in the Videos folder. After hitting Ctrl-R and Ctrl-S I get two video files in that folder, but that's it. Am I missing something?
    I only have one camera set up at the moment. The problem is that when following the instructions step by step, when it comes time to select the replay buffer file there is no file in the Videos file. Two files are created after I hit ctrl-alt-s and ctrl-alt-r.

    Comment


    • htdumps
      htdumps commented
      Editing a comment
      Use this:
      Huge update. We now have sound detection and full fps playback with OBS and Replay source. This has been a huge amount of work on the developers part, if you like it please feel free to donate to him. He is very responsive and can tweak the plugin even more. paypal.me/exeldro

      Ok I'm going to assume you are somewhat comfortable with Obs, you can add camera inputs, and install plugins.

      Step 1 Installing Replay Source OBS

      1. Download from https://github.com/exeldro/obs-replay-source/releases

      2. Unzip the download in the 64 bit plugins folder for example: C:\Program Files (x86)\obs-studio\obs-plugins\64bit

      Step 2 OBS

      1. Create a new scene

      Step 3 OBS

      1. Add one video capture source name it DTL, make sure to adjust the camera and set it to highest fps

      2. Add an audio input source, name it MIC

      3. Add "ReplayInput" source, name it DTL slow, then select DTL and change the following values:
      Check Capture Internal Frame
      Select Your mic for the audio source.
      Duration 4000
      Load Delay 1000
      Maximum replays 1
      Speed Percentage change to your preference
      Threshold db change to how loud you need it so it will only capture the ball strike. I have it set to -11.00

      4. Click OK.

  • #32
    Thank you for this write up! This works very well, with minimal hassle setting up. The only thing I am struggling with is the preview window size. I am rotating my camera image 90 degrees, and when I overlay it over the skytrak app, there is a ton of "whitespace" around the replay image that takes up a lot of real estate that I don't want to lose. It feels like I am just doing something wrong and it should be an easy fix. I can try and post a picture in case my description doesn't make sense.

    Comment


    • htdumps
      htdumps commented
      Editing a comment
      Post a picture. You can also set your canvas size to 4k which gives you a lot more Real estate

    • dborden0
      dborden0 commented
      Editing a comment
      For simplicity sake, I just bought another monitor to display playback on and don't bother with overlaying it on the projector. Of course my wife noticed the construction in my shop right away. lol.

  • #33
    If you update to the latest version of OBS studio, (version 24) it will break RelayInput. There is a new version of RelayInput you need to download to fix the issue. Just in case anyone run into this.

    Comment


  • #34
    Hi , I can't figure out how to get the "ReplayInput" source shown under "Source - Add" pull down menu. I saved the reply-source file under \obs-studio\obs-plugins\64bit directory. Any help will be greatly appreciated!

    Comment


    • htdumps
      htdumps commented
      Editing a comment
      Is your OBS up to date?

  • #35
    I just downloaded & installed OBS Studio, so I guess it is the latest - 24.0.3 (64 bit)

    Comment


    • htdumps
      htdumps commented
      Editing a comment
      Come on over to discord and Ill try to get you sorted out, https://discordapp.com/invite/PakHbUA

    • wzjy47
      wzjy47 commented
      Editing a comment
      I've got the same issue, so if you happen to figure it, I'd appreciate any feedback...Thanks!

  • #36
    Hi htdumps , I am on discord now, what should I do please? Thank you

    Comment


    • #37
      wzjy47 , htdumps did the trick for me: He had to remotely login to my PC and fixed the issue. It seems he installed the old version obs studio first then upgraded to the latest version. I am not sure. Please ask him for help. He is Gooooooooooooood! Now I need to get a decent webcam.

      Comment


      • htdumps
        htdumps commented
        Editing a comment
        Thank man! there is an issue with the current version needing a dll from the older version that doesn't ship with new version. To fix this install Uninstall OBS completely, install v23, then update through the help menu. Or wait a day or two for the OBS plugin to be updated.

      • wzjy47
        wzjy47 commented
        Editing a comment
        Thanks! I'll give that a try this weekend.

    • #38
      Need help here. I just changed a brand new PC, but my OBS replay window still keeps freezing. If I remove one camera, it seems better (less chance to freeze). This new PC is very good ($1500). So I don't think it is PC hardware. It is probably the setting somewhere is not right. Please help. Thank you.

      Comment


      • #39
        Hey htdumps, I've been using my GC2 for about a year now and just decided to add a camera into the mix. I'm following your instructions on how to do this. I;ve downloaded OSB and those instructions were pretty easy. Pretty great so far but I'm stuck at this point below, I'm a bit of a novice so i'm just following your instructions, but i'm not sure how to execute this in Voice Attack..
        4. Select new command
        5. Setup the command to correspond to the provided screen shot THIS IS THE PART I"M NOT SURE HOW TO DO, ALL HELP IS GREATLY APPRECIATED
        6. Hit ok then apply.
        Last edited by JeffW; 12-23-2019, 07:48 PM.

        Comment


        • htdumps
          htdumps commented
          Editing a comment
          Those are the old instructions. Here are the new one:
          1. Download from https://github.com/exeldro/obs-replay-source/releases

          2. Unzip the download in the 64 bit plugins folder for example: C:\Program Files (x86)\obs-studio\obs-plugins\64bit

          Step 2 OBS

          1. Create a new scene

          Step 3 OBS

          1. Add one video capture source name it DTL, make sure to adjust the camera and set it to highest fps

          2. Add an audio input source, name it MIC

          3. Add "ReplayInput" source, name it DTL slow, then select DTL and change the following values:
          Check Capture Internal Frame
          Select Your mic for the audio source.
          Duration 4000
          Load Delay 1000
          Maximum replays 1
          Speed Percentage change to your preference
          Threshold db change to how loud you need it so it will only capture the ball strike. I have it set to -11.00

          4. Click OK.

      • #40
        Are the camera’s that were recommended earlier in this thread the ones you guys still recommend? Looks like some of them are no longer sold or have been replaced. I know nothing about these cameras and will just get what you recommend. Dtl camera will be about 7feet away and front on will be as close as I can get. Thanks for all the time you’ve put into this.

        Comment


      • #41
        I used to have this working, but my recordings aren't saving now. The replay works fine. I can't even figure out how to manually save the replay. Does anyone know how to get this to work? I did update the plugin to the latest.

        Comment


        • #42
          Originally posted by dborden0 View Post
          I used to have this working, but my recordings aren't saving now. The replay works fine. I can't even figure out how to manually save the replay. Does anyone know how to get this to work? I did update the plugin to the latest.
          Any luck getting the recordings to save? Having the same issue on my end.

          Comment


          • #43
            Originally posted by Phoenix01 View Post
            Need help here. I just changed a brand new PC, but my OBS replay window still keeps freezing. If I remove one camera, it seems better (less chance to freeze). This new PC is very good ($1500). So I don't think it is PC hardware. It is probably the setting somewhere is not right. Please help. Thank you.
            Did you ever figure this out or does anyone have a fix for this? I have done a bunch of troubleshooting and have had no success either. Replays will work for 15 minutes and then OBS will just stop responding.

            Comment


            • #44
              htdumps are you still using this same setup? just wondering if anything has changed...I run into issues with 2 cameras using the same MIC as an audio source for the trigger...either one works flawlessly, adding the 2nd replay causes one replay to stutter/freeze
              TGC 2019 Course Builds:
              - Strawberry Creek
              - Racine Country Club
              - Tuckaway Country Club
              - Meadowbrook Country Club
              - Broadlands
              - Shepherd's Crook
              - Thunderhawk
              - Grand Geneva Highlands
              - Petrifying Springs
              - Johnson Park

              Comment


              • tlrcash
                tlrcash commented
                Editing a comment
                I have the same problem and it drives me insane. I hope someone has figured out a solution. I stopped using a dual camera setup because it was too inconsistent.

            • #45
              tlrcash the only workaround ive been successful with is make a new MIC2, but use the same microphone source...it works but then you get an echo effect because its the same mic recording twice

              TGC 2019 Course Builds:
              - Strawberry Creek
              - Racine Country Club
              - Tuckaway Country Club
              - Meadowbrook Country Club
              - Broadlands
              - Shepherd's Crook
              - Thunderhawk
              - Grand Geneva Highlands
              - Petrifying Springs
              - Johnson Park

              Comment

              Working...
              X