audiowaveform-installer
v1.1.0
Published
Install audiowaveform binary on Ubuntu 18. Helpful for use in Node projects or Cloud Functions.
Downloads
8
Readme
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