(GL|MT)HKView rendering is delayed with .preferredVideoStabilizationMode: AVCaptureVideoStabilizationMode.auto #1012
Replies: 9 comments 1 reply
-
It seems HKView(which use AVCaptureVideoPreviewLayer to render SampleBuffer) connects to AVCaptureSession directly(something like camera's viewfinder), and it's difference from rending SampleBuffer that comes from Or you can try to create an AVCaptureVideoPreviewLayer, and set it's session property. As the code below.
In my project, it work! but I don't know why - . - |
Beta Was this translation helpful? Give feedback.
-
I've noticed that when setting .preferredVideoStabilizationMode: AVCaptureVideoStabilizationMode.auto |
Beta Was this translation helpful? Give feedback.
-
@mkrn I'm having the same exact problem, did you find any solutions to this? |
Beta Was this translation helpful? Give feedback.
-
@animaonline I've set Not sure if that can be offset somehow so audio has some latency to match video / audio, @shogo4405 ? @CmST0us trick didn't help me, unfortunately (adding this to init:)
|
Beta Was this translation helpful? Give feedback.
-
I find this trick did not work in newly iOS......It looks like Apple has fixed the problem.(Good job Apple..) AVCaptureConnection is something like ISP in a camera system, which connect the sensor and encoder(or cpu?). When we set the .preferredVideoStabilizationMode, actually, it will set some property in ISP. |
Beta Was this translation helpful? Give feedback.
-
@shogo4405 any ideas to sync Audio and Video capture with stabilization using AVCaptureVideoStabilizationMode.cinematic or AVCaptureVideoStabilizationMode.cinematicExtended ? It would be really nice to have The sync issue is present only in the Live stream. The audio/video is synced in the local recording perfectly. |
Beta Was this translation helpful? Give feedback.
-
@shogo4405 In the recorded video, the audio and video are synced. In the live stream, the audio goes Ahead of the video. Hope it helps |
Beta Was this translation helpful? Give feedback.
-
If I set this property. It seems that without latency. But poor video quality. I can sync a video and audio in the livestream. |
Beta Was this translation helpful? Give feedback.
-
It works fine audio and video synchronizatio. #1000 Need more testing... |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
The GLHKView seems to fall behind and does not render in realtime when using cinematic/auto video stabilization, it seems that the rendering is ~300-500ms delayed
Related to: #574
To Reproduce
Easily reproduced in the example app
Expected behavior
The GLHKView renders without a delay, just like the HKView
Smartphone (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions