-
I ran into the error of being unable to load the second to last frame of entire current video (Discussion #1895), and used the reencoding method to make a copy of the video. However, when I try to replace the video in my sleap file (with the same labels), the labels are off because the new version of the video has 9-11 extra frames for some reason. Is there any way to fix this? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Hi @jannhan, The first thing that comes to mind is maybe the fps of the original and encoded differ? We can check the frame rate of the video(s) with:
. If they differ, I would suggest trying to re-encode specifying the rate:
. Let us know if that helps any or if we should keep searching for a solution. Some additional information for us that would be helpful in debugging is the output of:
for both the original and encoded videos. Thanks, P.S. The other take on this problem is that we can provide a script to shift labels (assuming a constant offset) if that is acceptable. |
Beta Was this translation helpful? Give feedback.
Hi @jannhan,
I created this script that will shift the labels for you.
You will need to download and unzip.
Modify the
if __name__ == "__main__"
section of the file where I left a fewTODO
s: