New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

m2ts-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m2ts-stream

入力ストリームから流れてくるバイナリデータをm2tsパケットに分割して出力ストリームに流します. m2tsのパケットサイズは入力バイナリから自動で特定します.

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

node-m2ts-stream

入力ストリームから流れてくるバイナリデータをm2tsパケットに分割して出力ストリームに流します.
m2tsのパケットサイズは入力バイナリから自動で特定します.

インストール

npm install m2ts-stream

使い方

詳しくはexample参照

var M2TsStream = require('m2ts-stream');
var m2TsStream = new M2TsStream();
var fs = require('fs');
var inputStream = fs.createReadStream('hoge.ts');

inputStream.pipe(m2TsStrem).on('data', function (rawTsPacket) {
    console.log(rawTsPacket);
});

// PIDが0のものだけを取得する
m2TsStream.include(0x0).on(/**/);

// PIDが0のものを除外する
m2TsStream.exclude(0x0).on(/**/);

// スクランブルされたパケットを廃棄してファイルに書き込む
m2TsStream
    .parse()
    .where(function (tsPacket) {
        return !tsPacket.isScrambled;
    })
    .unparse()
    .pipe(fs.createWriteStream('hoge2.ts'));

Keywords

m2ts

FAQs

Package last updated on 27 Jul 2015

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