We are trying to solve a video lag problem for a long time without any success. In our app, we are using
private void OnTrackablesUpdated()
to capture the camera's image for further processing. To make it work, we need to set the pixel format. On mobile devices (not in the editor) the correct format is
Our implementation is very similar to here: https://library.vuforia.com/articles/Solution/Working-with-the-Camera#How-To-Obtain-HD-Camera-Frames.
Since we upgraded from old versions of Unity and Vuforia (Unity 5.6) we have the problem that the camera video stream becomes laggy as soon as the pixel format RGB888 is set. We tried using different pixel formats and unregistering the pixel format after we captured the image but the laggy video remains until vuforia or the scene is reset. This happens on iPhone 7 Plus but not on iPhone X, see versions below. We have only regular 2D Vuforia image targets in our scene. This problem exists only on iOS, on Android and in the Editor the video stream is fine.
Any idea what could cause this problem? Could it be related to ARkit?
In the video I uploaded here, I move the phone up and down and you can see that after 4 seconds the video starts to lag: https://www.dropbox.com/s/38cn2lzrq1z1l88/IMG_2897.TRIM.MOV?dl=0
iPhone 7 Plus, iOS 11.4.1
iPhone X, iOS 11.4.1