saki4510t / UVCCamera

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

Flickering during streaming #602

Open avdhoot11 opened 3 years ago

avdhoot11 commented 3 years ago

Hi Saki,

I have built an application using this library.

I'm using Android Studio version 3.3.2. I have custom hardware that transfers data in YUV format.

But I'm getting flickering and sometimes the frame gets cut.

To compare I have used one of the webcam. Webcam streams just fine,

After debugging I have found out that the webcam provides MJPEG data whereas my hardware provides data in YUV format.

With few of the applications available on the play store I'm getting smooth streaming but with usbcameratest8 I'm facing this issue.

Can you please help in this regards?

shaileshswankhede commented 2 years ago

I was getting same issue and I fixed it by increasing number of libuvc transfer buffers ie. in libuvc_internal.h

define LIBUVC_NUM_TRANSFER_BUFS 40