npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jee-r/directus-extension-audio-metadata

v1.1.1

Published

Get remote audio metadata from directus flow

Readme

Directus Extension: Audio Metadata

License: MIT Directus

A Directus flow operation extension that extracts metadata from audio files stored in your Directus assets.

Description

This operation allows you to retrieve comprehensive metadata from audio files directly within your Directus flows. The extension uses the music-metadata library to parse audio files and extract information such as duration, bitrate, sample rate, channels, and ID3 tags.

Features

  • Extract audio metadata from files stored in Directus assets
  • Efficient extraction by only downloading the file header (configurable size)
  • Support for multiple audio formats (MP3, WAV, FLAC, etc.)
  • Includes formatted duration in milliseconds for easy use in flows
  • Optional authentication for protected assets

Requirements

  • Directus version 10.10.0 or higher

Installation

npm install @jee-r/directus-extension-audio-metadata

or

yarn add @jee-r/directus-extension-audio-metadata

Usage

After installation, the operation will appear in the Directus flow editor under the name "Audio Metadata".

Configuration Options

| Option | Description | Default | |--------|-------------|---------| | File Key | The file key from Directus assets | {{ $trigger.key }} | | Base URL | The base URL for your Directus assets (e.g., https://my-directus.com:8055/assets) | - | | Access Token | Optional access token for protected files | - | | Header Size | Maximum bytes to download for the header (to optimize performance) | 262144 (256KB) |

Example Flow

  1. Create a new flow that triggers when an audio file is uploaded
  2. Add the "Audio Metadata" operation
  3. Configure the operation with your Directus assets URL
  4. Use the output metadata in subsequent operations (e.g., store in a collection, transform data, etc.)

Example Output

{
  "metadata": {
    "format": {
      "tagTypes": ["ID3v2.3", "ID3v1"],
      "lossless": false,
      "container": "MPEG",
      "codec": "MPEG 1 Layer 3",
      "sampleRate": 44100,
      "numberOfChannels": 2,
      "bitrate": 320000,
      "duration": 237.09
    },
    "native": {
      "ID3v2.3": [
        {
          "id": "TPE1",
          "value": "Artist Name"
        },
        {
          "id": "TIT2",
          "value": "Track Title"
        },
        {
          "id": "TALB",
          "value": "Album Name"
        }
      ]
    },
    "common": {
      "track": {
        "no": 1,
        "of": 12
      },
      "disk": {
        "no": 1,
        "of": 1
      },
      "title": "Track Title",
      "album": "Album Name",
      "artist": "Artist Name",
      "year": 2023
    }
  },
  "durationms": 237090,
  "file_url": "https://my-directus.com:8055/assets/file-key"
}

Development

To build the extension:

npm run build

For development with automatic rebuilds:

npm run dev

License

This project is licensed under the MIT License - see the LICENSE file for details.