Table of Contents

Class FFmpegStream

Namespace
Stride.Video.FFmpeg
Assembly
Stride.Video.dll

Represents a single stream from a FFmpeg media.

public abstract class FFmpegStream
Inheritance
object
FFmpegStream
Derived

Constructors

FFmpegStream(AVStream*, FFmpegMedia)

Initializes a new instance of the FFmpegStream class.

protected FFmpegStream(AVStream* pStream, FFmpegMedia media)

Parameters

pStream AVStream*
media FFmpegMedia

Properties

Codec

The codec of the media.

public AVCodecID Codec { get; }

Property Value

AVCodecID

Duration

The duration of the media this stream belongs to.

public TimeSpan Duration { get; }

Property Value

TimeSpan

Index

The index of this stream in the associated format context.

public int Index { get; }

Property Value

int
See Also
AVFormatContext

Metadata

public IReadOnlyDictionary<string, string> Metadata { get; }

Property Value

IReadOnlyDictionary<string, string>

Type

The type of this stream.

public abstract FFMpegStreamType Type { get; }

Property Value

FFMpegStreamType

Methods

Create(AVStream*, FFmpegMedia)

Creates a new instance of FFmpegStream from the provided pStream.

public static FFmpegStream Create(AVStream* pStream, FFmpegMedia media)

Parameters

pStream AVStream*

A pointer to the underlying stream.

media FFmpegMedia

The media containing this stream.

Returns

FFmpegStream

Remarks

The actual type of the returned instance depends on the type of stream.

See Also

TimeToTimestamp(TimeSpan)

Converts a real-time value to the corresponding timestamp.

public long TimeToTimestamp(TimeSpan time)

Parameters

time TimeSpan

Returns

long

TimestampToTime(long)

Converts a timestamp to a real-time value.

public TimeSpan TimestampToTime(long timestamp)

Parameters

timestamp long

Returns

TimeSpan

See Also

AVStream