Skip to content

TranscodeOptions

Namespace: MJCZone.MediaMatic.Models

Assembly: MJCZone.MediaMatic

Summary

Options for transcoding a video to a different format or codec.

public

Contents

Constructors (1) | Methods (4) | Properties (14)

Constructors

TranscodeOptions

csharp
TranscodeOptions()

Methods

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()

Properties

Format

Gets or sets the target video format. Default is MP4.

Type: VideoFormat

Codec

Gets or sets the target video codec. Null means use default for format (H.264 for MP4, VP9 for WebM).

Type: VideoCodec?

Width

Gets or sets the target width (null to maintain original or aspect ratio).

Type: int?

Height

Gets or sets the target height (null to maintain original or aspect ratio).

Type: int?

VideoBitrate

Gets or sets the target video bitrate in kbps. Null means automatic based on resolution.

Type: int?

AudioBitrate

Gets or sets the target audio bitrate in kbps. Null means automatic (typically 128 kbps).

Type: int?

FrameRate

Gets or sets the target frame rate (fps). Null means keep original.

Type: double?

UseHardwareAcceleration

Gets or sets a value indicating whether to use hardware acceleration. Default is false.

Type: bool

Preset

Gets or sets the preset for encoding speed vs quality tradeoff. Options: "ultrafast", "fast", "medium", "slow", "veryslow". Default is "medium".

Type: string

Crf

Gets or sets the Constant Rate Factor (CRF) for quality (0-51, lower is better). 23 is default for H.264, 28 for H.265. Null means use bitrate mode.

Type: int?

TwoPassEncoding

Gets or sets a value indicating whether to use two-pass encoding for better quality. Default is false (single pass).

Type: bool

StripAudio

Gets or sets a value indicating whether to strip audio from the output. Default is false.

Type: bool

StripMetadata

Gets or sets a value indicating whether to strip metadata from the output. Default is false.

Type: bool

OutputPath

Gets or sets the output file path. Null means same directory with new extension.

Type: string?