Socket
Book a DemoInstallSign in
Socket

aribts

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aribts

MPEG-2 TS Stream Tool for node

1.3.5
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

aribts

MPEG-2 TS Stream Tool for node

Install

npm i --save aribts

Example

This example selects only first pmt.

const aribts = require("aribts");

const readable = fs.createReadStream(process.argv[2]);
const tsStream = new aribts.TsStream({
    transform: true,
    transPmtIds: [0]
});
const writable = fs.createWriteStream(process.argv[3]);

readable.pipe(tsStream);
tsStream.write(writable);

This example emits some info event.

const aribts = require("aribts");

const readable = fs.createReadStream(process.argv[2]);
const tsStream = new aribts.TsStream();

readable.pipe(tsStream);
tsStream.on("data", data => {});

tsStream.on("info", data => {
    console.log("info", data);
});

tsStream.on("drop", pid => {
    console.log("drop", pid);
});

tsStream.on("scrambling", pid => {
    console.log("scrambling", pid);
});

new aribts.TsStream(options)

arguments

  • options
    • transform - boolean Whether or not to select pakcet.
    • skipSize - number Skip packets num.
    • packetSize - number Input packet size (188 only now).
    • bufferSize - number Buffering size.
    • transPmtIds - array PMT IDs using to select packet.
    • transPmtPids - array PMT PIDs using to select packet.
    • transPmtSids - array PMT SIDs using to select packet.
    • transPids - array PIDs using to select packet.

Events

  • packet - (data) Parsed packet object.
  • drop - (pid) Emit when drop is happened.
  • scrambling - (pid) Emit when scrambling is happened.
  • info - (data) TS info object.
  • pat, cat, pmt... - (pid, data) Table object.

FAQs

Package last updated on 03 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.