saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
2.99k stars 1.2k forks source link

When I set the high resolution, I Can't preview, #538

Open GQii opened 4 years ago

GQii commented 4 years ago

Hi saki, When I set the high resolution,When I set the high resolution,The screen cannot be previewed。 but when i set the low resolution , There's a screen on the screen. I don't know how to solve this problem, I hope you can help me, thank you。

GQii commented 4 years ago

this picture rresolution is 640*480; Screenshot_20200108-104728

this picture rresolution is 160*120; Screenshot_20200108-104804

@saki4510t ,I don't know how to solve this problem.Can you help me, thank you very much?

Jade-source commented 4 years ago

Hi, GQii I know what kind of problem you are talking about. but 640x480 is not high resolution. because i use 1920x1080 resolution. maybe don't use 4K. you should check external camera spec and modify default (resolution, frame rate). The default resolution are modified jni and java files. Thank you.

GQii commented 4 years ago

@Jade-source First of all, thank you for your reply. I tried to modify resolution and frame rate in the past, but the effect is still as shown above. I'm not a solution to this problem right now.

Jade-source commented 4 years ago

@GQii you should use UVCCameraHandler.createHandler(Activity, CameraViewInterface, encoderType, 1920, 1080, format) when preview is FHD.

I think the external camera does not compress video format well.

GQii commented 4 years ago

@Jade-source Thank you very much, I've solved this problem.