@se-oss/id3
v1.2.1
Published
A ID3 tag parser and builder for TypeScript and JavaScript.
Maintainers
Readme
@se-oss/id3 is a ID3 parser and builder for TypeScript and JavaScript.
📦 Installation
npm install @se-oss/id3pnpm
pnpm install @se-oss/id3yarn
yarn add @se-oss/id3📖 Usage
Parsing Tags
import { readTags } from '@se-oss/id3';
const buffer = new Uint8Array(/* MP3 binary bytes */);
const tags = readTags(buffer);
console.log(tags.title);
console.log(tags.artist);
console.log(tags.album);
console.log(tags.image?.mimeType);Writing Tags
import { ID3PictureType, writeTags } from '@se-oss/id3';
const id3Buffer = writeTags({
title: 'New Standards',
artist: 'Shahrad Elahi',
album: 'The Open Source EP',
year: '2026',
image: {
mimeType: 'image/jpeg',
type: ID3PictureType.FRONT_COVER,
description: 'Cover Art',
data: new Uint8Array([/* image bytes */]),
},
});Updating & Removing Tags
import { removeTags, updateTags } from '@se-oss/id3';
// Update ID3 tags in an existing audio file buffer
const updatedBuffer = updateTags(fileBuffer, {
title: 'Updated Title',
});
// Remove existing ID3 header from file buffer
const cleanedBuffer = removeTags(fileBuffer);📚 Documentation
For all configuration options, please see the API docs.
🤝 Contributing
Want to contribute? Star the project or raise issues on GitHub.
Thanks again for your support! 🙏
License
MIT © Shahrad Elahi and contributors.
