Show / Hide Table of Contents

Struct OutputFormat

Represents an output format in the FFmpeg library.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: FFmpeg.Formats
Assembly: FFmpeg.dll
Syntax
public readonly struct OutputFormat
Remarks

This struct provides access to various properties and methods related to output formats, including supported codecs, default codecs, and format flags.

Properties

View Source

AAC

Gets the ADTS AAC output format (Advanced Audio Coding).

Declaration
public static OutputFormat? AAC { get; }
Property Value
Type Description
OutputFormat?
View Source

ALAC

Gets the Apple Lossless Audio Codec (ALAC) output format.

Declaration
public static OutputFormat? ALAC { get; }
Property Value
Type Description
OutputFormat?
View Source

APNG

Gets the APNG output format.

Declaration
public static OutputFormat? APNG { get; }
Property Value
Type Description
OutputFormat?
View Source

ASS

Gets the SSA (SubStation Alpha) subtitle output format.

Declaration
public static OutputFormat? ASS { get; }
Property Value
Type Description
OutputFormat?
View Source

AVI

Gets the AVI output format.

Declaration
public static OutputFormat? AVI { get; }
Property Value
Type Description
OutputFormat?
View Source

AVIF

Gets the AVIF output format (AV1 Image File Format).

Declaration
public static OutputFormat? AVIF { get; }
Property Value
Type Description
OutputFormat?
View Source

BMP

Gets the BMP output format (Bitmap).

Declaration
public static OutputFormat? BMP { get; }
Property Value
Type Description
OutputFormat?
View Source

BMP_Pipe

Gets the piped BMP output format.

Declaration
public static OutputFormat? BMP_Pipe { get; }
Property Value
Type Description
OutputFormat?
View Source

DASH

Gets the DASH (Dynamic Adaptive Streaming over HTTP) output format.

Declaration
public static OutputFormat? DASH { get; }
Property Value
Type Description
OutputFormat?
View Source

DefaultAudioCodec

Gets the default audio codec for this output format.

Declaration
public CodecID DefaultAudioCodec { get; }
Property Value
Type Description
CodecID
Remarks

This represents the codec used for audio streams by default when the format is selected.

View Source

DefaultSubtitleCodec

Gets the default subtitle codec for this output format.

Declaration
public CodecID DefaultSubtitleCodec { get; }
Property Value
Type Description
CodecID
Remarks

This represents the codec used for subtitle streams by default when the format is selected.

View Source

DefaultVideoCodec

Gets the default video codec for this output format.

Declaration
public CodecID DefaultVideoCodec { get; }
Property Value
Type Description
CodecID
Remarks

This represents the codec used for video streams by default when the format is selected.

View Source

Extensions

Gets a read-only list of file extensions associated with the output format.

