title: How to record video with ARCore with Unity?
body: <p>I have been stuck on this problem for over a month now. I just need to record the video feed when people are using the AR app.</p>
  
  <p>There are several options:</p>
  
  <p><strong>1. Take the screenshot in Unity for every frame.</strong>
  <br>
  I tried <a href="https://docs.unity3d.com/ScriptReference/ScreenCapture.CaptureScreenshot.html" rel="noreferrer">taking a screenshot</a> every frame. This is way too slow. The fps is only 5.<br>
  Then I tried <a href="https://docs.unity3d.com/ScriptReference/ScreenCapture.CaptureScreenshotAsTexture.html" rel="noreferrer">saving the texture</a> to an array and encode them to images afterwards. <br>This would take a lot of memory and would cause a significant frame drop on mobile phone. The fps is around 10.
  <br>
  If anyone has a great idea for this method, please let me know.</p>
  
  <p><strong>2. Use native plugins to record video.</strong>
  <br>
  I haven't found any solutions on this one. I am afraid that this may conflict with the ARCore.</p>
  
  <p>I know that there is an <a href="https://stackoverflow.com/questions/47869061/providing-video-recording-functionality-with-arcore">Android solution</a> but ideally I want to use Unity. Any help is appreciated, thank you!</p>
  
  <p><strong>3. Save the texture from the texture reader api provided by ARCore computer vision example.</strong>
  <br>
  There is a Computer Vision example in the directory. And I can get the texture directly from GPU with its api.</p>
  
  <p>However, the fps is still low. With its edge detector example, the fps is around 15. I succeeded in saving those frames to local directory in another thread. But the fps is still not acceptable. The bottomline is 720p at 30fps.</p>
  
  <p>PS: I just need to save the frames. I can handle encoding them into videos.</p>
  
  <p>PPS: <strong>Just recording the camera feed</strong> and <strong>recording the camera feed and the augmented objects together</strong> are both okay. Either one achieved is great.</p>