I have a custom full screen camera in landscape mode. The size of the device is 1024 x 600.
Supported list of preview options
width x height
176 x 144
320 x 240
352 x 288
528 x 432
640 x 480
1024 x 576
1024 x 768
Supported video size list
width x height
176 x 144
320 x 240
352 x 288
640 x 480
720 x 480
1280 x 720
Without setPreviewSize, my preview is compressed from above and below and more from left and right.
My preview getOptimalPreviewSize returns a size of 1024 x 576 and the size of the close video is 1280 x 720
So, after setting the video size and starting to record video
mediaRecorder.setVideoSize (1280, 720);
when changing the surface (in this case, increased).
I wonder how to solve the problem of size difference and before and after recording always see the same preview?
android camera preview android-camera mediarecorder
ella2964823
source share