Declaration
public IReadOnlyList<string> Extensions { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

File extensions are used to identify files of this format. This property retrieves and splits the extensions from a comma-separated string. Returns an empty list if no extensions are available.

View Source

FLAC

Gets the FLAC output format (Free Lossless Audio Codec).

Declaration
public static OutputFormat? FLAC { get; }
Property Value
Type Description
OutputFormat?
View Source

FLV

Gets the Flash Video output format.

Declaration
public static OutputFormat? FLV { get; }
Property Value
Type Description
OutputFormat?
View Source

Flags

Gets the flags associated with this output format.

Declaration
public FormatFlags Flags { get; }
Property Value
Type Description
FormatFlags
Remarks

Format flags provide information about the capabilities and properties of the format, such as whether it supports certain features or has specific characteristics.

View Source

GIF

Gets the GIF output format (CompuServe Graphics Interchange Format).

Declaration
public static OutputFormat? GIF { get; }
Property Value
Type Description
OutputFormat?
View Source

HLS

Gets the HTTP Live Streaming (HLS) output format.

Declaration
public static OutputFormat? HLS { get; }
Property Value
Type Description
OutputFormat?
View Source

JPEG

Gets the JPEG output format (Joint Photographic Experts Group).

Declaration
public static OutputFormat? JPEG { get; }
Property Value
Type Description
OutputFormat?
View Source

JPEGXL

Gets the JPEG XL output format.

Declaration
public static OutputFormat? JPEGXL { get; }
Property Value
Type Description
OutputFormat?
View Source

JPEG_Pipe

Gets the piped JPEG output format.

Declaration
public static OutputFormat? JPEG_Pipe { get; }
Property Value
Type Description
OutputFormat?
View Source

LongName

Gets the long name of the output format.

Declaration
public string LongName { get; }
Property Value
Type Description
string
Remarks

The long name provides a more descriptive name for the format compared to the short name.

View Source

MKV

Gets the Matroska output format.

Declaration
public static OutputFormat? MKV { get; }
Property Value
Type Description
OutputFormat?
View Source

MOV

Gets the MOV output format (QuickTime / MOV).

Declaration
public static OutputFormat? MOV { get; }
Property Value
Type Description
OutputFormat?
View Source

MP3

Gets the MP3 output format (MPEG audio layer 3).

Declaration
public static OutputFormat? MP3 { get; }
Property Value
Type Description
OutputFormat?
View Source

MP4

Gets the MP4 output format (MPEG-4 Part 14).

Declaration
public static OutputFormat? MP4 { get; }
Property Value
Type Description
OutputFormat?
View Source

MPEG

Gets the MPEG output format (MPEG-1 Systems / MPEG program stream).

Declaration
public static OutputFormat? MPEG { get; }
Property Value
Type Description
OutputFormat?
View Source

MPEGTS

Gets the MPEG-TS output format (MPEG-2 Transport Stream).

Declaration
public static OutputFormat? MPEGTS { get; }
Property Value
Type Description
OutputFormat?
View Source

MimeTypes

Gets a read-only list of MIME types associated with the output format.

Declaration
public IReadOnlyList<string> MimeTypes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

MIME types represent the media type of the format and are useful for content negotiation. This property retrieves and splits the MIME types from a comma-separated string.

View Source

NULL

Gets the NULL output format.

Declaration
public static OutputFormat? NULL { get; }
Property Value
Type Description
OutputFormat?
View Source

OGA

Gets the Oga output format.

Declaration
public static OutputFormat? OGA { get; }
Property Value
Type Description
OutputFormat?
View Source

OGG

Gets the Ogg output format.

Declaration
public static OutputFormat? OGG { get; }
Property Value
Type Description
OutputFormat?
View Source

OGV

Gets the Ogv output format.

Declaration
public static OutputFormat? OGV { get; }
Property Value
Type Description
OutputFormat?
View Source

PNG

Gets the PNG output format (Portable Network Graphics).

Declaration
public static OutputFormat? PNG { get; }
Property Value
Type Description
OutputFormat?
View Source

PNG_Pipe

Gets the piped PNG output format.

Declaration
public static OutputFormat? PNG_Pipe { get; }
Property Value
Type Description
OutputFormat?
View Source

SRT

Gets the SubRip subtitle output format.

Declaration
public static OutputFormat? SRT { get; }
Property Value
Type Description
OutputFormat?
View Source

ShortName

Gets the short name of the output format.

Declaration
public string ShortName { get; }
Property Value
Type Description
string
Remarks

The short name is a concise identifier for the format, often used for quick reference.

View Source

SupportedCodecs

Gets the list of supported codecs for this output format.

Declaration
public IReadOnlyList<CodecTag> SupportedCodecs { get; }
Property Value
Type Description
IReadOnlyList<CodecTag>
Remarks

This property iterates through the codec tags associated with the format to collect the supported codec IDs.

View Source

TIFF

Gets the TIFF output format (Tagged Image File Format).

Declaration
public static OutputFormat? TIFF { get; }
Property Value
Type Description
OutputFormat?
View Source

TIFF_Pipe

Gets the piped TIFF output format.

Declaration
public static OutputFormat? TIFF_Pipe { get; }
Property Value
Type Description
OutputFormat?
View Source

WAV

Gets the WAV output format (Waveform Audio).

Declaration
public static OutputFormat? WAV { get; }
Property Value
Type Description
OutputFormat?
View Source

WEBM

Gets the WebM output format.

Declaration
public static OutputFormat? WEBM { get; }
Property Value
Type Description
OutputFormat?
View Source

WebP

Gets the WebP output format.

Declaration
public static OutputFormat? WebP { get; }
Property Value
Type Description
OutputFormat?

Methods

View Source

FindFormat(string)

Finds an output format by its short name.

Declaration
public static OutputFormat? FindFormat(string short_name)
Parameters
Type Name Description
string short_name

The short name of the output format.

Returns
Type Description
OutputFormat?

An OutputFormat instance if found; otherwise, null.

View Source

GetOutputFormats()

Retrieves a collection of available AV output formats.

Declaration
public static IReadOnlyList<OutputFormat> GetOutputFormats()
Returns
Type Description
IReadOnlyList<OutputFormat>

An IReadOnlyList<T> containing all available output formats.

Remarks

This method uses the FFmpeg library to iterate through all available muxers and collects them into a list of OutputFormat objects.

View Source

GuessOutputFormat(string?, string?, string?)

Guesses an output format based on the provided parameters.

Declaration
public static OutputFormat? GuessOutputFormat(string? short_name = null, string? filename = null, string? mime_type = null)
Parameters
Type Name Description
string short_name

The short name of the format.

string filename

The filename to guess the format from.

string mime_type

The MIME type to guess the format from.

Returns
Type Description
OutputFormat?

An OutputFormat instance if found; otherwise, null.

View Source

ToString()

Returns a string representation of the output format.

Declaration
public override string ToString()
Returns
Type Description
string

The LongName of the output format.

Overrides
ValueType.ToString()
  • View Source
In this article
Back to top Generated by DocFX