struct AREncodingConfig (Niantic.ARDK.Recording.AREncodingConfig)

Overview

Configs for encoding AR captured videos. More…

struct AREncodingConfig {
    // fields

    uint EncodingDeadline;
    int NumThreads;
    uint TargetBitrateKbits;
    string TargetPath;
    RecordingVideoFormat VideoFormat;
    uint WindowTime;
    static const uint DEFAULT_VIDEO_WINDOW_TIME = 10;

    // properties

    bool CalculatePSNR;
    AREncodingConfig Default;

    // methods

    AREncodingConfig(
        RecordingVideoFormat videoFormat = RecordingVideoFormat.VP8,
        uint windowTime = DEFAULT_VIDEO_WINDOW_TIME,
        string targetPath = null,
        int numThreads = -1,
        uint encodingDeadline = 0,
        uint targetBitrateKbits = 100000,
        bool calculatePSNR = false
    );
};

Detailed Documentation

Configs for encoding AR captured videos.

Fields

uint EncodingDeadline

Time to spend encoding each frame, in microseconds. (0=infinite)

int NumThreads

Number of threads to use for encoding. -1 will use the number of available cores

uint TargetBitrateKbits

Target video bitrate

string TargetPath

The target destination to the video file. This should end with .webm

RecordingVideoFormat VideoFormat

The format to encode the normal video into. If none, no file will be produced.

uint WindowTime

Capturing will only capture the last N-Seconds worth of video in this time window.

Methods

AREncodingConfig(
    RecordingVideoFormat videoFormat = RecordingVideoFormat.VP8,
    uint windowTime = DEFAULT_VIDEO_WINDOW_TIME,
    string targetPath = null,
    int numThreads = -1,
    uint encodingDeadline = 0,
    uint targetBitrateKbits = 100000,
    bool calculatePSNR = false
)

Creates an ARRecorderConfig, with helpers to provide defaults.

Note

If this struct with all default values is desired, use the Default property instead.

Parameters:

videoFormat

The format to encode the video in, defaults to VP8.

windowTime

The window of video time, defaults to DEFAULT_VIDEO_WINDOW_TIME.

targetPath

The location to put the encoded video. If not given, uses a random file in the Application.temporaryCachePath

encodingDeadline

Time to spend encoding each frame, in microseconds (0 = infinite).

numThreads

Number of threads to use for encoding. Defaults to -1 (or all available cores).

targetBitrateKbits

Target video bitrate. Defaults to some huge number.

calculatePSNR

Whether or not to calculate peak signal to noise ratio