Skip to content

Latest commit

 

History

History
executable file
·
49 lines (36 loc) · 3.61 KB

README.md

File metadata and controls

executable file
·
49 lines (36 loc) · 3.61 KB

node-eit-ts-extractor

Release NodeJS No Dependencies License:MIT HitCount

MPEG-2 TS packet analyser which enables parsing, decoding and low level analysis of ISO/DVB transport streams.

This PoC purpose was to quickly extract EIT tables for example from a captured DTT transport stream file without having the whole PSI tables also extracted. It can enable the output of those EIT present & following events in JSON format which can be easily used in browser applications.

Usage Example

# node -v
8.15.1

# node eit_extractor.js stream-dvbt.ts
...
TOTAL number of services found: 37
TOTAL number of EIT found: 63
TOTAL time spent: 11s

Note: this one gigabyte TS file has been captured with dvbstream 0.8.2 on the French DTT broadcast network using a Pinnacle USB tuner key.

Benchmarks

Software Version Development language Parsing time ⏱ Note
VLC dvb_print_si 1.4 standard 0:01 Fastest raw parser
(but without EIT only filtering)
DVB inspector 1.10 with Oracle JIT 0:37 Boosted with BufferedInputStream
but not yet with NIO 2.0 API
node-eit-ts-extractor 0.1 under NodeJS v8 0:11 Pretty fast I/O access with C++ AoT
(Chrome V8 engine inside)
0.2 under NodeJS v10+ ? Handling multi-cores CPU
using (NodeJS Clusterworker threads no more experimental)

Note: those benchmarks were done on Ubuntu 16.04 LTS using linux time command on an old Core2Duo (2Ghz) laptop with a 7200rpm HDD formatted in standard ext4 filesystem.

Improvements

  • Add TODO comments
  • Migrate from JShint to ESlint
  • Convert ES5 notation to ES6 with async/await, rest/spread operator, arrow functions, ...
  • Try to use ES6 array destructing assignment within binary extractor methods and some binary structures like construct-js
  • Split the parsing algorithm into pieces that will be sent to Worker threads using NodeJS v10+
  • Test everything on multi-core CPU + SSD (more I/O bandwidth than standard HDD)

Open Source Love Sending a big 🐮 MeuhMeuh to C.Massiot creator of dvb_print_si