Table of Contents

Record EIF files and use them for simulation runs

EIF files (EasyAR Input Frame file) are the file format used by EasyAR Sense to store a series of input frame data. This article mainly describes how to record EIF files and use them for simulation runs.

EIF Files and Content

EIF files have two implementations based on different recording methods:

  • Original EIF format (usually with the extension .eif)

    The original EIF file stores input frame data frame-by-frame in a data structure defined internally by EasyAR, including images and additional information (such as camera parameters and tracking status). This format does not perform video compression but encodes frame-by-frame (e.g., JPEG image data), making it suitable for precise playback.

  • EIF MKV format (usually with the extension .mkveif)

    A video format based on MKV encapsulation, which encodes the information of input frames into the MKV container. Video encoding uses H.264 to compress image data while retaining 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, while the traditional EIF format does not have this limitation.

Eif recording and playback

EasyAR provides a complete set of mechanisms for recording and playback, mainly controlled by the following components:

  • InputFrameRecorder / InputFramePlayer

    • Purpose

      Corresponds to the recording and playback components of the original EIF format.

    • Features

      During recording, all incoming input frames are serialized and saved, including images, parameters, tracking status, etc.

  • VideoInputFrameRecorder / VideoInputFramePlayer

    • Purpose

      Corresponds to the recording and playback components of the EIF MKV format.

    • Features

      Supports more sensor data streams (such as gyroscopes, accelerometers, positioning data, etc.) during recording, and encapsulates them into the EIF MKV file. The playback end can choose to output this data, making it convenient to fully simulate various inputs during recording on the PC side.

Principles and achievable effects of using EIF for simulation

Using a recorded EIF file as the input data source is equivalent to "replaying" the complete data stream of a 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 receiving data from the physical camera. Each replayed output frame carries the original timestamp, camera parameters, and tracking state, driving the 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 features without needing a physical device. Functions like Mega can be simulated on Windows/Mac.

The achievable effects of using EIF for simulation:

  • Reproduce the real data flow process. Even without a camera, AR functions such as plane image tracking, spatial localization, and dense map generation can be driven as if they were running live.

  • Facilitate development, debugging, and diagnostics. Recorded EIF files can be used to analyze the causes of tracking failures, verify AR algorithm behavior or performance fluctuations on specific inputs.

  • Cross-platform playback. Transfer EIF files across different platforms to reproduce the behavior of an AR session recorded on a mobile phone on a PC, enabling debugging without the device.

Next steps

Platform-specific guides

Recording EIF files and using them for simulation runs is closely tied to the platform. Please refer to the following guides for development based on your target platform: