Show / Hide Table of Contents

Struct SubtitleRect

Represents a rectangular subtitle area and its associated metadata, such as position, size, color count, and text or bitmap data. This struct wraps an FFmpeg.AutoGen._AVSubtitleRect pointer from FFmpeg.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: FFmpeg.Subtitles
Assembly: FFmpeg.dll
Syntax
public struct SubtitleRect

Properties

View Source

ASS

Gets or sets the ASS/SSA formatted subtitle content. This field is used for complex, formatted subtitles (e.g., with styling, positioning).

Declaration
public string ASS { get; set; }
Property Value
Type Description
string
View Source

BitmapData

Gets a span over the bitmap data associated with the subtitle. This span references up to 4 planes of image data for bitmap subtitles.

Declaration
public Span<nint> BitmapData { get; }
Property Value
Type Description
Span<nint>
View Source

ColorCount

Gets or sets the number of colors in the subtitle rectangle's color palette. This is only applicable for bitmap subtitles.

Declaration
public int ColorCount { get; set; }
Property Value
Type Description
int
View Source

Height

Gets or sets the height of the subtitle rectangle.

Declaration
public int Height { get; set; }
Property Value
Type Description
int
View Source

LineSize

Gets a span over the line sizes (stride) for each plane of the bitmap data. This span is used to determine how many bytes each line of the bitmap takes.

Declaration
public Span<int> LineSize { get; }
Property Value
Type Description
Span<int>
View Source

Text

Gets or sets the plain text subtitle content. This is typically used for simple, unformatted subtitles.

Declaration
public string Text { get; set; }
Property Value
Type Description
string
View Source

Type

Gets or sets the type of the subtitle, indicating whether the subtitle is a bitmap, plain text, or formatted text (e.g., ASS).

Declaration
public SubtitleType Type { get; set; }
Property Value
Type Description
SubtitleType
View Source

Width

Gets or sets the width of the subtitle rectangle.

Declaration
public int Width { get; set; }
Property Value
Type Description
int
View Source

X

Gets or sets the X-coordinate of the top-left corner of the subtitle rectangle.

Declaration
public int X { get; set; }
Property Value
Type Description
int
View Source

Y

Gets or sets the Y-coordinate of the top-left corner of the subtitle rectangle.

Declaration
public int Y { get; set; }
Property Value
Type Description
int

Methods

View Source

ToString()

Returns a string representation of the subtitle. If plain text is present, it will return that; otherwise, it returns the ASS-formatted content.

Declaration
public override string ToString()
Returns
Type Description
string

The plain text or ASS subtitle content as a string.

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