Skip to content

Capture And Output

Last reviewed: 2026-06-30

Capture System

Final video capture is implemented with AVPro Movie Capture, specifically CaptureFromScreen configured by PresentationController.

Setting Current source
Capture component Serialized screenCapture, GetComponent<CaptureFromScreen>(), or auto-added at runtime.
Output target OutputTarget.VideoFile
Output folder Serialized captureOutputFolder, default C:\Anuva\Capture
Filename Remote outputPath override or generated from presentation metadata/timestamp.
Resolution Serialized captureWidth / captureHeight
Frame rate Serialized captureFrameRate
Realtime/offline Serialized realtimeCapture; offline uses manual audio encoding path.
Audio Unity audio capture for realtime; manual audio frame encoding for offline capture.

Remote Render Output

For Python-driven renders, render.start.payload.outputPath is used as the requested MP4 output path. Unity resolves output directory, prefix, and extension, starts capture, then reports the final path in render.completed.

AVPro completion callback is the authoritative point for render.completed, because file writing may continue after playback stops.

Local Output

For local playback, capture can still run when capturePresentation and local capture flags are enabled. The default folder is C:\Anuva\Capture.

Scene serialization differs:

Scene Serialized capture notes
Anuva_DemoSet_Scene captureWidth: 1280, captureHeight: 720, realtimeCapture: 0, Python communication disabled.
Anuva_TataMotors_Scene captureWidth: 1920, captureHeight: 1080, realtimeCapture: 0, Python communication disabled, PresentationController GameObject inactive in inspected YAML.

Failure Cases

Failure Unity behavior
Capture component unavailable Logs warning and fails remote render with capture start error.
AVPro StartCapture() returns false Logs warning; remote render fails with capture error.
Playback exception Stops/cancels capture and emits remote failure if rendering remotely.
Cancel command Cancels capture and emits render.failed with JOB_CANCELLED.
Missing output file after capture callback File size becomes 0 if file does not exist when stats are read.

Handoff To Upload

Unity does not upload final MP4. It writes the file and emits render.completed. The Python Server owns validation, thumbnail generation, upload, and completion with the Web App.