Skip to content

jquense/flac-info-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published