Table of Contents

Class EncodedVideoFrame

Namespace
LiveKit.Rtc
Assembly
LivekitRtc.dll

One complete encoded video access unit, without container or RTP headers.

public class EncodedVideoFrame
Inheritance
EncodedVideoFrame
Inherited Members

Constructors

EncodedVideoFrame(byte[], int, int, VideoCodec, EncodedFrameType, long, FrameMetadata?)

Creates an encoded frame to capture with CaptureFrame(EncodedVideoFrame).

public EncodedVideoFrame(byte[] data, int width, int height, VideoCodec codec, EncodedFrameType frameType, long timestampUs, FrameMetadata? metadata = null)

Parameters

data byte[]

Encoded payload of the frame.

width int

Frame width in pixels.

height int

Frame height in pixels.

codec VideoCodec

Codec the payload is encoded with.

frameType EncodedFrameType

Key frame or delta frame.

timestampUs long

Capture time in microseconds, increasing along the stream.

metadata FrameMetadata

Optional metadata delivered with the frame.

Properties

Codec

The codec of Data. It must match the publication and stay fixed for the lifetime of the track.

public VideoCodec Codec { get; }

Property Value

VideoCodec

Data

A single frame encoded with Codec (Annex B for H.264/H.265).

public byte[] Data { get; }

Property Value

byte[]

FrameType

Whether this is a key frame or a delta frame.

public EncodedFrameType FrameType { get; }

Property Value

EncodedFrameType

Height

Frame height in pixels.

public int Height { get; }

Property Value

int

Metadata

Optional metadata delivered with the frame.

public FrameMetadata? Metadata { get; }

Property Value

FrameMetadata

TimestampUs

Capture time in microseconds, increasing along the stream.

public long TimestampUs { get; }

Property Value

long

Width

Frame width in pixels.

public int Width { get; }

Property Value

int