Table of Contents

Class AMAH264EncoderSettings

Namespace
VisioForge.Core.Types.X.VideoEncoders
Assembly
VisioForge.Core.dll

Configuration settings for the AMD AMA (Alveo MA35D) hardware H.264 encoder (ama_h264enc).

public class AMAH264EncoderSettings : IH264EncoderSettings, IVideoEncoder, IMediaBlockSettings, IEncoderTextInfo

Inheritance

Implements

Inherited Members

Remarks

Available on Linux only and requires the AMD AMA Video SDK (kernel driver + GStreamer plugins). Property values are stable across AMA SDK v1.0/v1.1/v1.2. Properties that vary by SDK version are applied best-effort — an absent property on an older SDK build is ignored, not fatal. The encoder consumes device memory, so the SDK inserts an ama_upload element in front of it automatically when the source is in system memory.

Constructors

AMAH264EncoderSettings()

Initializes a new instance of the VisioForge.Core.Types.X.VideoEncoders.AMAH264EncoderSettings class.

public AMAH264EncoderSettings()

AMAH264EncoderSettings(VideoQuality)

Initializes a new instance of the VisioForge.Core.Types.X.VideoEncoders.AMAH264EncoderSettings class with a specified quality level.

public AMAH264EncoderSettings(VideoQuality quality)

Parameters

quality VideoQuality

The video quality level that determines bitrate settings.

Fields

Name

Gets the display name of this encoder.

public static readonly string Name

Field Value

string

Properties

BFrames

Gets or sets the number of B-frames between P-frames (-1..3). -1 (default) = auto.

public int BFrames { get; set; }

Property Value

int

Bitrate

Gets or sets the target bitrate in Kbps. Default 5000 (5 Mbps).

public uint Bitrate { get; set; }

Property Value

uint

Device

Gets or sets the numeric ID of the MA35D device to encode on. -1 (default) auto-selects a card. Use this to pin encoding to a specific Alveo MA35D when several AMD devices are present.

public int Device { get; set; }

Property Value

int

ForcedIDR

Gets or sets a value indicating whether all intra frames are encoded as IDR frames. Default true.

public bool ForcedIDR { get; set; }

Property Value

bool

GOPLength

Gets or sets the maximum I-frame distance (GOP length). -1 (default) = auto.

public int GOPLength { get; set; }

Property Value

int

H264ParseInferTimestamps

Gets or sets h264parse infer-ts setting. Defaults to true. Set to null to use GStreamer default.

public bool? H264ParseInferTimestamps { get; set; }

Property Value

bool?

H264ParsePtsInterpolation

Gets or sets h264parse pts-interpolation setting. Defaults to true.

public bool? H264ParsePtsInterpolation { get; set; }

Property Value

bool?

KeyFrameDetected

Occurs when on key frame detected. Timestamp is in nanoseconds.

public KeyFrameDetectedDelegate KeyFrameDetected { get; set; }

Property Value

KeyFrameDetectedDelegate

LatencyMs

Gets or sets the encoder latency target in milliseconds (-1..60000). -1 (default) = auto.

public int LatencyMs { get; set; }

Property Value

int

LookaheadDepth

Gets or sets the number of future frames analyzed (look-ahead depth). -1 (default) = auto.

public int LookaheadDepth { get; set; }

Property Value

int

MaxBitrate

Gets or sets the maximum (peak) bitrate in Kbps for VBR/CVBR modes. -1 (default) = auto.

public int MaxBitrate { get; set; }

Property Value

int

MaxQP

Gets or sets the maximum allowed QP (0-51). Default 51.

public int MaxQP { get; set; }

Property Value

int

MinQP

Gets or sets the minimum allowed QP (0-51). Default 0.

public int MinQP { get; set; }

Property Value

int

ParseStream

Gets or sets a value indicating whether to parse the video stream. True by default. Disable it for SRT streaming.

public bool ParseStream { get; set; }

Property Value

bool

QP

Gets or sets the fixed quantization parameter used in constant-QP mode. -1 (default) = disabled.

public int QP { get; set; }

Property Value

int

QPBOffset

Gets or sets the QP offset for P/B-frames (-51..51). Default 0.

public int QPBOffset { get; set; }

Property Value

int

QPIOffset

Gets or sets the QP offset for I-frames (-51..51). Default 0.

public int QPIOffset { get; set; }

Property Value

int

QPMode

Gets or sets the QP control mode.

public AMAQPMode QPMode { get; set; }

Property Value

AMAQPMode

RateControl

Gets or sets the rate-control mode.

public AMARateControl RateControl { get; set; }

Property Value

AMARateControl

Slice

Gets or sets which slice (sub-engine) of the selected MA35D device to use. -1 (default) = auto.

public int Slice { get; set; }

Property Value

int

SpatialAQ

Gets or sets a value indicating whether spatial adaptive quantization is enabled. Default true.

public bool SpatialAQ { get; set; }

Property Value

bool

SpatialAQGain

Gets or sets the spatial AQ strength (0-255). Default 255.

public int SpatialAQGain { get; set; }

Property Value

int

TemporalAQ

Gets or sets a value indicating whether temporal adaptive quantization is enabled. Default true.

public bool TemporalAQ { get; set; }

Property Value

bool

TemporalAQGain

Gets or sets the temporal AQ strength (0-255). Default 255.

public int TemporalAQGain { get; set; }

Property Value

int

Tier

Gets or sets the H.264 tier.

public AMATier Tier { get; set; }

Property Value

AMATier

TuneMetrics

Gets or sets the objective quality metric to tune for.

public AMATuneMetrics TuneMetrics { get; set; }

Property Value

AMATuneMetrics

Methods

CreateBlock()

Creates a new H264 encoder block with these settings.

public MediaBlock CreateBlock()

Returns

MediaBlock

A configured VisioForge.Core.MediaBlocks.MediaBlock instance for H264 encoding.

GetCaps()

Gets the GStreamer capabilities string for this encoder.

public string GetCaps()

Returns

string

The output capabilities string.

GetEncoderType()

Gets the type of the encoder.

public H264EncoderType GetEncoderType()

Returns

H264EncoderType

The VisioForge.Core.Types.X.VideoEncoders.H264EncoderType value for the AMA H264 encoder.

GetParameters()

Gets a human-readable representation of the encoder parameters.

public string GetParameters()

Returns

string

A string describing the ama_h264enc parameters.

IsAvailable()

Determines whether this encoder is available on the current machine.

public static bool IsAvailable()

Returns

bool

true if the ama_h264enc and ama_upload elements are present; otherwise, false.

ToString()

Returns a String that represents this instance.

public override string ToString()

Returns

string

A String that represents this instance.