FrameRecording

  • Demonstrate how to record eif file

  • Demonstrate how to playback eif file and use it for diagnosing

How to Use

../../_images/image_212.png
Recorder: Switch to frame recorder mode.
Player: Switch to frame playback mode.
Record/Playback/Stop: Start/Stop record or playback.

How It Works

Frame recorder in the scene

You need to add a FrameRecorder in the scene to record frame. You can reference API documents in the scripts for detailed settings.

../../_images/image_s21_1.png

You can set file path to save the recoreded eif file in the inspector or in the script. This sample set the path in the script.

Start/Stop FrameRecorder

FrameRecorder can be turned on or off using FrameRecorder.enabled.

recorder.enabled = val;

Frame player in the scene

You need to add a FramePlayer in the scene to playback frame. You can reference API documents in the scripts for detailed settings.

../../_images/image_s21_2.png

You can set eif file path for playback in the inspector or in the script. This sample set the path in the script.

Start/Stop FramePlayer

FramePlayer can be turned on or off using FramePlayer.Play or FramePlayer.Stop.

if (val)
{
    player.Play();
}
else
{
    player.Stop();
}

FramePlayer is one type of FrameSource, you need to disable VideoCameraDevice or VIOCameraDevice in the scene.

The usage of eif file

The eif file generated by FrameRecorder can be used for device diagnose. When you record a eif file on the device, frames including images, camera parameters, tracking status will be stored. This file can be used on PCs to run motion tracking simulation and can drive sparse spatial map and dense spatial map to work on Windows or Mac.

In this sample, you can record eif on Android or iOS device and playback on Windows or Mac, with some modifications for file path.

If you want to record and use eif for motion tracking or spatial map, you need to use VIOCameraDevice in the scene when recording.

Eif file recorded is not a full copy of runtime data, recording frame rate may drop on some low end devices.