Android MediaRecorder Latency Measurement

The Android MediaRecorder class introduces a significant (in order of magnitude) delay when recording video. See Delay in preparing a media recorder on Android.

After an extensive search, I can't find a way to get rid of this, only workarounds that avoid MediaRecorder and use onPreviewFrame.

In my particular application, the MediaRecorder delay would not be so bad if I could measure it programmatically - provided that its standard deviation was not too high under everyday background load conditions. Does anyone know how to do this?

I was thinking about using FileObserver in the recorded file to find out when the frames start to be recorded, but since I do not know the delay with the pipeline, I could not draw a firm conclusion from this.

In the corresponding note, does anyone know if a recording sound is played before the first frame is recorded? Is there any way to mute this sound?

+4
source share

All Articles