scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

How do I priritize FPS in recording instead of the phone?

Open beans9926 opened this issue 3 years ago • 6 comments

I want to record my phone screen (gameplay) but it needs to be at a constant 60fps. I'm ok with the framerate on the phone dropping to 30, since the recording will be analyzed later.

As of now, the game on the phone stays at a constant 60 but the recording is around 45. I tried different combinations of bit rates and resolutions so far, and they didn't work as expected.

beans9926 avatar Jul 25 '22 07:07 beans9926

The capture bit-rate is intrinsically variable: a new frame is produced when the screen content changes (you could check with scrcpy --print-fps). When recording with scrcpy --record, all the frames produced by the device are recorded.

Also see https://github.com/Genymobile/scrcpy/issues/3305

rom1v avatar Jul 25 '22 08:07 rom1v

So the framerate for the video stays at 30 in the lobby which I expected. But when in-game, the framerate in the video depends on how much action is happening. If I am idle and not touching the screen (to move in-game) then the FPS is above 55. But as I start moving it dips below 50 and goes as low as 39 fps.

Here is a sample of what it looks like image

beans9926 avatar Jul 25 '22 08:07 beans9926

It's the rendering framerate (the game may lag a bit more when there is action, and capturing the screen on the device may have some impact on the game performance).

rom1v avatar Jul 25 '22 08:07 rom1v

Well for my use case I don't really mind if the gameplay is 20-30fps. The main thing needed is the footage, to analyze it for in-game statistics, so that is the main priority.

beans9926 avatar Jul 25 '22 08:07 beans9926

OK, then scrcpy records all the frames captured on the device (with an intrinsic variable framerate).

rom1v avatar Jul 25 '22 08:07 rom1v

OK, then scrcpy records all the frames captured on the device

Yes, it is probably doing that. I have also tried lowering some other settings in the game to try and free up some processes and it seems to have somewhat worked. The average fps is slightly higher now but not consistent 59-60fps

beans9926 avatar Jul 25 '22 09:07 beans9926