1.2.2 • Published 10 months ago

squadio v1.2.2

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
10 months ago

Squadio

Calculate content metadata from audio, e.g. levels and duration.

Installation

Requires FFmpeg to be installed.

npm install --save withyoursquad/squadio

Usage

Squadio exports a single function calculateMetadata, which returns metadata about a given audio sample.

The metadata returned contains:

NameDescription
durationDuration of the sample in seconds.
levelsNormalized levels (0 is silence and 100 at the peak level of the sample)
peakThe peak level of the sample as the reported Root Mean Square of the highest amplitude reported in a frame.
minThe minimum level of the sample, in contrast to peak.

calculateMetadata accepts a single object as arguments, with the following available options:

NameDescription
pathFile path to the audio sample being analyzed.
compressedLength(Optional) The number of samples to limit the output levels to. If undefined, defaults to the maximum value, 1000.

Attribution

  • Uses FFmpeg for most of the logic. We're shelling out to the release itself, so we are not required to provide its source or similarly license Squadio under the (L)GPL.
  • Test fixture sound effects from Pixabay.
1.2.0

10 months ago

1.2.2

10 months ago

1.2.1

10 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago