mpegts-demuxer
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    TV Kitchen Utility: MPEG-TS Demuxer

    This package demuxes packets from an MPEG transport stream.

    It is a modified fork of the excellent TSDemuxer package created by Logan Kearsley. The overall project was started as a JavaScript / TypeScript implementation of Anton Burdinuk's C++ MPEG-TS demuxer.

    How to Use

    The MpegTsDemuxer is a NodeJS Transform stream which means it supports the Read and Write stream APIs. It consumes raw mpegts data as a stream and emits Packet objects as they are parsed.

    import { MpegTsDemuxer } from 'mpegts-demuxer'
    import { createReadStream } from 'fs'
    
    const fileStream = fs.createReadStream('myFile.ts')
    const mpegTsDemuxer = new MpegTsDemuxer()
    fileStream.pipe(mpegTsDemuxer)
    mpegTsDemuxer.on('data', (packet) => {
    	console.log(packet)
    })
    

    References

    If you want to understand the technical specifications related to demuxing MPEG-TS streams can check out the spec directly.

    About the TV Kitchen

    TV Kitchen is a project of Bad Idea Factory. Learn more at the TV Kitchen project site.

    Participating

    TV Kitchen is an open source project, and we welcome contributions of any kind.

    Thank you for considering, and before diving in please follow these steps:

    Install

    npm i mpegts-demuxer

    DownloadsWeekly Downloads

    5

    Version

    0.1.0

    License

    LGPL-3.0

    Unpacked Size

    49.9 kB

    Total Files

    49

    Last publish

    Collaborators

    • slifty