Stream Types

Enumerations for stream and media types.

StreamType

class avblocks.StreamType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Defines major audio and video stream types, and file formats (a.k.a. containers).

AAC = 4105

Advanced Audio Coding. Initially it was defined in Part 7 of the MPEG-2 standard (known formally as ISO/IEC 13818-7) which is now obsolete. Currently it is defined in Part 3 of the MPEG-4 standard (known formally as ISO/IEC 14496-3).

AC3 = 4101

Dolby Digital Audio (a.k.a. AC-3). AC-3 is defined in ATSC A/52-A and A/52-B.

ALAW_PCM = 4098

A-law PCM.

AMRNB = 4106

Adaptive Multi-Rate audio (Narrow Band).

AMRWB = 4107

Adaptive Multi-Rate audio (Wide Band).

ASF = 12291

Advanced Systems Format (formerly Advanced Streaming Format, Active Streaming Format) (ASF).

AVC = 8199

Alias. Same as H264.

AVI = 12289

Audio Video Interleave (AVI) multimedia container format.

AVS = 8203

Advanced Video Standard (Chinese national standard)

BEGIN_AUDIO = 4096

This constant marks the start of audio elementary streams. It is not a valid stream type on its own.

BEGIN_CONTAINER = 12288

This constant marks the start of file formats (a.k.a. containers). It is not a valid stream type on its own.

BEGIN_DATA = 20480

This constant marks the start of various data types. It is not a valid stream type on its own.

BEGIN_IMAGE = 16384

This constant marks the start of image types. It is not a valid stream type on its own.

BEGIN_VIDEO = 8192

This constant marks the start of video elementary streams. It is not a valid stream type on its own.

BMP = 16385

BMP image.

DTS = 4102

DTS (Digital Theater Systems) Coherent Acoustics codec, transportable through S/PDIF and used on DVDs, CD-DAs, LDs, and in wave files.

END_AUDIO = 8191

This constant marks the end of audio elementary streams. It is not a valid stream type on its own.

END_CONTAINER = 16383

This constant marks the end of audio/video containers. It is not a valid stream type on its own.

END_DATA = 24575

This constant marks the end of various data types. It is not a valid stream type on its own.

END_IMAGE = 20479

This constant marks the end of image types. It is not a valid stream type on its own.

END_VIDEO = 12287

This constant marks the end of the elementary video streams. It is not a valid stream type on its own.

FLV = 12296

Adobe Flash Video container format (FLV). This should not be confused with F4V which is a newer Flash Video container format based on ISO/IEC 14496-12 (MPEG-4 Part 12).

G726_ADPCM = 4108

G.726 ITU-T ADPCM.

GIF = 16389

GIF image.

H261 = 8197

H.261 Video is defined in the ITU-T H.261 standard.

H263 = 8198

H.263 Video is defined in the ITU-T H.263 standard.

H264 = 8199

H.264 Video (also known as MPEG-4 AVC / Advanced Video Codec). Defined in Part 10 of the MPEG-4 standard (known formally as ISO/IEC 14496-10 and as ITU-T H.264).

H265 = 8206

H.265 Video (also known as MPEG-H HEVC / High Efficiency Video Codec) Defined in Part 2 of the MPEG-H standard (known formally as ISO/IEC 23008-2 and as ITU-T H.265).

HEVC = 8206

Alias. Same as H265.

IVF = 12299

IVF (Interactive Video Format) is a simple file format that transports raw VP8, VP9, and AV1 video only.

JPEG = 16387

JPEG image.

LPCM = 4097

Audio encoded using pulse code modulation (PCM) with linear quantization.

MJPEG = 8201

Motion JPEG (M-JPEG).

MP4 = 12290

2003).

Type:

