> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pixeltable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StreamMetadata

> <a href="https://github.com/pixeltable/pixeltable/blob/main/pixeltable/functions/util.py#L56" id="viewSource" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/View%20Source%20on%20Github-blue?logo=github&labelColor=gray" alt="View Source on GitHub" style={{ display: 'inline', margin: '0px' }} noZoom /></a>

# <span style={{ 'color': 'gray' }}>class</span>  pixeltable.functions.StreamMetadata

Metadata for a stream within a media container.

## <span style={{ 'color': 'gray' }}>attr</span>  average\_rate

```
average_rate: float | None
```

Average frame rate in FPS (frames per second). Present only for video streams.

## <span style={{ 'color': 'gray' }}>attr</span>  base\_rate

```
base_rate: float | None
```

Base (constant) frame rate in FPS. Present only for video streams.

## <span style={{ 'color': 'gray' }}>attr</span>  codec\_context

```
codec_context: CodecContextMetadata
```

Codec information for this stream.

## <span style={{ 'color': 'gray' }}>attr</span>  duration

```
duration: int | None
```

Stream duration in `time_base` units, or `None` if unknown.

## <span style={{ 'color': 'gray' }}>attr</span>  duration\_seconds

```
duration_seconds: float | None
```

Stream duration in seconds, computed from `duration` and `time_base`.

## <span style={{ 'color': 'gray' }}>attr</span>  frames

```
frames: int
```

Number of frames in the stream (may be 0 if unknown).

## <span style={{ 'color': 'gray' }}>attr</span>  guessed\_rate

```
guessed_rate: float | None
```

Guessed frame rate in FPS. Present only for video streams.

## <span style={{ 'color': 'gray' }}>attr</span>  height

```
height: int
```

Frame height in pixels. Present only for video streams.

## <span style={{ 'color': 'gray' }}>attr</span>  metadata

```
metadata: dict[str, str]
```

Additional stream-specific metadata tags (e.g. language, title).

## <span style={{ 'color': 'gray' }}>attr</span>  time\_base

```
time_base: float | None
```

Time base of the stream as a float (seconds per tick), or `None` if unknown.

## <span style={{ 'color': 'gray' }}>attr</span>  type

```
type: str
```

Stream type: typically `'audio'` or `'video'`. Other stream types (e.g. subtitles) will have a
`StreamMetadata` entry, but with no metadata other than `type`.

## <span style={{ 'color': 'gray' }}>attr</span>  width

```
width: int
```

Frame width in pixels. Present only for video streams.
