Recording & Playback¶
XRTracker can record camera feeds for offline playback, and also render synthetic sequences from the Scene View for development without physical objects.
Live Camera Recording¶
The primary recording method captures the live camera feed (color + depth) during a tracking session. Recording is handled entirely in native code — the tracker automatically captures every frame that passes through the pipeline.
Native API¶
// Start recording — frames are saved automatically during tracking
FTBridge.FT_StartRecording(outputDirectory);
// Check state
bool isRecording = FTBridge.FT_IsRecording() != 0;
int frameCount = FTBridge.FT_GetRecordedFrameCount();
// Stop and finalize
int totalFrames = FTBridge.FT_StopRecording();
Recordings are saved to the specified directory. On mobile, a common location is:
string dir = Path.Combine(Application.persistentDataPath, "Recordings",
DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));
FTBridge.FT_StartRecording(dir);
GUI Controls Helper¶
For quick recording during development, add the CameraFeedRecorderGuiControls component to any GameObject. It provides an on-screen Start/Stop button with a frame counter and blinking REC indicator — useful for recording on device without writing any code.
| Setting | Description |
|---|---|
| Anchor | Screen corner for the recording panel |
| Offset | Margin from the screen edge |
| Panel Width | Width of the recording UI |
Scene View Recorder (Editor Only)¶
The Scene View Recorder is an Editor tool for creating synthetic sequences from the Unity Scene View. This lets you set up and test tracking without access to the physical object or a camera — you render your 3D model from the Scene View and use the resulting sequence as input.
Open it via FormulaTracker > Scene View Recorder in the menu bar.
How It Works¶
- Arrange your 3D model in the scene
- Open the Scene View Recorder window
- Set the output directory and capture settings
- Navigate around the model in the Scene View
- Click Start Recording — the tool captures color (and optionally depth) from the Scene View camera at the configured frame rate
- Click Stop Recording when done
The recorder works outside of Play Mode — no need to run the game. It captures directly from the Scene View camera.
| Setting | Description | Default |
|---|---|---|
| Directory | Output folder for the recording | — |
| Camera Name | Name tag for the camera in metadata | "color_camera" |
| Width / Height | Capture resolution | 640 x 480 |
| Target FPS | Capture frame rate | 30 |
| Capture Depth | Also render depth from the scene | On |
Tip
Use Capture Single Frame to grab a single frame for quick testing without recording a full sequence.
Playback¶
To play back a recorded sequence:
- On the XRTrackerManager, set the Image Source to Sequence
- Set the Sequence Directory to the path containing the captured data
- Enter Play Mode — the tracker receives frames as if they came from a live camera
![]()
Recording Format¶
Recordings are stored as a directory of files:
2026-03-13_14-30-00/
├── sequence.json # Camera intrinsics, resolution, frame count
├── color/
│ ├── 000000.png # Color frames
│ ├── 000001.png
│ └── ...
├── depth/ # (if depth was captured)
│ ├── 000000.exr
│ ├── 000001.exr
│ └── ...
└── poses/
└── poses.json # Per-frame body poses
Use Cases¶
Debugging on Desktop¶
Record a session on device where tracking fails, transfer the recording to your desktop, and replay it while adjusting parameters — no device needed.
Regression Testing¶
Build a library of recorded sequences covering key scenarios. After changing tracking settings, replay all sequences and verify quality stays within range.
Development Without Hardware¶
Use the Scene View Recorder to create synthetic sequences from your 3D model. This is especially useful early in a project when physical prototypes aren't available yet, or when the target device isn't at hand.
Tips¶
- Record on the target platform — camera characteristics differ between devices
- Include challenging scenarios — partial occlusion, fast motion, poor lighting
- Live recordings capture exactly what the tracker sees — they reproduce issues faithfully
- Scene View recordings are synthetic — they're great for initial setup but don't replace testing on real camera feeds