1

Hi,

I am using a python script to convert video annotations from an excel sheet into a .kva file which I then share with other coaches and players. They import the .kva file and they see the color coded text and timestamps in Kinovea.

My issue is that when I calculate TimeStamp for each KeyFrame in .kva file I need to use AverageTimeStampsPerFrame, FrameRate and actual time in seconds. I can get FrameRate programatically but AverageTimeStampsPerFrame varies for each video file I use.

Is there a way to know how it's being calculated so I could fully automate my workflow?

I've looked at .json file but that file doesn't support the Labels, Text and Color.

Appreciate any help!

2

Do I understand correctly that you are *producing* new kva files out of excel, not the other way around?

The mapping from timestamps to frames changes with each video, it's decided by the encoder. But there is some logic in the kva importer to adapt files created from one video when loaded into another with different frame rate. Can you clarify your process a bit more, how is the excel sheet created, is it referencing times or frames, do you do any annotations in Kinovea or is it another program that creates this excel sheet that you want to import, etc.

3

Yes, I am using information in the spreadsheet and converting that into a new kva file.

I have a column for video time in min:ss which I convert to kva Timestamp using the formula of time_in_sec * frames_per_sec * AverageTimeStampsPerFrame.

Formula works well, but I need to figure out AverageTimeStampsPerFrame manually. FPS I can get using ffmpeg from python side. Is there any information in the video file itself I could use to figure out what that AverageTimeStampsPerFrame should be?

Once I create that initial kva file with annotations, I import it to Kinovea and use it as a starting point for future analysis.