Reputation: 469
i got the Flutter Camera working with a preview and all that. But the quality of the recorded video is way to bad. I get 1MB for 10 seconds. The resolution is fine (1080 x 1440), but i think the bitrate is way to low somehow.
I looked into the CameraPlugin: https://github.com/flutter/plugins/blob/master/packages/camera/android/src/main/java/io/flutter/plugins/camera/CameraPlugin.java
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mediaRecorder.setVideoEncodingBitRate(1024 * 1000);
mediaRecorder.setAudioSamplingRate(16000);
Is this the normal configuration and does it work for you guys? I got a Oneplus 2 and normal camera is taking better videos.
I'm not used to the flutter Method Channel so i can't create my own CustomCameraPlugin and change the important values.
Maybe there is a whole different approach. Let me know
Greetings Markus
Upvotes: 3
Views: 3883
Reputation: 1585
Changing mediaRecorder.setVideoEncodingBitRate
from 1024 * 1000
to 3000000
for worked for me for better quality.
Upvotes: 1