@astronautlabs/st291
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    @/st291

    npm CircleCI

    📜 ST 291-1:2011
    Ancillary Data Packet and Space Formatting

    📺 Part of the Astronaut Labs Broadcast Suite
    @/is04 | @/rfc8331 | @/rtp | @/scte104 | @/scte35 | @/st2010 | @/st291

    Release Quality
    This library is ready for production


    Implementation of ST 291 in Typescript using @astronautlabs/bitstream

    Summary

    This library provides the ability to read and write SMPTE ST 291 ancillary messages as they appear within the Vertical Ancillary space or other appropriate carriers. It implements 10-bit data words, parity and checksumming to ease implementations. ST 291 packets are used to send various types of data alongside video essence, notably captions, digital cue points, and AFD information.

    Installation

    npm install @astronautlabs/st291
    

    Usage

    This library exposes an element class called Packet that implements the syntax for ST291 packets. You can use BitstreamReader and BitstreamWriter from that package along with this class in order to read and write the packets. For quick usage, you can use serialize/deserialize:

    import * as ST291 from '@astronautlabs/st291';
    
    // read
    let packet = await ST291.Packet.deserialize(buffer);
    
    // write
    buffer = packet.serialize();

    The package also exposes parity() for computing 2-bit parity on an 8-bit data byte and checksum() for computing the 9-bit checksum on a set of 10-bit user data words.

    Keywords

    none

    Install

    npm i @astronautlabs/st291

    DownloadsWeekly Downloads

    7

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    32.3 kB

    Total Files

    36

    Last publish

    Collaborators

    • rezonant