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.

  • #2
    Inor - can you actually walk through the steps to get the dual playback set up - I kind of gave up but have all the required equipment / software. I.e. the zip files how do you take those once you've downloaded and get them to work the way you've set them up for yourself. Maybe it's easier to just talk to you directly to walk me through it someday? Appreciate the help!

    Comment


    • #3
      pm me and we'll get it working. I'll do a how to soon.

      Comment


      • #4
        Question on lens selection for swing recording cameras.... based on postings in this forum (and this particular post) I am going to set up two OV2710 for recording. my question is on lens selection. My front facing camera is 4 feet from ball. The down the line camera will be 8 feet behind the ball. What are the recommended lens sizing for the cameras? (I am not a photography expert). do these cameras have some zoom capability or are you stuck with a fixed configuration?

        Thank you to those sharing their experience here. It saves guys like me lots of time (and frustration). Cheers.

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          2.1mm would probably work

        • Steves55347
          Steves55347 commented
          Editing a comment
          For both the 4 ft range and 8 ft range?

        • inorkuo
          inorkuo commented
          Editing a comment
          Sorry steve the 2.1mm will work for 8ft. I'm not sure what you can do at 4ft without cutting something off. That's prettty close.

      • #5
        I have made the AutoIt script to overwrite the recording file names (in Kinovea) for both web cams. In my case "front" and "side". VLC that is playing front.mkv and side.mkv picks up every new recording to play back the last one.
        In this setup your hdd or ssd doesn't get piled up with recordings.

        Comment


        • inorkuo
          inorkuo commented
          Editing a comment
          nice. I did think of doing that initially but I wanted to be able to go back and save videos when I'm swinging it well. that way when I lose my swing I can go back and compare to see what I screwed up. I have run out of disk space before when I didn't stay on top of keeping it clean so definitely a good idea. you should post your revision for anyone else who may want to use it.

        • Michael Baas Becking
          Michael Baas Becking commented
          Editing a comment
          See for some explanation my post underneath (dated 29th of December 2017)

      • #6
        @Steves55347: I’ll get back with some images of my front and backcamera. My front camera is 4 feet away and my back camera 6 feet away. I don’t need/use zoom. I have Logitec cams. Can’t do it right now because I am installing a GTX 1070ti in my desktop. I am waiting for a 24pin to 10pin connector to arrive by post so that I can connect my new power supply.

        Comment


        • #7
          @Steves55347:

          With two Logitec cams on 800x600 setting (not zooming) playback recording looks like underneath. Front camera is 4 feet away and back camera is 6 feet away. They are not OV2710 cameras, but I hope this gives you some idea.

           
          Last edited by Michael Baas Becking; 12-28-2017, 01:03 AM.

          Comment


          • Jai
            Jai commented
            Editing a comment
            I have a couple Logitech cameras. I'm going to try this setup. Thanks

        • #8
          Micheal, do you have high-end logitech cams? I have a decent C920 webcam with a specified max frame rate of 30fps? Will 30fps work? Also, can you use the microphone on the logitech cam to trigger the event?

          Comment


          • #9
            Front facing cam is a logitec 905 recording at 30fps. Side cam is a Logitec BRIO that is supposed to do high fps but I can only get it to work at 30 fps in Kinovea for some reason. And then I have a Logitec 922 for live feed. I think you will be fine with your 920.

            You can use the microphone on the logitec cam to trigger the event. It does however work better I think if you have a microphone close to (or behind) your screen to register the sound of the impact of the ball on the screen.

            Comment


            • #10
              here is the how to video to get you up and running

              Comment


              • davidd
                davidd commented
                Editing a comment
                Hi - this discussion is great. Thanks Inorkuo! I have followed the video and advice here but am struggling a bit. Will the autoit script work on a 64bit pc? is this my issue? thanks david

              • inorkuo
                inorkuo commented
                Editing a comment
                it works fine on windows 10 64bit. However, you will need the 32bit version of VLC.

              • davidd
                davidd commented
                Editing a comment
                I am now using the 32bit version of VLC but VLC is giving me the following message "Unidentified codec:
                VLC could not identify the audio or video codec"

                Has anyone encountered this? Help much appreciated.

            • #11
              Inorkuo, thanks for all the effort you have put into this! I almost have my setup complete.

              Micheal, thanks for the advice as well.

              Comment


              • #12
                Inorkuo, you chat in your video about how the kineova software needs to be a particular version in order for everything to work? If you have the time, are you able to upload this software with a link to the forum or point to how we can get it.

                I'm just worried we've missed the boat if kineova website only has the newer versions available.

                Thanks

                Comment


                • inorkuo
                  inorkuo commented
                  Editing a comment
                  Yep like BriHeb said, it's the current stable version. I should have said that the newer experimental version won't work. Also it is likely that when the next stable version comes out the live delay feature won't be there, according to posts I've read in the kinovea forum.

              • #13
                Kinovea is a video player for sport analysis


                It's the current Main Stable version.

                Comment


                • #14
                  As requested here is some AutoIT input on using the same file names for recording in Kinovea. It will prevent you hdd or ssd to get piled up with files. You won't be able to look back some previous recording obviously.

                  I didn't revise the script of Inorkuo so I can't send revised scrips. I build them from scratch so I'll focus on the part that overwrites filename.

                  My script is in terms of screen resolution specific for my situation, so you'll need to change x,y positions. For the sake of simplicity I am giving some input with regard to one recording, but you'll have to do it twice when using two webcams recording.

                  --------------------------

                  MouseClick("main", 1788, 594, 1)
                  ; This is to set the cursor in the field where recording file name is defaulted

                  Send("^a", 0)
                  ProcessWait("Kinovea.exe", 5)
                  ; This is control-a command to select the whole filename

                  Send("front", 1)
                  ProcessWait("Kinovea.exe", 5)
                  ; This is to fill in the file name "front". I am using mkv in Kinovea so the result will be a file front.mkv

                  MouseClick("main", 1681, 509, 1)
                  ProcessWait("Kinovea.exe", 5)
                  ; This is to click on the record button. Since I am overwriting an already existing file front.mkv this will result in a windows warning pop-up 'file already exist'.

                  ControlClick("Overschrijf bestand", "", "[CLASS:Button; INSTANCE:1]")
                  ProcessWait("Kinovea.exe", 5)
                  ;This is to click ok on the warning pop-up. Please be aware that I am Dutch so "Overschrijf bestand" is probably something like "Overwrite file" in the English windows version.

                  ----------------

                  After this you will have to do a Sleep(x) for waiting a few seconds and then again have the script hit the record button to stop the recording.

                  Hope this is of some help.



                  Last edited by Michael Baas Becking; 12-29-2017, 10:37 AM.

                  Comment


                  • #15
                    there have been a few questions that have come up a few times that I did not cover in the how to video:

                    1. do not run the script with the window focus on kinovea. if you see the vlc play back windows pop up for a second and then disappear it is because the script is returning focus to the original window. if the original window is kinovea, it will block the playback windows when the script pulls it back up in front.

                    2. dual_recording.exe is for those who run two screens. this script positions the playback windows where ever the kinovea window is. dual_recording_main.exe will put the playback windows onto your primary display. this version is good for those who run only one screen. you would set up kinovea the same way with two capture windows with around a 3-3.5 second delay but you would then want to drag kinovea off of the screen as far as possible so that it doesn't pop up over top of the game window. after a set time, the script will put the vlc playback windows on top of the game window. then after a set time, it will return focus to the game window. there is a readme in the zip file that explains how to get the timing the way you like it.

                    Comment

                    Working...
                    X