Skip to content

Transform stream that splits a webm stream into a header buffer and cluster buffers

License

Notifications You must be signed in to change notification settings

mafintosh/webm-cluster-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webm-cluster-stream

Transform stream that splits a webm stream into a header buffer and cluster buffers. Useful if you have a webm live stream and wants to make it seekable. See the webm spec for more info

npm install webm-cluster-stream

Usage

const WCS = require('webm-cluster-stream')
const fs = require('fs')

const cl = new WCS()

cl.once('data', function (header) {
  // first buffer is header
  console.log('header:', header)
  cl.on('data', function (cluster) {
    // next buffers are "Cluster" objects
    console.log('cluster:', cluster)
  })
})

fs.createReadStream('movie.webm').pipe(cl)

License

MIT

About

Transform stream that splits a webm stream into a header buffer and cluster buffers

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published