Performance is bad when using gpu-image


New Member
I'm using the gpu-image module. In normal case, it runs quite smoothly because (by default ) you don't set the resolution for it, but when I set resolution, the video is quite lagging although the device performance is very good. When I debug, the frame on my device is only 320 x 240, it's really dim. When I add the code as below to set the resolution up to 640 x 360 and expand the local_video_view to see it, I realize a problem of lag, drop frame. The lagging occurs in the local view running on the devices when I publish.

StreamOptions streamOptions = new StreamOptions(streamName);
Constraints constraints = new Constraints(true, true);
VideoConstraints videoConstraints = new VideoConstraints();

I’m testing on devices as below:
  • Samsung galaxy A32 (very laggy)
  • Xiaomi redmi note 8.
  • Vsmart joy 4.
  • Google Pixel 2XL.
An staff also note that:
“Preliminary results: the problem is in gpu-image library itself, its performance drops even on powerful hardware (for example, on Google Pixel 3 and Samsung S10+ publishing FPS drops since 1024x768 and bigger resolutions. So we are refactoring Camera Manager example to make easy to integrate any other filtering library”

Please help me.Thanks!


Staff member
Good day.
Seems like android-gpuimage library itself has a bad perfomance on any device: the better CPU, the bigger resolution it can handle. So you can integrate any other filtering library. Now in ticket WCS-3339 we working on Camera Manager example to make the integration easier.


New Member
Can you suggest other filtering library to me, which that more compatible can fix or reduce this lagging problem? Thank you!