npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

id3-ts-lib

v1.2.0

Published

An ID3-only MPEG2TS segment generator library.

Downloads

77

Maintainers

rwbarber2rwbarber2aperezbrightcoveaperezbrightcoveireyes94ireyes94brightcove-adminbrightcove-admintedktedkabradley-brightcoveabradley-brightcovebc-alivebc-alivelasanchezclasanchezcmarguinbcmarguinbcbrightcove-userbrightcove-userkmasonkmasoncbarstowcbarstowhikehhikehmyerramallamyerramallapdiaspdiasjwhisenantjwhisenantmfregozomfregozoadavila1adavila1bc-acgarciabc-acgarciarjunerjunefsalazarbcfsalazarbckhaiphamkhaiphamwswanbeckwswanbeckgastafurovgastafurovadalwaniadalwaniekelson-bcoveekelson-bcovesysengsysengmcarreiromcarreirohwoodburyhwoodburyjblakerjblakerbcmauleonbcmauleonpaco_oblea_bcpaco_oblea_bcbiswaranjanbiswaranjanbarroyobarroyobmartinezbmartinezbc-jcarlsonbc-jcarlsoneledezmaeledezmajcuetojcuetoerodrigueserodriguespsousapsousamarcogaraymarcogarayjavibrightjavibrightbcpsalasbcpsalasetobinetobinackbabeackbabeomartinezomartinezmgonzalez_bcmgonzalez_bcpdohertybcovpdohertybcovmuthukumar.bcmuthukumar.bcbzizmondbzizmondjmpmacedojmpmacedoscorreiascorreialescorciolescorciocavieiracavieiraarunjeyaprasadarunjeyaprasadbvilvanathanbvilvanathanrociosantosrociosantosagarciabcovagarciabcovattinderattinderlauralopezlauralopezskumar85skumar85hrodriguez2hrodriguez2jasilvaantoniojasilvaantoniopalvarezbcpalvarezbcericramosericramoscarlosabajocarlosabajoingrid.s.cruzingrid.s.cruzluis_fernando_lopez_ruizluis_fernando_lopez_ruizluis.garcia.brightcoveluis.garcia.brightcoverodrigofdzrodrigofdzpgutierrezgilpgutierrezgilharish17harish17jjeyaprakashjjeyaprakashrrajendran1698rrajendran1698jlomelijlomelisjimenezsjimenezstuartmhstuartmhjherrerabcovjherrerabcovmshiwalmshiwalptamizhptamizhakamalakkannanakamalakkannanroman-bcroman-bcjvaldez1jvaldez1mdeltorobcovmdeltorobcovtnwannatnwannabsahlas.npmbsahlas.npmdherrera1109dherrera1109hswaminathanhswaminathanechengbcechengbcsbarrettbcsbarrettbcldominguezldominguezrtezerartezeraponeill-bcovponeill-bcovv.kozlov_bcv.kozlov_bckreynoldskreynoldsbc-srimron-soutterbc-srimron-soutterjguerrajguerrabgs-devopsbgs-devopsbcmneilbcmneilbcbcliffordbcbcliffordbrianhsubrianhsumcho-bcmcho-bccarredondocarredondokpandiyarajankpandiyarajanlvohralvohrasharanya.muruganandamsharanya.muruganandamm.morrisonm.morrisonamillerbrightcoveamillerbrightcovekevin.schickkevin.schickdsalnikovdsalnikovcloewer_bccloewer_bcdawnpackodawnpackoxgarcia_npmxgarcia_npmawaldronawaldronebertaudebertaudsstevanussstevanusmsivallsmsivallseolveraeolverajuan-sanchezjuan-sanchezjose.luis.sanchezjose.luis.sanchezttabrilla-bcttabrilla-bclmelchorx1lmelchorx1joeyleshjoeyleshpedro-cruzpedro-cruzrsilva_brightcoversilva_brightcoveabarstowbcabarstowbcsbarathansbarathangestrada-brgestrada-bralbertogomezalbertogomezmiklospocsaji_bcmiklospocsaji_bcuomaruomarddashkevichddashkevichwalterseymourbcwalterseymourbcimoronesimoronesnorma.gonzaleznorma.gonzalezjfloresbcjfloresbcaviel_resnickaviel_resnickalexey.kremsaalexey.kremsamlopez.bmlopez.bmelinda.darvasimelinda.darvasialfredo-reyesalfredo-reyesdaniel_camposdaniel_camposskarukamannaskarukamannajterranovajterranovaareis10areis10vmnavarrovmnavarromaraizamaraizaadambertalanbcadambertalanbcgabor.kiacz.brightcovegabor.kiacz.brightcovedgonzalez89dgonzalez89rwingerrwingerssahssahsravan.pbrsravan.pbrapenigalapatiapenigalapatiijunaidfijunaidflmaultsbylmaultsbybcc-bfranklinbcc-bfranklinmgoncalvesmgoncalvesmbalasubramaniammbalasubramaniamhugocjimhugocjimmadhu_gmadhu_gareveloarevelosachin-brightcovesachin-brightcovebc-jcuevasbc-jcuevasimbcmdthimbcmdthgkatsevgkatsev

Keywords

Readme

ID3-TS-LIB

The fat-free ID3-only MPEG2TS segment generator library!

Installation

As a library (into your fancy project):

$> npm install @brightcove/id3-ts-lib

Usage:

const fs = require('fs');

// The whole library exposes just a single function:
const generateID3Segment = require('id3-ts-lib');

// If a PID is falsey, then that track will not be included in the generated PMT
const options = {
  pmtPid: 0x100,
  id3Pid: 0x103,
  videoPid: null,
  audioPid: null,
  id3PTS: 282743,
  data: 'This is just some example payload...',
};

// The function returns a promise that resolves to a buffer
generateID3Segment(options).then((segment) => {
  fs.writeSync('test.ts', segment);
});

As a very rudimentary executable:

$> npm install -g @brightcove/id3-ts-lib

$> id3-ts 'This is just some example payload...' > test.ts

Performance

The entire segment construction process is performed using a single Buffer allocation. All operations are done in place including the ID3-creation which is "chunked" so that the ID3 can be created in-place "around" the TS packet headers. As a result, this code can generate an entire segment for a 4kb payload in about 9.6µs!