Skip to main content
Version: 3.0.0

Video Recorder

The Video Recorder captures the rendered session to a video file, so an execution of a procedure can be reviewed or archived. It records what the camera renders, together with audio, and produces an MP4 (H.264) file.

How it works​

The recorder is a native, GPU-side capture system. A native VideoRecorder plugin grabs the rendered frames straight from the GPU and encodes them to an .h264 stream; bundled executables then mux the video and audio into the final MP4:

  • ffmpeg.exe / mkvmerge.exe — pack the H.264 stream and the audio tracks into the MP4.
  • Encoder.exe — the encoder process that the recorder drives while capturing.

These executables are copied to StreamingAssets/WEAVR/VideoRecorder/ automatically when the recorder is enabled (see Platform requirements).

The whole system is exposed through a small interface (StartRecording, StopRecording, IsRecording, plus OnStart / OnStop events). At runtime a single active recorder is registered with a provider, and the rest of WEAVR (for example the procedure action) talks to it through that provider, regardless of the render pipeline in use.

URP and HDRP​

The recorder ships in two implementations, one per render pipeline. They share the same settings, audio capture, native encoder and MP4 packing — only the way frames are grabbed from the renderer differs:

PipelineHow frames are capturedWhat you add to the scene
URPA ScriptableRendererFeature (the Video Recorder Feature) with read/write render passes added to the URP Renderer.The URP VideoRecorderManager component.
HDRPHDRP Custom Passes (read/write) hosted in a CustomPassVolume.The HDRP VideoRecorderManager component, with its Custom Pass Volume assigned.

At startup each manager registers itself only for the matching pipeline (the URP manager activates when the project uses URP, the HDRP manager when it uses HDRP), so the correct capture path is selected automatically.

Recorder settings​

The VideoRecorderManager component exposes the following options:

SettingDefaultDescription
Frame Rate24Frames per second of the recorded video.
Record Left EyetrueRecord the left eye. For a standard (mono) recording leave only this enabled.
Record Right EyefalseAlso record the right eye — useful to capture both stereo views in VR. Each enabled eye produces its own MP4.
Record Scene AudiotrueCapture the scene audio from the AudioListener.
Record Microphone AudiotrueCapture the user's microphone.

Audio is captured to WAV (scene and/or microphone), then mixed and muxed into the MP4 alongside the video. The output files are written to the data-tracker cache folder (.../TmpData/VideoRecorder/), one MP4 per recorded eye.

Using it in a procedure​

Recording is driven from the procedure with the Video Recorder action (category Video), which simply issues a Start or Stop command to the active recorder. Add a Start action where you want capture to begin and a Stop action where it should end.

The recorder is also integrated with the data tracking system, so a recording (and the captured microphone audio) can be associated with the execution being tracked.

Platform requirements​

The Video Recorder is enabled only on Windows Standalone builds whose primary graphics API is Direct3D11 (DirectX 11) or Direct3D12 (DirectX 12). When those conditions are met, WEAVR defines the ENABLE_VIDEO_RECORDER symbol and copies the native executables into StreamingAssets/WEAVR/VideoRecorder/; otherwise the feature is compiled out. Make sure DirectX 11 or DirectX 12 is the first graphics API in Project Settings > Player for the recorder to be available.

note

Because the recorder uses a native Direct3D plugin, it is not available on Android/standalone-XR builds or with other graphics APIs (for example Vulkan or OpenGL). On those targets the Video Recorder action has no effect.