Skip to content

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

Notifications You must be signed in to change notification settings

transitive-bullshit/get-mp3-duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-mp3-duration

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

NPM Build Status 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

Support my OSS work by following me on twitter twitter

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published