get-mp3-duration

1.0.0 • Public • Published

get-mp3-duration

Computes the duration of an mp3 buffer in node or browser.

NPM Travis CI Build JavaScript Style Guide

Install

npm install --save get-mp3-duration
# or 
yarn add get-mp3-duration

Usage

const getMP3Duration = require('get-mp3-duration')
const buffer = fs.readFileSync('fixtures/vbr.mp3')
const duration = getMP3Duration(buffer)
 
console.log(duration, 'ms') => 285727 ms

Related

  • mp3-duration this package is a fork of mp3-duration to add browser support.
  • vmsg is an optimized mp3 recorder for the web which ports the lame mp3 encoder to wasm.

License

MIT © Travis Fischer

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1,508
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1,508
  • 0.2.0
    1

Package Sidebar

Install

npm i get-mp3-duration

Weekly Downloads

1,509

Version

1.0.0

License

MIT

Unpacked Size

6.35 kB

Total Files

7

Last publish

Collaborators

  • fisch0920