RenderHeads / UnityPlugin-AVProMovieCapture

AVPro Movie Capture is a Unity Plugin for advanced video capture to AVI/MP4/MOV files
https://renderheads.com/products/avpro-movie-capture/
47 stars 8 forks source link

Lag Spike in NativePlugin.CreateRecorderVideo() when starting to record a video #264

Closed ethanfischer closed 1 year ago

ethanfischer commented 1 year ago

Describe the bug When starting a recording, both on mobile and pc, there is a noticeable hitch in framerate when beginning to record a video. We are using the Capture From Camera component, but have also noticed this with the Capture From Screen component.

Interestingly, this spike doesn't seem to happen after recording for the first time. For instance, if I start recording, stop, and start another one, the spike only happens the first time. This seems to persist until I close and reopen the app. So it seems like there is some setup logic that runs the first time that is taking longer and hogging the frame

Your Setup (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Hook up a UI button or keypress to call CaptureFromCamera's StartCapture() method
  2. Notice hitch in framerate

Screenshots image

Chris-RH commented 1 year ago

This is just the underlying systems loading for first use. It'll be different across the various platforms, but still there. It might be possible to shift some of it about a bit, but it still needs to be done.