small streaming .ogg parser for Node.js
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitattributes
.gitignore
License
README.md
binaryHelpers.js
oggParser.js
package.json

README.md

Ogg Audio File Metadata parser

A simple streaming parser for retrieving metadata from an .OGG file.

Install

npm install ogg-parser

Use

The parser is simply a stream in objectMode, so you can pipe and binary data into it and it will spit out tag objects.

var OGG = require('ogg-parser')
  , stream = require('fs').createReadStream('./my-file.ogg')

var parser = stream.pipe(new OGG());

parser.on('data', function(tag){
    console.log(tag.type)  // => 'bitRateNominal'
    console.log(tag.value) // => 128000
})

Tags

In addition to the normal vorbis comments metadata the Ogg parser exposes additional stream info

  • version
  • sampleRate
  • channels
  • bitRateMax
  • bitRateMin
  • bitRateNominal
  • duration

consult the vorbis parser (used internally for comments) documentation for more information