get-audio-duration
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.0 • Public • Published

    get-audio-duration

    NPM version Build Status Maintainability Test Coverage License NPM bundle size (minified) Downloads

    Get the duration of audio files/streams with ffprobe.

    Install

    $ npm install --save get-audio-duration

    Usage

    const { getAudioDurationInSeconds } = require('get-audio-duration')
    
    // From a local path...
    getAudioDurationInSeconds('audio.flac').then((duration) => {
      console.log(duration)
    })
    
    // From a readable stream...
    
    const fs = require('fs')
    const stream = fs.createReadStream('audio.flac')
    
    getAudioDurationInSeconds(stream).then((duration) => {
      console.log(duration)
    })

    Install

    npm i get-audio-duration

    DownloadsWeekly Downloads

    4,144

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    16.7 kB

    Total Files

    14

    Last publish

    Collaborators

    • lluis