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.

  • #61
    Originally posted by inorkuo View Post
    here is the script updated for kinovea experimental version 8.26.
    Wow! thanks for all your hard work man!!!

    Comment


    • #62
      I got the following error message. Also vlc doesnt even react. What do I need to change?

      Comment


      • #63

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          is kinovea creating recordings? check that kinovea is set to record to "D:\Swing_Videos". also make sure you are using the 32bit version of vlc. it looks like you are missing a quotation mark for the line in audio zone trigger but i'm not sure that it makes a difference.

      • #64
        This looks interesting, I have an old ps3 eye camera, do you need a driver to make it work on a pc running windows 10? If so, where do you get it? Thanks!

        Comment


      • #65
        Is there any way to have the script work using a C: Drive ?

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          Yes you can tell the script where your recording directory is by passing it as a parameter

      • #66
        Thanks inorko for all your work...This is awesome...I just installed all the software and started the setup in Kinovea (0.8.15), but can not get Kinovea to recognize the second camera. I have two OV2710's, Windows 10. The computer and Kinovea recognize both cameras, but I can't get a picture in the second window. Down at the bottom of Kinovea window it show's the camera and:

        "HD USB Camera - 640x480 @120 fps (0.00 fps, Buffer 0%)"

        I've switched cameras, computer USB ports only, with USB hub, without hub and get the same the results. It will allow me to use the computers Webcam in the second window, but not the second USB camera. Does anyone have any thoughts on what I might be doing wrong?

        Thanks in advance for any help!

        Comment


        • StodgyBarley
          StodgyBarley commented
          Editing a comment
          You have to manually start the second camera.... not sure if you tried that or not? There's an icon there to start the second one at the bottom left of the second window. I had a similar issue for a bit until discovering the icon.

        • wzjy47
          wzjy47 commented
          Editing a comment
          Thanks for your quick reply but I don't see anything that resembles a "start" icon? I clicked on the "setup" icon and selected the second HD USB Camera, but nothing happens. When I select the integrated webcam, that works and shows a picture in the second window.

        • StodgyBarley
          StodgyBarley commented
          Editing a comment
          The button is at the bottom left underneath the new window. It's a camera with a gears icon on it.

      • #67
        Theres a way you get it to work.
        First unplug one of them
        2. add one camera on the record video whit one camera.
        3 plug in the second camera
        4 switch to dual recording
        5 add the second camera on the one side Thats black
        that should get both up.

        it was a couple of months since i did this so i hope i remember correct

        Comment


        • wzjy47
          wzjy47 commented
          Editing a comment
          Thanks for the reply...I did try this and no luck...

      • #68
        wzjy47 Click image for larger version

Name:	Screen Shot 2018-10-23 at 5.31.46 AM.png
Views:	753
Size:	15.3 KB
ID:	168504 Here you go. That starts it up and then you choose the new camera from the pop up window.

        Comment


        • #69
          Originally posted by StodgyBarley View Post
          wzjy47 Click image for larger version

