1.0.0 • Published 1 year ago

@mtripg6666tdr/minimp3 v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

node-minimp3

NodeJS native binding to lieff/minimp3

This module hook into minimp3, a "Minimalistic, single-header library for decoding MP3. minimp3
is designed to be small, fast (with SSE and NEON support), and accurate (ISO conformant)", to
provide a decode stream to NodeJS.

Installation

node-minimp3 is bundled with a copy of the library.

Installation via npm:

$ npm i @mtripg6666tdr/minimp3

Example usage

This is an example of how to decode an mp3-file and pipe the output to node-speaker (TooTallNate/node-speaker)

const Decoder = require('@mtripg6666tdr/minimp3')
const Speaker = require('speaker')
const { createReadStream } = require('fs')

const decoder = new Decoder()
const speaker = new Speaker()
const fileStream = createReadStream('/path/to/my/file.mp3')
fileStream.pipe(decoder).pipe(speaker)

Api

The Decoder class inherits Transform from stream and accepts mp3-data and outputs a decoded buffer.

1.1.0-alpha.2

1 year ago

1.1.0-alpha.1

1 year ago

1.1.0-alpha.0

1 year ago

1.0.0

1 year ago