JSPM

ebml-block

1.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 61731
  • Score
    100M100P100Q218115F
  • License MIT

EBML Block Parser

Package Exports

  • ebml-block

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ebml-block) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ebml-block npm dependencies license

EBML Block Parser.

Reads a buffer as a EBML Block Structure, supporting lacing.

install

npm install ebml-block

example

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: [ 
    <Buffer b4 64 1f 0e  ... > 
    <Buffer b4 64 1f 0c  ... > ] }

license

MIT