NOTE: This package is a fork from https://github.com/phding/waveform-node to provide a pattern2 regexp fix
waveform-node
Prerequisite
You need to have ffmpeg installed, and add the path to environment variable.
Usage
var waveform = require('../waveform-node');
var options = {};
waveform.getWaveForm( __dirname + './mpthreetest.mp3', options, function(error, peaks){
if(error){
return;
}
// Get peaks
console.log(peaks);
});
Options
samplesPerSecond
Type: Integer
Default: undefined
Samples per second. This parameter is conflict with numOfSample, if this attribute was set, the numOfSample will be ignored.
numOfSample
Type: Integer
Default: 2000
Number of data point for return value, sampling across entire waveform
waveFormType
Type: Enum
Default: Stack
Choose type of return value