Skip to content

Generates a waveform data (peaks) from an audio file using ffmpeg

License

Notifications You must be signed in to change notification settings

t4nz/ffmpeg-peaks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ffmpeg-peaks

Generates a waveform data (peaks) from an audio file using ffmpeg

Example

const ffmpegPeaks = require('ffmpeg-peaks');

const ffpeaks = new ffmpegPeaks({
	width: 1640,
	precision: 1,
	numOfChannels: 2,
	sampleRate: 16000
});

ffpeaks.getPeaks('/my/input/audio.ogg', '/my/output/peaks.json', (err, peaks) => {
	if (err) return console.error(err);
	console.log(peaks);
});

ffpeaks.getPeaks('http:/my/url/audio.ogg', (err, peaks) => {
	if (err) return console.error(err);
	console.log(peaks);
});

About

Generates a waveform data (peaks) from an audio file using ffmpeg

Resources

License

Stars

Watchers

Forks

Packages

No packages published