Name:	Screen Shot 2018-10-23 at 5.31.46 AM.png
Views:	753
Size:	15.3 KB
ID:	168504 Here you go. That starts it up and then you choose the new camera from the pop up window.
          Thanks...That’s what I had tried...It shows up in the bottom of the screen with the buffering at 0 and no picture in the window...When I select the computers webcam, that does work...

          Comment


          • StodgyBarley
            StodgyBarley commented
            Editing a comment
            Bummer... any chance you're running too many USB devices off of one port and it's under-powered? I have that happen from time to time with my PS3 Eye camera for DTL view. I have unplugged a few items from a powered hub and that has solved the trick a few times, although not always. I do get a picture normally and it can be choppy. I am going to try an active USB repeated cable though with my second camera even though it runs through powered USB hub. I have quite a distance between my camera and my desktop... like 40 feet of USB cable and then the powered adapter tho.

          • wzjy47
            wzjy47 commented
            Editing a comment
            Its possible, but I don't think that's the issue...I tried it on a different desktop and had the same problem...I'm not sure I tried the shutdown procedure mentioned above though (I'll have to give that a try at some point)...On the other desktop, the standard webcam Windows 10 software saw both cameras, so I believe they're functioning correctly...

          • youngngo
            youngngo commented
            Editing a comment
            Did you ever resolve the issue and get the 2nd camera to show up. I have 2 OV2710 attached to a Surface Book 2 directly to 2 USB port and the 2nd one does not registered/recognized!

        • #70
          Anyone see any issues with these cameras and the setup described in this thread?
          https://www.theimagingsource.com/pro...or/dfk23uv024/
          https://www.theimagingsource.com/pro...me/dmk33ux252/

          Comment


          • inorkuo
            inorkuo commented
            Editing a comment
            i don't know anything about those cameras but you could post them in the kinovea forum and joan, the developer ,should be able to tell you if they will work.
            Last edited by inorkuo; 11-05-2018, 03:33 PM.

        • #71
          inorkuo any chance that you could make a script for the new version of kinovea for single camera recording and playback in kinovea?

          Comment


          • #72
            i can but i've discovered that the way the experimental version of works is not good for swing analysis. the live delay feature allows you to allocate more memory to get more delay but it drops frames. so even if your camera is capable of 120fps, you might only see 50 frames.

            Comment


            • #73
              Didn't know that. Thank man. I wish I can buy you a beer.

              Comment


              • FaultyClubs
                FaultyClubs commented
                Editing a comment
                It's not just the window, there doesn't seem to be room for the follow-through without hitting the screen. What are the room dimensions? I'm wondering if you'd be better off hitting towards the other wall?

              • htdumps
                htdumps commented
                Editing a comment
                Room is 13'x12' super tight.

              • aja
                aja commented
                Editing a comment
                Camera works well, but yeah the room dimensions seem to be affecting the swing. Follow through is pretty truncated, the arms aren't "flowing" through at the end of the swing.

            • #74
              Hello - New to the thread here. I've tried to set up Inorkuo's script, and think I've followed all of the necessary steps. However, when I try to run it I get the following error message regarding the configuration of the recording_dual_main script.

              Click image for larger version

Name:	error_msg.PNG
Views:	897
Size:	31.2 KB
ID:	176490

              I'd appreciate any advice/help to get this working. As for my system, I am running a Windows 10, 64bit PC with a two monitor display. I have two Logitech Brio webcams configured correctly in the stable release of Kinovea (one at 120fps, the other at 90fps for some unknown reason). Kinovea has not problem with manually capturing from both simultaneously.

              I just finished building my simulator, using Skytrak (and running TGC without difficulty). I'm pretty happy with everything, and this is the last step in getting it up an running the way I'd like (at least for now).

              Click image for larger version

Name:	IMG_0571.jpg
Views:	899
Size:	102.9 KB
ID:	176491 Click image for larger version

Name:	IMG_0570.jpg
Views:	937
Size:	80.3 KB
ID:	176492

              Thanks so much for any advice on how to get the audio triggered, dual camera, capture script working.

              - Fred R.

              Comment


              • inorkuo
                inorkuo commented
                Editing a comment
                Are you running the exe or the au3 file?

              • FredR
                FredR commented
                Editing a comment
                Hi - I am running the au3 file. If I try to execute the .exe file, I get a different error: "Line 13200 Error: Can not redeclare a constant." Thanks so much for your help. - Fred R

              • FredR
                FredR commented
                Editing a comment
                Thanks so much, inorkuo! You were incredibly helpful in getting my audio-triggered dual camera capture working. I really appreciate it.

            • #75
              Hi all, I am struggling getting this to work. I have the cameras hooked up and functioning, 32 bit version of VLC, proper version of Kinova. When the script triggers I see VLC close, Kinova gets the focus and a couple of seconds go by and I get the error in the attached jpeg. I have included by parameters on the screen shot. Thanks in advance for any help!

              Sean

              Edit - better pictures added, I am running widows 10,
              Last edited by NovaGolfer; 01-19-2019, 01:39 AM.

              Comment


              • inorkuo
                inorkuo commented
                Editing a comment
                In kinovea, manually create a video recording with each recording window so that your file names have hyphens, then try again.

              • NovaGolfer
                NovaGolfer commented
                Editing a comment
                That did the trick! Thanks for your help and for putting this together and sharing with everyone!!

              • Skillz
                Skillz commented
                Editing a comment
                I am having a similar problem. VLC is closing once the script is triggered by me hitting the ball.

                The rest of the script is working perfectly. The video records and saves in the correct folder, and I can manually replay the video on VLC. But would like the automatic popup to replay the video.

                Any ideas on why the script would close VLC and not replay the video automatically?

                Also, I am running just one camera currently not sure if that would impact it.
            Working...
            X