moviepy inside DeepLabCut always recognize the rgb video from moseq as 25 fps, while in fact it is 15 fps.
Several ways to fix it.
If we only analyze the DeepLabCut data and don’t care about synchronizing the video with fiber photometry recording etc. We can simply set the fps parameter in Config_NovAna.m file to 25. And it will act as a scaling factor to yield the correct results.
If we do want to synchronize with fiber photometry or depth videos, we can:
Use this code that I updated recently to convert the rgb.mp4 videos to other formats. And then run DeepLabCut on converted videos. https://github.com/Rxie9596/Novelty_analysis/blob/master/Convert_Video.m
You can also try to use other tools such as VLC player to do such conversion, but just make sure that the conversion doesn’t add or drop frames.
If you don’t want to convert the video, we can try to delete those identical rows in the csv file. But I’m not sure whether the number of rows will be the same as original rgb video after deleting those rows.
We can also contact movepy team and send them a sample video to see what’s the problem