Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t6tn4k/node-mpeg2ts-parser
MPEG-2 TS parser in Node.js
https://github.com/t6tn4k/node-mpeg2ts-parser
Last synced: 2 months ago
JSON representation
MPEG-2 TS parser in Node.js
- Host: GitHub
- URL: https://github.com/t6tn4k/node-mpeg2ts-parser
- Owner: t6tn4k
- License: mit
- Created: 2015-09-26T08:57:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-08T11:26:04.000Z (over 9 years ago)
- Last Synced: 2024-09-22T01:13:01.554Z (4 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs-pure-js - node-mpeg2ts-parser - 2 TS parser in Node.js (graphic (图形库))
README
node-mpeg2ts-parser
========MPEG-2 TS parser in Node.js.
## Installation
```shell
$ npm install mpeg2ts-parser
```## Example
```javascript
var fs = require('fs');
var parser = require('mpeg2ts-parser')();var m2ts = fs.createReadStream('foo.m2ts', { encoding: null });
parser.on('data', function(data) {
console.log(data);/* example
{ transport_error_indicator: 0,
payload_unit_start_indicator: 0,
transport_priority: 0,
pid: 511,
transport_scrambling_control: 0,
adaptation_field_control: 2,
continuity_counter: 0,
adaptation_field:
{ adaptation_field_length: 183,
discontinuity_indicator: 0,
random_access_indicator: 0,
elementary_stream_priority_indicator: 0,
pcr_flag: 1,
opcr_flag: 0,
splicing_point_flag: 0,
transport_private_data_flag: 0,
adaptation_field_extension_flag: 0,
program_clock_reference_base: 4827203194,
program_clock_reference_extension: 95 } }
*/
});m2ts.pipe(parser);
```