1.1.0 • Published 4 years ago

audiowaveform-installer v1.1.0

Weekly downloads
51
License
ISC
Repository
-
Last release
4 years ago

audiowaveform-installer

Ubuntu 18 binary installer of Audiowavform for node projects. Useful for cloud functions on Google Cloud Platform.

Inspired by ffmpeg-installer

Using version 1.3.3 of Audiowaveform

Install

npm i audiowaveform-installer

Usage examples

const exec = require('child_process').exec
const audiowaveform = require('audiowaveform-installer');

const mp3File = 'test.mp3'
const waveFile = '/tmp/test.json'

const waveformArgs = [
  '--pixels-per-second 20',
  '--bits 8',
  '--height 20'
]

exec(`${audiowaveform} -i ${mp3File} -o ${waveFile} ${waveformArgs.join(' ')}`, (err, stdout, stderr) => {
  if(err) throw err
  console.log(`Audiowavform ${stdout}`)
})

Known issues

AWS and/or GCP

If you get permissions issues, try adding a .npmrc file with the following:

unsafe-perm=true

See tip from ffmpeg-installer

1.1.0

4 years ago

1.0.0

4 years ago