Reputation: 136
Deleted and re-asked for clarity and better explanation.
Below is the code for my application, with an attached image. The video frame-rate is fine, however frames are very low quality and it seems to be low bitrate however editing the bitrate changes nothing on the video feed, which makes me think it's another issue. Anyone had this problem before?
private int videoQuality = 100000;
private int videoFramerate = 30;
private void setupMediaRecorder() throws IOException {
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setOutputFile(videoFileName); //timestamp.mp4
mediaRecorder.setVideoEncodingBitRate(videoQuality);
mediaRecorder.setVideoFrameRate(videoFramerate);
mediaRecorder.setVideoSize(videoSize.getWidth(), videoSize.getHeight());
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
mediaRecorder.setOrientationHint(totalRotation);
mediaRecorder.prepare();
}
preview screenshot
recordingscreenshot
recording - motion screenshot
Upvotes: 1
Views: 539
Reputation: 136
Turns out 1000000 bitrate was too low, changed to 10000000 and looking fine.
Upvotes: 1