Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

How to calculate video frame number from VoTT exported image timestamp #1041

Open
haimat opened this issue Feb 11, 2021 · 1 comment
Open

Comments

@haimat
Copy link

haimat commented Feb 11, 2021

When I export tagged frames from a video via VoTT, I get a list of all exported images in a CSV file. Each of these images contain their timestamp from within the video in their file names. For example:

video.mp4#t=260.433333.jpg

Now I want to calculate which frame this image is in the video. So in this example when this video.mp4 has 60 FPS, I would assume that I can simply calculate that frame number via

timestmap * fps = int(260.433333 * 60) = 15626

Thus I would assume that timestamp 260.433333 corresponds to frame number 15626 in the video. As it turned out, however, this is close, but not exactly correct. After some manual tweaking I found out the correct frame number is 15610. The further I go in video time, the greater this difference becomes.

Now I am wondering: Where does this difference of 16 frames come from, and how do I correctly calculate the frame number from these timestamps?

@haimat
Copy link
Author

haimat commented Feb 23, 2021

Hello there, any ideas on this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant