RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

Can the recording process be optimized?

Open JeffZane opened this issue 1 month ago • 2 comments

When recording video, I noticed that it takes about 2 seconds for the recording to go from the STARTED state to the RECORDING state, but the actual recording only starts from the RECORDING state. This explains why the actual recording time seems 2 seconds shorter than I mentioned earlier.

Considering real-world usage scenarios, users usually start moving their phones from the moment they tap to record, but the actual recording only begins after 2 seconds. Although I added a loading indicator to the button, the user experience is still quite poor. Could this step be optimized?

2025-12-01 14:08:02.840  D  status=STARTED
2025-12-01 14:08:04.993  D  status=RECORDING
2025-12-01 14:08:07.135  D  status=STOPPED

JeffZane avatar Dec 01 '25 06:12 JeffZane

The record need start with a keyframe and the library already request for it to the encoder to reduce the time. I don't know if I can optimize it more or not. I will check it.

pedroSG94 avatar Dec 01 '25 11:12 pedroSG94

Hello,

I optimized it here: https://github.com/pedroSG94/RootEncoder/commit/5dc1671309ba5e39cc689010e9b8e537d40eb95e

The time was reduced from 2000ms to 400ms aprox. You can test using the demo app with the master branch

pedroSG94 avatar Dec 03 '25 19:12 pedroSG94