Open python012 opened 1 year ago
To anyone who care about this issue, I tried to make some fix to solve it, see the repo I forked and updated -> https://github.com/python012/screen-recorder/tree/master and the TestDemo, with this version the screen video length would be the same as it recorded, test passed on Windows 10, I think it may not be a maturing solution, it's why I didn't raise PR
Hi, I find that in Windows 10(I didn't try other OS), the VideoRecord is not capturing enough frames, I added some debug code and found that, looks
Thread.sleep(VideoRecorderConfiguration.getCaptureInterval())
in VideoRecord doesn't work as expected.My test code:
It generated a video that only has 1 second. I add a few debug code in VideoRecord class like below, to make it show the real interval between each capturing:
Then I ran the test, and see the logs
The real interval is not 50 ms, but is 150~200 ms, and it only captured 28 frames in 5 seconds, it is supposed to take 20 * 5 = 100 frames because I set the interval to 50.
My environment