Performance Playback in Unity

Thanks to Depthkit’s combined-per-pixel video export format, playback via the Unity Plugin is very performance friendly. However, there are times when you may need to find performance short cuts. Let’s say you have a dense, geometry based environment in your scene. You may need to make some optimizations.


  1. In the Unity Plugin, use the AVPro video player. This allows for hardware decoding for optimal performance of multiple clips.
  2. If hardware decoding is not enough, you can encode your combined-per-pixel video exports to HAP. This codec is supported by AVPro.
  3. If this is not enough, you can lower the resolution of your video files.

What is HAP?

HAP is a video codec that allows for low CPU and memory usage. It also supports very high resolutions.

Note: Hap is only supported on Windows and Mac standalone platforms.

  • You will need to download and install the HAP codec onto your computer.
  • Then transcode your h264 (mp4) combined-per-pixel videos to HAP (avi) using ffmpeg. You can use a .mov or .avi container.
  • Now import the HAP video files into your Unity Streaming Assets folder for playback. You will also need to set you preferred video API to Direct Show.


Read more on how to use Hap in your project.

Community Question: What is the maximum amount of Depthkit clips anyone has tried to play back in Unity?

1 Like