Audio Files Peaks Generator.
it depends on ffmpeg
and canvas
. please be sure you have it on the machine before use this server.
installation
clone or download this repo
usage
- be sure you have
ffmpeg
is installed at your machine. - install requirments of node canvas
cd /path/to/repo/clone
npm install
or yarn
yarn run start
- now you can make get request as follow
const url = 'http://localhost:2500/peaks'
const waveformOptions = {
barGap: 2,
barWidth: 2,
height: 128,
width: 1200,
waveColor: '#757575',
maxWidth: 4000,
pxRatio: 2,
numOfSample: 1800,
waveformType: 1,
}
axios.get(url, {
track: 'http://kolber.github.io/audiojs/demos/mp3/06-suicidal-fantasy.mp3',
...waveformOptions
})