jackburton79 / bescreencapture

BeScreenCapture - Screen Capture software for Haiku
BSD 3-Clause "New" or "Revised" License
7 stars 10 forks source link

Wrong FPS recorded #42

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi!

I was trying to record something on Haiku R1/Beta2 but I can't get it to record more than 1-2FPS. This is on a relatively fast machine (Ryzen 16 threads).

Does BeScreenCapture adapt FPS depending on how fast it can store the files?

I also noticed that both capture and mpeg encoding is only 1 thread. Can that be improved?

Thanks!

jackburton79 commented 4 years ago

Hi, When recording, BeScreenCapture uses the frame rate set in the application options (default 20FPS, if I remember correctly). When encoding, it calculates the FPS bases on number of frames and time. It's possible that something doesn't work correctly, maybe the calculation is screwed on very fast machines. I'll have a look. Capture and Encoding is one thread because it uses the Haiku API to capture and encode. Capture is inherently one thread in the API, Encoding could be multithreaded but it depends on the used addon.

ghost commented 4 years ago

Hi! I had another look. It is likely that my disk i/o was a bottleneck so that BeScreenCapture couldn't save all frames to /tmp while recording. I was using a USB flash drive.

I tested again in a VM on a HDD this time and I got up to about 22 FPS, when selecting to record at 30 FPS. CPU usage was not high during recording, so I am not sure what happened here. See the resulting capture.mkv (zipped). capture.zip

jackburton79 commented 4 years ago

Hi! I had another look. It is likely that my disk i/o was a bottleneck so that BeScreenCapture couldn't save all frames to /tmp while recording. I was using a USB flash drive.

I tested again in a VM on a HDD this time and I got up to about 22 FPS, when selecting to record at 30 FPS. CPU usage was not high during recording, so I am not sure what happened here. See the resulting capture.mkv (zipped). [capture.zip]

Sorry for the late reply. I made some tests on my Haiku system (a VM): the produced clip always has a bit fewer frames per second than I chose. if I choose 20, I get a 18/19 fps clip. if I choose 30, I get 28.

I'll have to review the recording loop to tweak the timing.

jackburton79 commented 3 years ago

Could you try with 2.5.2 ? It will now hit the disk only after it has exhausted almost all the available memory, so disk shouldn't be a bottleneck anymore.

jackburton79 commented 1 year ago

Could you try again with release 2.6.2 ?