After Video recording preview video quality is lagging .
iharshb opened this issue · comments
private int sampleAudioRateInHz = 44100;
private int frameRate = 30;
mFrameRecorder.setFormat("mp4");
mFrameRecorder.setSampleRate(sampleAudioRateInHz);
mFrameRecorder.setFrameRate(frameRate);
// Use H264
mFrameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
mFrameRecorder.setVideoOption("crf", "14");
mFrameRecorder.setVideoOption("preset", "ultrafast");
mFrameRecorder.setVideoOption("tune", "film");
As suggested in this issue, we need hardware acceleration support to encode video.