Forum Discussion
natewinck
9 years agoHonored Guest
Real-Time Video Capture with Unity 5
Hello!
I'm attempting to record video live in-app similar to the way Tilt Brush works. In fact, Google published an article on how they were able to accomplish recording video with Unity on the Vive: https://medium.com/google-developers/real-time-image-capture-in-unity-458de1364a4c#.iq1ccomw9.
Unfortunately, the way they were able to make it work without having ~20ms refresh rates was by hacking the SteamVR render loop. The Oculus SDK doesn't allow for that as far as I know, so I tried every single event in Unity (https://docs.unity3d.com/Manual/ExecutionOrder.html) to try placing ReadPixels and GetPixels in places where the GPU wouldn't be used. None of them made the refresh rate go below the needed 10ms (or 0.5ms like what Google accomplished), though some events were clearly worse than others.
Does anybody have any ideas or solutions for how to record video in-app in real time using Unity as the game engine?
Thanks!
Nathaniel
I'm attempting to record video live in-app similar to the way Tilt Brush works. In fact, Google published an article on how they were able to accomplish recording video with Unity on the Vive: https://medium.com/google-developers/real-time-image-capture-in-unity-458de1364a4c#.iq1ccomw9.
Unfortunately, the way they were able to make it work without having ~20ms refresh rates was by hacking the SteamVR render loop. The Oculus SDK doesn't allow for that as far as I know, so I tried every single event in Unity (https://docs.unity3d.com/Manual/ExecutionOrder.html) to try placing ReadPixels and GetPixels in places where the GPU wouldn't be used. None of them made the refresh rate go below the needed 10ms (or 0.5ms like what Google accomplished), though some events were clearly worse than others.
Does anybody have any ideas or solutions for how to record video in-app in real time using Unity as the game engine?
Thanks!
Nathaniel
2 Replies
Replies have been turned off for this discussion
- vrdavebOculus Staff
- natewinckHonored GuestI tried AVPro, but it limits the HMD frame rate to the rate at which you want to capture. That's not great when you're trying to hit 90fps. I tried modifying their code to use Coroutines but the result led to an unstable frame rate, and it caused a severe jump when starting/stopping recording (usually a 30ms+ hit).
I'll have to look into Ansel, though that is only for NVIDIA graphics cards I believe. Do you know if there's a corollary for AMD GPUs?
FRAPS is a program that runs as a separate app, correct? I'm needing something that runs in-app like AVPro and Ansel.
Thanks vrdaveb!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 months ago
- 3 months ago