PixelSorting
PixelSorting copied to clipboard
Extra frames added
When you select a video to be sorted the software adds extra frames to it.
On a video of 25 seconds and 22 decimals, the resulting output added 1,78 seconds to it.
Now the problem can be easily fixed with any modern video software that recalibrates the speed of a clip to match a specific time but it is quite annoying as of right now.
Here I'll provide the clip I used in case you want to test it by yourself.
I think the issue is due to frames per second being rounded when initializing the cv::VideoWriter.
So there should be the same number of frames in the input and output video files, it's just that they are being played slightly slower or faster depending on how it rounded the provided fps in the output video file.
I found this potential fix on StackOverflow and will try this out: https://stackoverflow.com/questions/49654051/python-opencv-videowriter-fps-rounding
Thanks for reporting this.
It seems that this is caused by the underlying libraries used by OpenCV depending on the platform. So I have found this issue does not occur in MacOS but does in Windows. And I haven't been able to find a solution in Windows yet.