https://github.com/mathiasvr/ebml-block
EBML Block Parser
https://github.com/mathiasvr/ebml-block
ebml matroska
Last synced: 12 months ago
JSON representation
EBML Block Parser
- Host: GitHub
- URL: https://github.com/mathiasvr/ebml-block
- Owner: mathiasvr
- License: mit
- Created: 2016-07-05T23:27:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T19:08:09.000Z (over 7 years ago)
- Last Synced: 2024-08-09T17:51:38.396Z (almost 2 years ago)
- Topics: ebml, matroska
- Language: JavaScript
- Size: 8.79 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ebml-block [![npm][npm-img]][npm-url] [![dependencies][dep-img]][dep-url] [![license][lic-img]][lic-url]
[npm-img]: https://img.shields.io/npm/v/ebml-block.svg
[npm-url]: https://www.npmjs.com/package/ebml-block
[dep-img]: https://david-dm.org/mathiasvr/ebml-block.svg
[dep-url]: https://david-dm.org/mathiasvr/ebml-block
[lic-img]: http://img.shields.io/:license-MIT-blue.svg
[lic-url]: http://mvr.mit-license.org
EBML Block Parser.
Reads a buffer as a [EBML Block Structure](https://www.matroska.org/technical/specs/index.html#block_structure), supporting lacing.
## install
```
npm install ebml-block
```
## example
```javascript
const fs = require('fs')
const ebml = require('ebml')
const ebmlBlock = require('ebml-block')
var decoder = new ebml.Decoder()
decoder.on('data', function (chunk) {
if (chunk[1].name === 'Block' || chunk[1].name === 'SimpleBlock') {
var block = ebmlBlock(chunk[1].data)
console.log(block)
}
})
fs.createReadStream('media.mkv').pipe(decoder)
```
### output format
```
{ trackNumber: 1,
timecode: 542,
invisible: false,
keyframe: false,
discardable: true,
frames: [
] }
```
## license
MIT