Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
tests
.gitattributes
.gitignore
License
README.md
binaryHelpers.js
flacParser.js
package.json

README.md

FLAC Audio File Metadata parser

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

Install

npm install flac-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 FLAC = require('flac-parser')
  , stream = require('fs').createReadStream('./my-file.flac')

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

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

Tags

In addition to the normal vorbis comments audio tags metadata the flac parser exposes additional flace info, from the STREAM_INFO block of the file

  • duration
  • minBlockSize
  • maxBlockSize
  • minFrameSize
  • maxFrameSize
  • channels
  • bitsPerSample
  • samplesInStream

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

Something went wrong with that request. Please try again.