New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mpeg-frame-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpeg-frame-parser

small mpeg audio frame metadata stream

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

MPEG File Frame parser

A simple streaming parser for parsing out mpeg audio frame metadata, such as bitrate, sample rate, etc

Install

npm install mpeg-frame-parser

Use

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

var Frames = require('mpeg-frame-parser')
  , stream = require('fs').createReadStream('./my-audio.mp3')

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

parser.on('data', function(frame){
    console.log(frame.bitRate)  // => 128000
})
Frame Object

frame objects contain the following keys:

frame = {
    bitrate     => 12800 1600 etc
    padding     => 1
    sampleRate  => 44100 48000 etc
    mode        => Mono Stereo Joint Dual
    channels    => 1 or 2
    size        => int bytes
    version     => 1 2 2.5
    layer       => 1 2
}

use in conjunction with my ID3v1 parser and ID3v2 parser for more data.

Keywords

FAQs

Package last updated on 05 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc