This package has been deprecated

Author message:

Obsolete, use @tokenizer/s3 instead.

@music-metadata/s3
TypeScript icon, indicating that this package has built-in type declarations

0.6.1 • Public • Published

Build Status NPM version npm downloads Known Vulnerabilities Total alerts Language grade: JavaScript DeepScan grade

@music-metadata/s3

Extension for music-metadata to retrieve metadata from files stored on Amazon Web Services (AWS) S3 cloud storage.

The magic of this module is, it is able to extract the metadata from your audio files, without downloading and parsing the entire file.

This module is integrating @tokenizer/s3, for reading from the S3 cloud, and using music-metadata to parse the audio file.

Deprecated

This module is deprecated. It has become obsolete with @tokenizer/s3. You may want to use this example as starting point.

Installation

npm install @music-metadata/s3

Reading audio metadata from Amazon S3

Read metadata from 'My audio files/01 - My audio track.flac' stored in the S3 cloud:

const { parseS3Object } = require('@music-metadata/s3');
const S3 = require('aws-sdk/clients/s3');

(async () => {

  const s3 = new S3();

  console.log('Parsing...');
  try {
    const data = await parseS3Object(s3, {
        Bucket: 'your-bucket',
        Key: 'My audio files/01 - My audio track.flac'
      }
    );
    console.log('metadata:', data);
  } catch (e) {
    console.error(`Oops: ${e.message}`);
  }
})();

Using conventional streaming using the disableChunked flag:

const { parseS3Object } = require('@music-metadata/s3');
const S3 = require('aws-sdk/clients/s3');

(async () => {

  const s3 = new S3();
  
  console.log('Parsing...');
  try {
    const data = await parseS3Object(s3, {
        Bucket: 'your-bucket',
        Key: 'My audio files/01 - My audio track.flac'
      }, {
        disableChunked: true // Disable chunked transfer
      }
    );
    console.log('metadata:', data);
  } catch (e) {
    console.error(`Oops: ${e.message}`);
  }
})();

Options

option type description
disableChunked boolean set to true to switch to conventional sequential streaming.

Other options are inherited from music-metadata

Dependency graph

dependency graph

Package Sidebar

Install

npm i @music-metadata/s3

Weekly Downloads

2

Version

0.6.1

License

MIT

Unpacked Size

6.29 kB

Total Files

4

Last publish

Collaborators

  • borewit