Announcement

Collapse

TGC Tour - Congratulations!

Congrats to @ArborMan (NET) and @Marc Andre (GROSS) winning the TGC 1 2020 SPRING TOUR - Sony Open in Hawaii!

Join this weeks TGC 1 2020 SPRING TOUR - The American Express with 2 rounds at PGA West (Palmer) Saturday : https://golfsimulatorforum.com/forum...erican-express
See more
See less

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.
    https://youtu.be/d548aRYh5YY

    Here is what it looks like using 2 of the OV2710 cameras.
    https://youtu.be/T5yy5NFuB4Y

    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.

  • Regarding the instructions of Kinovea 0.9.1 - setup I would like to make some comments due to the behavior that I found during testing the new version:
    1. Options/Preferences/Capture/General
      Setting the „Display framerate (fps)“ will NOT change the video acquisition rate. It exclusively influences the refresh-rate of the display (not the recorded video). This value normally should not be higher than 25. To reduce CPU-load it can set to i.e. 5 or even 1.
      Setting the video acquisition frame rate can only be done clicking the „configure camera“ - wrench-icon (bottom left for left camera) and changing the value in the configuration-menu. The resulting framerate that the camera will deliver can be found on the title of the capture-window under „Signal: XX fps“
    2. Options/Preferences/Capture/Memory
      If you allocate ALL available memory to Kinovea, there will be no more memory for the system (all other programs) to work. It may cause a crash of the system. Especially if you are using multiple Kinovea-instances: 1 for recording (it may take ALL memory), 1 for replay (no memory left).
      This memory value is exclusively necessary for the ring-buffer to store the acquired video frames. The necessary value to set here depends on the format and length of video you are recording. To find an adequate value it is the best, to record a video of the desired length using the actual settings and then look on the size of the video plus some „safe“ MB. If the video is i.e. 80MB, a value of 150MB should be far enough. If AVI-files are recorded, 1000MB may be necessary due to the large files that are created. If you use uncompressed files (MKV/AVI), a fast SSD is mandatory.
    3. Using the function „open replay folder observer“
      During testing this function, I found that it may be critical to a crash of Kinovea. It is more save to use 1 Kinovea with 1 Playback screen for EACH video that is created. Using this configuration, the system works very stable.
    4. Furthermore, I found that using 1 Kinovea for 1 recording camera is better than using 2 cameras inside 1 Kinovea. The noise-trigger can be used on multiple Kinovea at the same time, so it is possible to create the trigger on multiple Kinovea that starts at the same moment. Testing has shown a delay between 2 Kinovea of only some milliseconds.
      The reason it it more stable may be that the new version uses separate „threads“ on each function that can be distributed to separate cores of the CPU, working independently at the same time.
    5. There is a new function in Kinovea that helps to differentiate each running instance. If Kinovea is called using command line parameters, a specified environment can be used.
      The format is: path…\kinovea.exe -name CONFIGNAME
      If kinovea starts using this command-line, it will use the configuration of CONFIGNAME
      If Kinovea is recalled later using this command, it will reload the same configuration (Camera settings and ALL Options).

      An options to load 2 Kinovea Instances using 1 Camera each and 2 Kinovea instances using „replay folders“ each would be to load the following sequence:
      ...\Kinovea.exe -name Cam1
      ...\Kinovea.exe -name Cam2
      ...\Kinovea.exe -name Replay1
      ...\Kinovea.exe -name Replay2
      You could create 4 Links on the desktop to achieve this. After calling each, select the appropriate camera to Cam1 and Cam2 and select the replay folders to Replay1 and Replay2. In the Kinovea-Title, you could see the related setting in brackets after „Kinovea“.

      More advanced you could add the command-line option -workspace WORKSPACE
      for the Kinovea-instances doing the replay. Then, the replay function is recalled directly after startup. However, I haven’t tested it so far

    Comment


    • Thanks stell123 for the advise. Would the new kinovea be ok for the non tech savy or is the advise still to go third party? I also found a thread that was using obs with voice attack. Would one be easier for me or would I need to know computers well to make either work? Thanks

      Comment


      • wzjy47
        wzjy47 commented
        Editing a comment
        Hi Jdborg, I'm familiar with computers, but by no means an expert or on the level of a lot of the guys on this forum and I found that the newest version of Kinovea to be the best option. I've been using it for a couple of weeks without any issues. If you go back to post 104, I put together the steps I initially used to set it up. Please also read post 106 from Reiner. He has some additional recommendations on some of the settings. The only thing I haven't figured out yet, is how to get Kinovea to remember the settings so you don't have to set it up each time you open it. Reiner had a suggestion on how to do that on in post 106, step 5 but I haven't gotten it work yet. Another benefit of Kinovea is that it has the audio trigger built in now, so you don't have to buy Voice Attack...Good luck!

    • Originally posted by Reiner View Post
      Regarding the instructions of Kinovea 0.9.1 - setup I would like to make some comments due to the behavior that I found during testing the new version:
      1. Options/Preferences/Capture/General
        Setting the „Display framerate (fps)“ will NOT change the video acquisition rate. It exclusively influences the refresh-rate of the display (not the recorded video). This value normally should not be higher than 25. To reduce CPU-load it can set to i.e. 5 or even 1.
        Setting the video acquisition frame rate can only be done clicking the „configure camera“ - wrench-icon (bottom left for left camera) and changing the value in the configuration-menu. The resulting framerate that the camera will deliver can be found on the title of the capture-window under „Signal: XX fps“
      2. Options/Preferences/Capture/Memory
        If you allocate ALL available memory to Kinovea, there will be no more memory for the system (all other programs) to work. It may cause a crash of the system. Especially if you are using multiple Kinovea-instances: 1 for recording (it may take ALL memory), 1 for replay (no memory left).
        This memory value is exclusively necessary for the ring-buffer to store the acquired video frames. The necessary value to set here depends on the format and length of video you are recording. To find an adequate value it is the best, to record a video of the desired length using the actual settings and then look on the size of the video plus some „safe“ MB. If the video is i.e. 80MB, a value of 150MB should be far enough. If AVI-files are recorded, 1000MB may be necessary due to the large files that are created. If you use uncompressed files (MKV/AVI), a fast SSD is mandatory.
      3. Using the function „open replay folder observer“
        During testing this function, I found that it may be critical to a crash of Kinovea. It is more save to use 1 Kinovea with 1 Playback screen for EACH video that is created. Using this configuration, the system works very stable.
      4. Furthermore, I found that using 1 Kinovea for 1 recording camera is better than using 2 cameras inside 1 Kinovea. The noise-trigger can be used on multiple Kinovea at the same time, so it is possible to create the trigger on multiple Kinovea that starts at the same moment. Testing has shown a delay between 2 Kinovea of only some milliseconds.
        The reason it it more stable may be that the new version uses separate „threads“ on each function that can be distributed to separate cores of the CPU, working independently at the same time.
      5. There is a new function in Kinovea that helps to differentiate each running instance. If Kinovea is called using command line parameters, a specified environment can be used.
        The format is: path…\kinovea.exe -name CONFIGNAME
        If kinovea starts using this command-line, it will use the configuration of CONFIGNAME
        If Kinovea is recalled later using this command, it will reload the same configuration (Camera settings and ALL Options).

        An options to load 2 Kinovea Instances using 1 Camera each and 2 Kinovea instances using „replay folders“ each would be to load the following sequence:
        ...\Kinovea.exe -name Cam1
        ...\Kinovea.exe -name Cam2
        ...\Kinovea.exe -name Replay1
        ...\Kinovea.exe -name Replay2
        You could create 4 Links on the desktop to achieve this. After calling each, select the appropriate camera to Cam1 and Cam2 and select the replay folders to Replay1 and Replay2. In the Kinovea-Title, you could see the related setting in brackets after „Kinovea“.

        More advanced you could add the command-line option -workspace WORKSPACE
        for the Kinovea-instances doing the replay. Then, the replay function is recalled directly after startup. However, I haven’t tested it so far
      Hi Reiner, Thanks for the feedback! When I get a chance, I'll update the setup instructions...I tried the settings above and didn't have any issues. I didn't have any issues with what was in the setup instructions either for what its worth...I was not able to get step 5 to work (I'm guessing its my lack of understanding with respect to command line parameters), but could you possibly go into a little more detail? Here's what I did:

      -Created 4 copies of the Kinovea.exe file (kinovea.exe - Cam1, kinovea.ex. - Cam2...)
      -Created a shortcut on my desktop for each individual .exe file above

      When I go to open these instance again, they all startup from the beginning. They do not appear to be saving the settings (please see attached screen shots).

      Another question I do have with regards to this setup working on recalling the previous settings…With the file naming used, it appears to create a new folder every day, so how will the Replay Manager know to go to the next days folder or will that have to be changed every day? Do I just need to change the Sub Directory path?
      Thanks again for your help!
      Attached Files

      Comment


      • joan
        joan commented
        Editing a comment
        To pass command line arguments from the shortcut you need to right click the shortcut, go to Properties and edit the "Target" field.
        You will use the -name argument, so you need to add -name <NAME> at the end fo the target. Replace <NAME> with what you want but keep the "-name" flag in there.

        The workspace feature (to reload the screens state when running the instance) is a work in progress and just started, so at the moment it's very limited. It only works with playback screens, not cameras, and it doesn't support dynamic paths, so you won't be able to make it automatically point to the recording folder day after day.

    • Hi,
      Joan was faster
      However, you can find a more detailed instruction here that may help.

      using command line-parameters means, that you ALWAYS use the SAME Kinovea.exe but parse some information to the program.
      Do NOT create a new exe file. It is always the same EXE-file.

      Let's say your username is MILLER and Kinovea is installed in the Directory KINOVEA under your User-Account.
      Open Filemanager and navigate to your Kinovea.exe - file.
      Start navigating on c:\users...
      (eventually you have to tell your Filemanager in options to show all "hidden" files to find the directory)

      (by the way it makes things much easier if you have a separate drive letter, i.e. d:, and install Kinovea from the ZIP-File in
      d:\Kinovea, store your videos in d:\swing_videos1, d:\swing_videos2 etc.. If you have only one drive letter installed on your system,
      you might also use c:\Kinovea etc.)


      if Kinovea is installed under you username the path to Kinovea might be like this:
      c:\users\Miller\Kinovea\Kinovea.exe

      to create a LINK on the Desktop to that Kinovea.exe you can:

      Press ALT and Drag/Drop the kinovea.exe file to the desktop.
      A Link will be created on the desktop.
      Rename the link to i.e. Kinovea MASTER.

      Right click on this link and select properties.
      in the Target-Field you will find the Kinovea.exe file including the path.
      (for example c:\users\Miller\Kinovea\Kinovea.exe)

      Click in this field and go to the right end using the cursor.
      Append a space char and type -name Master
      Be shure that there is NO " (quotation mark) somewhere !!
      It the target field it should look like this:
      c:\users\Miller\Kinovea\Kinovea.exe -name Master

      Save the changes.

      If you now click this Link, Kinovea will start up and shows:
      Kinovea [Master]
      in the title bar.

      Select i.e. "one capture screen"
      Drag/Drop a camera to the record window
      Do some settings in Options/Preferences (i.e. Video directory, videoname etc.)
      Close Kinovea

      Recall it using the link you have created and you will see that all Options you have set at first call are still there.
      It also stores the last settings of the camera you selected, but does NOT store the assignment of a specific camera to a record panel.

      Repeat the LINK procedure for every instance of Kinovea you would like to create, giving different name.

      The "Master" above only is an example.
      Every Name can be used instead of MASTER (i.e. CAM1 or CAM2 etc.), but I would use allowed literals that can be used in filenames (a-z,A-Z,_) but no spaces.
      Also do NOT Use [,],-,.,{,},%,&,$,",! (maybe not a complete list).


      Comment


      • wzjy47
        wzjy47 commented
        Editing a comment
        Thanks! Unfortunately, I still couldn't get it to work...When I try to remove the "" around the path int he Target field (Properties of the shortcut created), it give me an error "The name "C:\Program Files\Kinovea\Kinovea.exe -name CAM1 specified in the target box is not valid...".When I add the "" back around the path ("C:\Program Files\Kinovea\Kinovea.exe" -name CAM1), it lets me save it and then when I open Kinovea using the link, I see Kinovea [CAM1] in the upper left corner of the screen. I tried to create 1 capture instance, changed the settings, closed the program and when I reopened it, none of the settings were saved. The "Kinovea [CAM1]" was still in the upper left corner, but everything else was back to the default settings. I tried to create a 3rd shortcut, as a playback instance. It didn't save its settings either. I named it REPLAY1, but the upper left corner said "Kinovea [3]"...I'm not sure where that came from...Thanks again for your help on this!
        Last edited by wzjy47; 01-16-2020, 12:02 AM.

    • Regarding your question .pdf

      To my taste I leave the "Sub Directory" field empty. It may be easier to find your videos.
      Fortunately, Kinovea numbers each new video file that is created.
      If you use the namespace function as described, Kinovea will store the last video-filename, so there is only small danger of having filename conflicts.

      Comment

      Working...
      X