MPEG-4 multimedia container format specified in Part 14 of the MPEG-4 standard (formally ISO/IEC 14496-14

MPEG1_Video = 8194

MPEG-1 Video is defined in Part 2 of the MPEG-1 standard (known formally as ISO/IEC-11172-2).

MPEG2_Video = 8195

MPEG-2 Video is defined in Part 2 of the MPEG-2 standard (known formally as ISO/IEC 13818-2 and as ITU-T H.262).

MPEG4_Video = 8196

MPEG-4 Video is defined in Part 2 of the MPEG-4 standard (known formally as ISO/IEC 14496-2).

MPEG_Audio = 4103

MPEG-1 or MPEG-2 Audio, Layer I, II and III.

MPEG_PES = 12294

MPEG Packetized Elementary Stream (PES).

MPEG_PS = 12292

MPEG Program Stream.

MPEG_PSI_PACKETS = 20482

MPEG Transport Stream Program Specific Information

MPEG_TS = 12293

MPEG Transport Stream.

MPEG_TS_PACKETS = 20483

MPEG Transport Stream packets. This is not a complete transport stream but rather a subset of the complete transport stream.

MULAW_PCM = 4099

Mu-law PCM.

OGG = 12297

Open standard container format developed by the Xiph.Org Foundation.

PNG = 16386

PNG image.

TIFF = 16388

TIFF image.

Teletext = 20481

Teletext data.

Theora = 8205

Theora Video Codec. This is an open standard video codec developed by the Xiph.Org Foundation.

UncompressedVideo = 8193

Uncompressed video stream.

Unknown = 0

The stream type is not defined or is unknown.

VC1 = 8202

VC-1 Video is defined in the SMPTE 421M-2006 standard.

VIDEO_DVD_PCM = 4100

LPCM with specific sample packing for Video-DVD.

VP8 = 8204

VP8 is an open video codec released by Google, originally created by On2 Technologies. VP8 is part of the WebM format.

Vorbis = 4104

Vorbis Audio Codec. This is an open standard audio codec developed by the Xiph.Org Foundation.

WAVE = 12295

Waveform Audio file format (WAV, WAVE).

WMA = 4109

Microsoft Windows Media Audio.

WMA_Lossless = 4111

Microsoft Windows Media Audio Lossless.

WMA_Professional = 4110

Microsoft Windows Media Audio Professional.

WMV = 8200

Microsoft Windows Media Video.

WebM = 12298

Open standard container format released by Google and based on a profile of Matroska.

StreamSubType

class avblocks.StreamSubType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Defines audio and video stream subtypes.

AAC_ADIF = 2

AAC data with a single header. Worst compliance. Defined in Part 7 of the MPEG-2 standard (known formally as ISO/IEC 13818-7).

Type:

Audio Data Interchange Format

AAC_ADTS = 1

AAC data in frames, similar to mp3. Somewhat compliant. Defined in Part 7 of the MPEG-2 standard (known formally as ISO/IEC 13818-7).

Type:

Audio Data Transport Stream

AAC_MP4 = 3

AAC data packed in MPEG-4 container (MP4). Best compliance.

AAC_RAW = 14

AAC data is stored without headers.

Type:

Raw AAC data format

AVC1 = 4

Alias. Same as AVCC.

AVCC = 4

H.264/AVC bitstream without start codes. This is how the bitstream is stored in a MPEG-4 container (MP4). Instead of start codes, each NALU is prefixed by a length field, which gives the length of the NALU in bytes. The size of the length field can vary, but is typically 1, 2, or 4 bytes. Defined in ISO 14496-15.

AVC_Annex_B = 13

H.264 bitstream with start codes (Annex B of ITU-T Rec. H.264). H.264 bitstreams are transmitted in this format over the air, or contained in MPEG-2 program or transport streams. The H.264 bitstream is formatted as described in Annex B of ITU-T Rec. H.264. According to this specification, the bitstream consists of a sequence of NALUs (Network Abstraction Layer Units). Each NALU is prefixed with a start code equal to 0x000001 or 0x00000001.

G726_AAL2 = 10

G.726 stream packed according to ITU-T I.366.2 (AAL type 2). This type of packetization is used in Wave files.

G726_PACKED_AAL2 = 10

Alias. Same as G726_AAL2.

G726_PACKED_RFC3551 = 9

Alias. Same as G726_RFC3551.

G726_RFC3551 = 9

G.726 stream packed according to RFC 3551. This type of packetization is used in RTP.

MPEG1_System = 11

MPEG-1 Program Stream as specified in MPEG-1 Part 1 (ISO/IEC 11172-1). This stream subtype can be used only with the MPEG_PS stream type.

MPEG2_System = 12

MPEG-2 Program Stream as specified in MPEG-2 Part 1 (ISO/IEC 13818-1). This stream subtype can be used only with the MPEG_PS stream type.

MPEG_Audio_Layer1 = 6

MPEG-1 Audio Layer I is commonly abbreviated to MP1. MPEG-1 Layer I is defined in ISO/IEC 11172-3. MPEG-2 Layer I is defined in the MPEG-2 Part 3 standard (known formally as ISO/IEC 13818-3).

MPEG_Audio_Layer2 = 7

MPEG-1 Audio Layer II is commonly abbreviated to MP2. MP2 is a dominant standard for audio broadcasting. MPEG-1 Layer II is defined in ISO/IEC 11172-3. MPEG-2 Layer II is defined in the MPEG-2 Part 3 standard (known formally as ISO/IEC 13818-3).

MPEG_Audio_Layer3 = 8

MPEG-1 Audio Layer III is commonly abbreviated to MP3. MPEG-1 Layer III is defined in ISO/IEC 11172-3. MPEG-2 Layer III is defined in the MPEG-2 Part 3 standard (known formally as ISO/IEC 13818-3).

MPEG_TS_BDAV = 5

MPEG2 transport stream with valid packet time stamps.

None_ = 65535

No stream sub type is defined.

Unknown = 0

The stream subtype is not defined or is unknown.

MediaType

class avblocks.MediaType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Defines media types.

Audio = 1

Audio data.

Data = 4

Generic data.

Text = 3

Text data.

Unknown = 0

The media type is unknown or not specified.

Video = 2

Video data.