AudioStreamHeaderMetadata#
- class torchcodec.decoders.AudioStreamHeaderMetadata(duration_seconds_from_header: float | None, begin_stream_seconds_from_header: float | None, bit_rate: float | None, codec: str | None, time_base: Fraction | None, stream_index: int, media_type: str, sample_rate: int | None, num_channels: int | None, sample_format: str | None)[source]#
Metadata of a single audio stream, as reported by the container header.
Examples using
AudioStreamHeaderMetadata:- begin_stream_seconds_from_header: float | None#
Beginning of the stream, in seconds, obtained from the header (float or None). Usually, this is equal to 0.
- duration_seconds_from_header: float | None#
Duration of the stream, in seconds, obtained from the header (float or None). This could be inaccurate.
- media_type: str#
Type of media the stream carries (str). One of
"video","audio","subtitle","data","attachment"or"unknown".
- sample_format: str | None#
The original sample format, as described by FFmpeg. E.g. ‘fltp’, ‘s32’, etc.
- time_base: Fraction | None#
a pts of
nmeansn * time_baseseconds. That’s the unit of the integer timestamps of the low-level APIs, likePacket.ptsandRawFrame.pts.- Type:
The unit of the stream’s timestamps, in seconds (Fraction or None)