
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Get the metadata of audio files on disk or even as URLS.
For URLS, this module fetches the minimum number of bytes enough to get metadata of the audio and thus remains super fast!
// init
const audioMeta = require('audio-meta');
// get meta
const url =
'https://cdn.pixabay.com/download/audio/2023/04/17/audio_ae4d57086a.mp3?filename=futuristic-beat-146661.mp3';
audioMeta
.meta(url)
.then((resp) => {
console.log(resp);
})
.catch(console.error);
This will output the following info:
{
request: {
url: 'https://cdn.pixabay.com/download/audio/2023/04/17/audio_ae4d57086a.mp3?filename=futuristic-beat-146661.mp3',
headers: {
date: 2023-04-18T13:05:10.000Z,
contentType: 'audio/mpeg',
contentLength: 3883676,
connection: 'close',
cfRay: '7b9d1e277c029d03-JNB',
accessControlAllowOrigin: '*',
age: 23541,
cacheControl: +086399-12-31T21:00:00.000Z,
contentDisposition: 'attachment; filename="futuristic-beat-146661.mp3"',
etag: '290523affa1536d5bd57f2cd48ab1c8c',
lastModified: 2023-04-17T09:18:15.000Z,
cfCacheStatus: 'HIT',
accessControlAllowMethods: 'GET, HEAD',
accessControlMaxAge: 86400,
xAmzReplicationStatus: 'COMPLETED',
xAmzServerSideEncryption: 'AES256',
setCookie: [Array],
vary: 'Accept-Encoding',
server: 'cloudflare',
altSvc: 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'
}
},
file: 'https://cdn.pixabay.com/download/audio/2023/04/17/audio_ae4d57086a.mp3?filename=futuristic-beat-146661.mp3',
size: 3883676,
tagTypes: [],
trackInfo: [],
lossless: false,
container: 'MPEG',
codec: 'MPEG 1 Layer 3',
sampleRate: 44100,
numberOfChannels: 2,
bitrate: 256000,
duration: { durationSecs: 121.364875, pretty: '00:02:01' }
}
FAQs
Get metadata of audio files from disk or URLS
The npm package audio-meta receives a total of 21 weekly downloads. As such, audio-meta popularity was classified as not popular.
We found that audio-meta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.