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();
videoConstraints.setVideoFps(15);
videoConstraints.setResolution(640,360);
constraints.setVideoConstraints(videoConstraints);
streamOptions.setConstraints(constraints);
I’m testing on devices as below:
“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!
StreamOptions streamOptions = new StreamOptions(streamName);
Constraints constraints = new Constraints(true, true);
VideoConstraints videoConstraints = new VideoConstraints();
videoConstraints.setVideoFps(15);
videoConstraints.setResolution(640,360);
constraints.setVideoConstraints(videoConstraints);
streamOptions.setConstraints(constraints);
I’m testing on devices as below:
- Samsung galaxy A32 (very laggy)
- Xiaomi redmi note 8.
- Vsmart joy 4.
- Google Pixel 2XL.
“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!