VideoLAN, a project and a non-profit organization.

biTStream

biTStream is a set of C headers allowing simpler access to binary structures such as those specified by MPEG, DVB, IETF, SMPTE, IEEE, SCTE, etc.

biTStream vs. libdvbpsi

libdvbpsi converts binary structures to C structures. Lists are implemented with chained lists of C structures.

biTStream is lower level and more efficient: fewer memory allocations, fewer memory copies. It also features a better separation between layers and specifications.

Current features

biTStream currently implements the following specifications:

  • ISO/IEC 13818-1 (MPEG-2 systems)
  • ISO/IEC 13818-2 (MPEG-2 video)
  • ISO/IEC 13818-3 (MPEG-2 audio)
  • ISO/IEC 14496-3 (MPEG-4 advanced audio coding)
  • ISO/IEC 14496-10 (MPEG-4 advanced video coding)
  • ITU-T H.265 (high-efficiency video coding)
  • ATSC A/52
  • ETSI EN 300 468 (Service Information in DVB systems)
  • ETSI EN 50 221 (Common Interface Specification)
  • ETSI TS 103 194 (DVB Simulcrypt)
  • IETF RFC 3550 (Real Time Protocol)
  • IETF RFC 2250 (Real Time Protocol for MPEG-1/2 audio/video)
  • IETF RFC 3611 (Real Time Control Protocol Extended Reports)
  • SMPTE 2022-1 (Forward Error Correction)
  • SMPTE 2022-6 (hbrmt)
  • SMPTE 291 (Ancillary Data Packet and Space Formatting)
  • SMPTE 352 (Payload Identification)
  • SMPTE 337 (Non-PCM data in AES3)
  • IEEE 802.3 (Ethernet frames)
  • SCTE-35 (Splice Information Table)
  • SCTE-104 (Automation to Compression Communications API)

In particular it supports the following MPEG and DVB structures (parsers and writers):

  • Program Allocation Table (PAT)
  • Conditional Access Table (CAT)
  • Transport Stream Descriptor Table (TSDT)
  • Program Map Table (PMT)
  • Network Information Table (NIT)
  • Bouquet Association Table (BAT)
  • Service Definition Table (SDT)
  • Event Information Table (EIT)
  • Time and Date Table (TDT)
  • Time Offset Table (TOT)
  • Running Status Table (RST)
  • Stuffing Table (ST)
  • Discontinuity Information Table (DIT)
  • Selection Information Table (SIT)
  • MPEG descriptors 0x02 to 0x12 and 0x1b to 0x2c
  • DVB descriptors 0x40 to 0x6e and 0x7a to 0x7c

Get biTStream

The latest release is version 1.6.

git clone https://code.videolan.org/videolan/bitstream.git

All releases can be found by browsing the releases directory. Browse the source online.

Extending biTStream

Many MPEG and DVB tables and descriptors are not implemented yet, or are incomplete. Patches are very welcome.

Though biTStream is originally targeted at video applications in general and MPEG-2 transport streams in particular, the same principle can be followed with other binary data types — patches welcome there too. Please follow a coherent directory naming.

biTStream is released under the MIT license because, since it is a direct application of standards, there is no added value. The MIT license doesn’t require you to contribute back your changes, and you can use biTStream in proprietary applications. However, if you add new structures, or fix bugs in current structures, you’d be very nice to contribute them (again, there is no point in concealing this). Thanks.

Contributions can be sent as pull requests in our GitHub repository.

Mailing list

A dedicated mailing list is available — subscribe via the mailing-lists page.