I was able to implement a code which records video bases on CameraCaptureActivity from grafika. Now I can record myself counting from 1 to 10, but when I go to see the recorded video I am saying 1,3,8,9, that is I missed some frames to be recorded. The surface was configured:
private static int VIDEO_WIDTH = 720; // dimensions for 720p video
private static int VIDEO_HEIGHT = 1280;
private static int DESIRED_PREVIEW_FPS = 30;
and the encoder
format.SetInteger(MediaFormat.KeyColorFormat, (int)MediaCodecCapabilities.Formatsurface);
format.SetInteger(MediaFormat.KeyBitRate, 100000);
format.SetInteger(MediaFormat.KeyFrameRate, 30);
format.SetInteger(MediaFormat.KeyIFrameInterval, 5);
width: 310 and height: 310.
is my problem the BitRate? Which values should I set in order to receive every frame which I display to be recorded by the encoder? thanks.