Automatic swing recording with OBS Studio

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • FaultyClubs
    replied
    Hehe, I never looked at the fractional. Just assumed it was fractions of the 1-120. So the integer fps stops at 120 and the fractional goes forever? Craziness!

    That's good though. Let us know how it works out. The OBS screens and everything are running at whatever rate you set, it's not just the cameras. My laptop was max'ed out and became unresponsive at 154 fps with two 120 fps cameras and replay running full screen. My TGC computer max'ed out at 334 fps with the same conditions. Didn't look at how jittery the video was at that loading...just a quick fps limit test.
    Last edited by FaultyClubs; 02-03-2019, 04:32 AM.

    Leave a comment:


  • htdumps
    replied

    Leave a comment:


  • htdumps
    replied
    Originally posted by FaultyClubs View Post
    My previous post showed OBS reducing my 120 fps camera down to 60 fps for recording and slow motion playback. I explained in the comments to that post what appeared to be happening.

    I had some time today to perform more tests as described below.

    I tested with my 120 fps global shutter camera. I picked this because it has only one video mode which is 1280x720 at 120 fps. It has no other modes or speeds which can be mistakenly used to confuse the test results. I then set OBS internal frame rate to 30 fps (Settings/Video/FPS) so the speed difference would be obvious (120 vs 30) if OBS re-encodes the camera down to that rate at any point.

    1) First test was the one I asked HT to do above (although I wanted him to use his 330 fps camera). Run OBS at 30 fps (Settings/Video/FPS=30) and my camera at 120 fps. Then dump the replay's memory buffer. It will be at 120 fps if OBS is capturing at the full rate. Otherwise it'll be 30 fps.

    Result: Rate is 30 fps.

    2) Second test was the stop watch test. I recorded my phones digital stop watch. At 120 frames per second there will be 12 frames for every 0.1 second tick over. 30 fps will have 3 frames every 1/10 of a second. I then dumped the replay memory buffer and stepped through it frame by frame counting how many frames per 1/10 of a second tick mark.

    Result: 3 frames every 1/10 of a second tick mark = 30 fps

    3) Third test was only looking at the slow motion replay. I set the playback speed to 1%. At 120 frames per second this means there will be 1.2 frames per second (or 2.5 seconds for three frames). At 30 fps there will be 0.3 frame per second (or 10 seconds for three frames). I then captured a moving object (big arm wave) to make it easy to see when a new frame occurs and measured the time for three frames.

    Result: 10 seconds for three frames = 30 fps

    4) I redid test #1 and #3 with OBS set at 60 fps (you have to exit and restart OBS for the new setting to take effect). Results were 60 fps.


    CONCLUSION:

    My 120 fps camera has been re-encoded to run at the OBS rate. There is no setting to turn this off.

    As I said in earlier post, OBS can run at a maximum of 120 fps. So those of us with 120 fps cameras should be OK, just be sure to set OBS to 120 fps. Leaving OBS at the default 30 or 60 fps will result in your 120 fps camera being dumbed down to the lower rate.

    This data suggests there is no point running cameras faster than 120 fps...they will be dumbed down to at least 120 fps or lower depending on the OBS frame rate setting.

    Anyway, that consumed an hour of my life, I'm not sure it was worth it. Definitely exceeds my interest level but I had started it so thought I should try to finish. I'll leave it to others to confirm or deny these results (or figure out what any of it means if HT's results are correct where he says OBS is working at the faster rates above 120 fps).
    Use the fractional value, i have it set to 2000 fps waiting on new camera

    Leave a comment:


  • FaultyClubs
    replied
    My previous post showed OBS reducing my 120 fps camera down to 60 fps for recording and slow motion playback. I explained in the comments to that post what appeared to be happening.

    I had some time today to perform more tests as described below.

    I tested with my 120 fps global shutter camera. I picked this because it has only one video mode which is 1280x720 at 120 fps. It has no other modes or speeds which can be mistakenly used to confuse the test results. I then set OBS internal frame rate to 30 fps (Settings/Video/FPS) so the speed difference would be obvious (120 vs 30) if OBS re-encodes the camera down to that rate at any point.

    1) First test was the one I asked HT to do above (although I wanted him to use his 330 fps camera). Run OBS at 30 fps (Settings/Video/FPS=30) and my camera at 120 fps. Then dump the replay's memory buffer. It will be at 120 fps if OBS is capturing at the full rate. Otherwise it'll be 30 fps.

    Result: Rate is 30 fps.

    2) Second test was the stop watch test. I recorded my phones digital stop watch. At 120 frames per second there will be 12 frames for every 0.1 second tick over. 30 fps will have 3 frames every 1/10 of a second. I then dumped the replay memory buffer and stepped through it frame by frame counting how many frames per 1/10 of a second tick mark.

    Result: 3 frames every 1/10 of a second tick mark = 30 fps

    3) Third test was only looking at the slow motion replay. I set the playback speed to 1%. At 120 frames per second this means there will be 1.2 frames per second (or 2.5 seconds for three frames). At 30 fps there will be 0.3 frame per second (or 10 seconds for three frames). I then captured a moving object (big arm wave) to make it easy to see when a new frame occurs and measured the time for three frames.

    Result: 10 seconds for three frames = 30 fps

    4) I redid test #1 and #3 with OBS set at 60 fps (you have to exit and restart OBS for the new setting to take effect). Results were 60 fps.


    CONCLUSION:

    My 120 fps camera has been re-encoded to run at the OBS rate. There is no setting to turn this off.

    As I said in earlier post, OBS can run at a maximum of 120 fps (EDIT: Correction - if you use the fractional fps setting it can go higher). So those of us with 120 fps cameras should be OK, just be sure to set OBS to 120 fps. Leaving OBS at the default 30 or 60 fps will result in your 120 fps camera being dumbed down to the lower rate.

    This data suggests there is no point running cameras faster than 120 fps...they will be dumbed down to at least 120 fps or lower depending on the OBS frame rate setting. (EDIT: Correction - the fractional fps setting will allow higher settings. How well it works remains to be seen since OBS screens will be running at that rate as well).

    Anyway, that consumed an hour of my life, I'm not sure it was worth it. Definitely exceeds my interest level but I had started it so thought I should try to finish. I'll leave it to others to confirm or deny these results (or figure out what any of it means if HT's results are correct where he says OBS is working at the faster rates above 120 fps).
    Last edited by FaultyClubs; 02-03-2019, 04:19 AM.

    Leave a comment:


  • FaultyClubs
    commented on 's reply
    Reducing the number of required external programs is definitely a plus. Nice the Replay Source guy is responsive. Not sure why you posted in this comment section though since it has nothing to do with OBS properly recording high speed cameras.

    Still waiting for your results to the test I requested. And exactly how you did your stop watch test.

  • htdumps
    commented on 's reply
    Its my fault for jumping the gun on the tutorial. If I could edit it I would. I just worked with the developer of replay source he was able to a a local buffer so now all we need is audio zone trigger. Ill post an updated tutorial tomorrow when I get the mods to let me edit the thread. But here is the short version.

    1.create new scene
    2.add your two cameras
    3.add two replay source's from your cameras
    4.adjust the timing offsets
    5 look for the new option of local delay set it to 3 or however long you want.
    6, set the trigger for audio son to F5
    7.set the replay source triggers

  • FaultyClubs
    commented on 's reply
    Sorry I didn't see you comment about the stop watch before posting my test. A stop watch can be a good test if done properly. What did you do exactly? It is easy to do the stop watch test wrong.

    How about doing my test also and reporting back.

  • FaultyClubs
    commented on 's reply
    It can be tested. Run OBS at 60 fps (Settings/Video/FPS=60) and your camera at 330 fps. Then dump the replay's memory buffer. It will be at 330 fps if OBS is capturing at the full rate. Otherwise it'll be 60 fps.

  • htdumps
    commented on 's reply
    This got me really interested so I used the stop watch on my phone to record it. It definitely works

  • htdumps
    commented on 's reply
    The camera input on OBS can capture at any fps you want. Obs is limited to outputting streams to 60fps. The replay input grabs a memory buffer of the cameras, then slows them down. I can tell the cameras are capturing at the correct speed because changing the resolution/fps changes the image quality. At 3330 Fps i get little motion blur but a dark image. Its free software so it doesn't hurt to try it out.
    Last edited by htdumps; 02-02-2019, 04:57 AM.

  • FaultyClubs
    commented on 's reply
    So it turns out OBS re-encodes all inputs to a common rate which was set to 60 fps.

    From what I'm seeing it's not possible to run 240 or 330 fps in OBS. The sources may run at those speeds but once inside OBS they are dumbed down to 60 or at most 120 fps.

  • FaultyClubs
    replied
    OK, I think I've got it up and running but it's not preserving the frame rate properly.

    I'm recording with 120 fps camera so 12.5% replay speed should be 15 frames per second and smooth but instead it is jerky.

    The actual time is 8x realtime as expected but the frames per second is half what it should be!

    I must be missing a setting somewhere. Either that or my laptop can't keep up (but OBS isn't complaining).

    What settings are required to have the slow motion utilize the full 120 fps input? What settings you use when doing 240fps of the iphone or the 330fps camera?

    Thanks.

    Leave a comment:


  • htdumps
    commented on 's reply
    All but - manually do frame by frame if I wish. It still requites using audio zone trigger and voice attack until someone can help me out with an auto it script to make it work with just a key press activated by a sound.

    I like it because I can rotate my cameras through OBS, the advanced version of the tutorial should have been the only was to suggest it but I can't edit the post. I also stream my games for lesson purposes, getting kinovea to stream replays was a pain. The capture is done in a memory buffer and is very professional with OBS. Overall the kinovea solution is great with one camera but I have 3 going now and plan to add another, this is not possible with kinovea. I just like tinkering so its more fun in general to use OBS.

    If you want I could teamviwer in and set it all up so you could test. The setup literally takes minutes.

  • FaultyClubs
    replied
    Can obs replace kinovea? If so what makes it better?

    For me the simplest useful functionality would be:

    - automatically trigger recording based on impact sound and capture few seconds before sound and few after (settable)
    - automatically playback the captured video first at 1/4 speed, next at 1/10 speed (twice) and final at full speed
    - manually do frame by frame if I wish
    - automatically repeat for every shot
    - resizable windows
    ​​​​​
    Can it do that?
    ​

    Leave a comment:


  • htdumps
    replied
    Was able to get iPhone working as 240 fps input into OBS. Much better than any webcam so far. Still need a lot of light.
    Last edited by htdumps; 01-31-2019, 07:18 AM.

    Leave a comment:

Working...