Recording EIF files and using them for simulation runs
EIF files (EasyAR Input Frame files) are a file format used by EasyAR Sense to store a sequence of input frame data. This document describes how to record EIF files and use them for simulation runs.
EIF files and content
Depending on the recording method, EIF files have two implementations:
Raw EIF format (typically with the .eif extension)
Raw EIF files store input frame data, including images and additional information (such as camera parameters and tracking status), frame by frame using EasyAR's internally defined data structure. This format does not use video compression but encodes each frame individually (e.g., JPEG image data), making it suitable for precise playback.
EIF MKV format (typically with the .mkveif extension)
A video format based on MKV encapsulation, which encodes input frame information into the MKV container. It uses H.264 for video compression to reduce image data size while preserving other metadata of input frames (such as IMU sensor data, positioning data, etc.) as streams or additional tracks. This significantly reduces file size and facilitates standard video stream processing.
Note
The EIF MKV format currently only supports recording on Android/iOS/macOS/visionOS and playback on Windows/macOS. The traditional EIF format has no such restrictions.
EIF recording and playback
EasyAR provides a complete mechanism for recording and playback, primarily controlled through the following components:
InputFrameRecorder / InputFramePlayer
Purpose
Components for recording and playback corresponding to the raw EIF format.
Features
During recording, all incoming input frames are serialized and saved, including images, parameters, tracking status, etc.
VideoInputFrameRecorder / VideoInputFramePlayer
Purpose
Components for recording and playback corresponding to the EIF MKV format.
Features
Supports recording more sensor data streams (such as gyroscope, accelerometer, positioning data, etc.) and encapsulates them into the EIF MKV file. The playback side can choose to output this data, facilitating comprehensive simulation of various inputs during recording on the PC side.
Principle of using EIF for simulation runs and achievable effects
Using a recorded EIF file as an input data source is equivalent to "replaying" the complete data stream of the physical camera and its related sensors during runtime to the AR engine. By simulating the input frame sequence:
The AR engine believes it is still acquiring data from a physical camera
Each frame output during playback has the original timestamp, camera parameters, and tracking status, driving algorithms to process these frames as if they were real-time data.
Real runtime behavior can be reproduced in non-device environments (such as PC or Unity Editor)
This allows you to debug visual tracking, spatial mapping, and other functions without a physical device. Features like Mega can be simulated on Windows/Mac.
The effects achievable using EIF for simulation runs:
Reproduce the real data flow process Even without a camera, AR functions such as planar image tracking, spatial positioning, dense map generation, etc., can be driven as if in a real run.
Facilitate development debugging and diagnostics Recorded EIF files can be used to analyze tracking failure reasons, verify AR algorithm behavior or performance fluctuations on specific inputs.
Cross-platform playback Transfer EIF files between different platforms to reproduce AR session behavior recorded on a mobile device on a PC, enabling debugging without the device.
Next steps
Platform-specific guides
Recording EIF files and using them for simulation runs are closely tied to the platform. Please refer to the following guides based on your target platform: