Skip to content

Instantly share code, notes, and snippets.

@senthilmpro
Created January 27, 2023 22:55
Show Gist options
  • Save senthilmpro/b1b6294aceb5c1d6ee7ed32700e9d6a6 to your computer and use it in GitHub Desktop.
Save senthilmpro/b1b6294aceb5c1d6ee7ed32700e9d6a6 to your computer and use it in GitHub Desktop.
read ID3 tags of Mp3 using Node.js
const id3 = require('id3-reader');
// readTags('/path/to/test.mp3');
const readTags = async (filePath) => {
try {
const tags = await id3.read(filePath);
console.log(tags);
return tags;
} catch (error) {
console.error(error);
}
return null;
}
readTags('/path/to/test.mp3');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment