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
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
See Also
AVStream

Properties

Codec

The codec of the media.

public AVCodecID Codec { get; }

Property Value

AVCodecID
See Also
AVStream

Duration

The duration of the media this stream belongs to.

public TimeSpan Duration { get; }

Property Value

TimeSpan
See Also
AVStream

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>
See Also
AVStream

Type

The type of this stream.

public abstract FFMpegStreamType Type { get; }

Property Value

FFMpegStreamType
See Also
AVStream

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
See Also
AVStream

TimestampToTime(long)

Converts a timestamp to a real-time value.

public TimeSpan TimestampToTime(long timestamp)

Parameters

timestamp long

Returns

TimeSpan
See Also
AVStream

See Also

AVStream