Announcement

Collapse
No announcement yet.

automatic swing recording and slow motion playback with kinovea

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

  • automatic swing recording and slow motion playback with kinovea

    I figured I should start a new topic because the other thread has gotten a little long and confusing. Primarily I don't want anyone to think I am using ps3eye cameras for a dual recording setup. i've had a couple of people contact me after purchasing two ps3eyes cameras, asking how to get them working with the dual recording script. while you can get it to work, it is not easy to do. If you are looking to do a 2 camera setup, skip the ps3eye cameras. I would recommend the OV2710 usb cameras from eBay that will do 100fps at 640x480 (does not do 120fps as advertised). There are many lens options and what works for you will depend on how far away you will be placing the cameras. These run at around $40-50.

    If you are looking for a very cheap 1 camera setup the ps3eye is great. Picture quality and frame rate aren't the best and getting 2 to work in kinovea is a pain but they cost less than $10.

    you can run one ps3eye and one OV2710 camera together. i did this for a few months. in this video the ps3eye cam is on the right and the OV2710 is on the left. you can see that the ps3eye is grainy and at 60fps, it is not great but does the job. in addition to a sharper picture and increased fps, another reason I ended up getting two OV2710 cameras is because with one video at 60fps and one at 100fps I couldn't sync the videos up.


    Here is what it looks like using 2 of the OV2710 cameras.


    the way it all works is based around kinovea's live delay feature. if you set the delay to 3 seconds, whatever the cameras see in real time shows up on screen 3 seconds later. if you only want to see your swing once, in real time, you could just run kinovea on a second monitor and set the delay to suit your needs. my autoit script automates the recording and playback process. the sound of impact triggers the script which starts and stops the recordings in kinovea, then opens the recordings in vlc. this means that two 6-7mb files are created every time you hit a ball, so you do need to watch your disk space. it works great for me and a few others here on this forum. before I did this, I took a lot of videos with my phone and while the video quality on any modern phone or tablet is far superior to the OV2710 cameras, it is so much more convenient this way.

    what you need to run a two camera setup is the following:
    a good computer (if it can run tgc smoothly, you should be ok)
    2 cameras (either 1 ps3eye and 1 OV2710 or 2 OV2710's)
    active usb extension cable
    audiozonetrigger https://www.zonetrigger.com/sound-detection/
    microphone
    kinovea version 0.8.15 (other versions will not work)
    vlc media player
    my autoit script

    the software is free except for audiozone trigger with costs $25. for hardware costs, you have 2 cameras at $50 each, a microphone for $10, and a usb active extension for $10, so all in $145.
    Attached Files
    Last edited by inorkuo; 12-11-2017, 06:49 PM.

  • #31
    I keep on getting an error: Can not redeclare a rate constant. pointing to line 7 of the dotnetidentification.au3
    $$MTO_Normal

    If I do get the script to run it will open the VLC window but the files kinovea is writing are only 1kb and not playable. I made a D:\Swing_video directory and the files are written correctly in mp4 format but there essentially empty. Is there something I'm missing on the recording end. If I record in kinovea manually its fine and can be opened with vlc.

    Comment


    • #32
      The newest version of autoit breaks my modified dotnetidentification.au3. I will need to figure out the problem and make it compatible. For now just use the exe file and force your antivirus to exclude the file from scans or use the previous version of autoit to compile the au3 files.

      Comment


      • #33
        Why do we need to run VLC player instead of replaying on kinovea for dual recording? Does it have to do withmaking sure both views are replayed with the same timing?

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          Kinovea maxes out at 2 windows. If you only use 1 camera you can use kinovea for recording and playback. If you use 2 cameras you need to use both kinovea windows to record.

      • #34
        I can get the Kinovea to start and stop recording using the recording.exe (single camera setup) and I see the thumbnail video it creates. I setup a D:/Swing_Videos directory. However, getting it to automatically play back is an issue. Could this be a timing issue in the script or is there anything I need to do in Kinovea to make sure it automatically plays?

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          Do you have one recording window and one playback window open in kinovea to start?

      • #35
        Yes. Both windows are up. For some reason I got it to automatically playback a couple times however loop was enabled on kinovea. I don’t know why it worked those times vs others. Of note I’m running my d:swing_video directory from a thumb drive to match the script.

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          Probably a timing issue then. Kinovea might need a little more time to load the video.

      • #36
        I keep getting the same error that bbjr was getting in post 26... I followed the all the steps multiple times, but can't get rid of this error. Any ideas? Click image for larger version

Name:	Capture2.PNG
Views:	1758
Size:	9.3 KB
ID:	147640

        Comment


        • sittnndukk66
          sittnndukk66 commented
          Editing a comment
          Registered. I'll get on when I get home this evening, and try to reach out to you.

        • Jai
          Jai commented
          Editing a comment
          Any additional info on how to fix this error?

        • inorkuo
          inorkuo commented
          Editing a comment
          Try creating recordings in both capture windows manually before using the script

      • #37
        Hi!! Thanks for all of the great info so far. Just wondering if you're using any software to arrange your video playback windows on top of TGC? Or is that something built into windows one VLC? Thanks!!

        Comment


        • StodgyBarley
          StodgyBarley commented
          Editing a comment
          Thanks very much!! Going to give this a go today!

        • StodgyBarley
          StodgyBarley commented
          Editing a comment
          Just wondering... do people "watch" this broadcast as their main screen while playing? IE Are they streaming/recording/using OBS as their main window while they play to get this clean looking result? Or, is that just for recording purposes? I was wondering if it would really hurt the frame rates. Thanks again everyone!

        • inorkuo
          inorkuo commented
          Editing a comment
          You could watch it with the full screen preview feature in obs but I don't know of anyone actually doing that.

      • #38
        Edit: Ignore me. I found the detail in the read me. Funny that's where it was all along.

        inorkuo, this is great. Thanks for putting this all out here.

        I do have one question. Apologies if you addressed it above somewhere, or on the setup video and I missed it. Can you tell me what each of the parameters mean in the audiozone trigger please? I'm having trouble with timings and, while I will mess with those parameters to try and figure which ones may be start delay, duration, etc., it would be good to know for sure. My recording seems to be starting after the action is over. Currently I have set like this:

        0 3.5 .5 1 1 20 mp4 "C:\Golf\Recordings"

        with a delay of around 3 secs in Kinovea. Any clues or decode of params would be appreciated.
        Last edited by ladfromaus; 03-27-2018, 07:58 PM.

        Comment


        • #39
          I get the same error as others have posted above, has anyone determined the cause and the fix?


          Comment


          • #40
            Did anybody figure out what this is?
            Attached Files

            Comment


            • #41
              attached is an updated script that should work a little better. i renamed the executable file from recording_dual.exe to recording_dual dot exe in hopes that virus scanners will let it through. once downloaded and extracted, just need to rename it back to .exe. please read the included readme.txt for how to use the script.
              Attached Files

              Comment


              • #42
                I am considering this dual camera set up with Kinovea/OV2710 as well but a few questions/concerns.
                - Will these cameras work with FSX 2018 if/when their multiple monitor set up is working? I would love to have FSX range on one screen, ball data on another, club data on another, and then a split screen with down the line and face on.
                - How visible is the club position/face orientation in slow motion with this set up. Difficult to tell from the videos but can you see where the face is pointing from down the line at the top of the swing?
                How bad is the shaft blur?
                This will be used indoors.

                Thanks

                Comment


                • #43
                  With the cameras a global shutter would be best if you want to see the club like at Golftec. Even the cams at Golftec are relatively old with max of 60 fps. I believe the OV2710 has a rolling shutter like the PS eye camera, so I don't know how much better it will be then the PS eye after upgrading the PS eye lens. I upgraded the lens on the PS eye with significant improvement but the club still disappears or distorts significantly. The Point Grey cameras that come with the protee like many machine vision cameras have a global shutter but doesn't seem to work with Kinovea. Old firewire machine vision cameras are pretty cheap on eBay; I just got a firewire PCI card and Ptgrey Flea3 camera which shows a much better picture vs the PS eye. It also has a much larger 1/2" sensor (vs the PS eye 1/4" sensor) but I can't get it to work with kinovea. I also tried using my old Canon mini HDV cam via firewire and it looks better as well but is limited to 30 fps in Kinovea. Has anyone had any luck with any machine vision cameras on Kinovea? I know you can buy a new USB 3.0 MV camera for ~$500 but with so many older USB 2 and firewire versions available for cheap on eBay I was looking for an alternative.

                  Comment


                  • #44
                    I have Cat5 installed in wall from PC location to where the webcam(s) will be installed. Do you know whether it will be possible to use USB to RJ45 connectors like this: https://www.miniinthebox.com/p/usb-2...l#have_reviews
                    to connect the OV2710 camera to the PC using an adapter and then USB cable at each end - one to the device and one to the PC?

                    Comment


                    • #45
                      Are you using a specific OV2710 camera on eBay? There are many available. Any recommendation?

                      Comment


                      • StodgyBarley
                        StodgyBarley commented
                        Editing a comment
                        I’m also wondering the same thing. I have a lot of room for down the line(8 ft) but only 3.5 to 4 for face on.
                    Working...
                    X