Question

I would like to read id3 tags from mp3 files in a folder with javascript and save it to a textfile. Is this possible? Thanks

Was it helpful?

Solution

NodeJS has a full API for reading/writing files from JavaScript. I'm not aware of any mp3 libraries for it, though...

Edit: I assumed you meant JavaScript in a non-browser environment, but everyone else seems to be assuming you mean JavaScript in a web browser. If you do, then you'll struggle until/unless more browsers implement the various File APIs being created by the W3C. This article talks about those in some depth. There are very few browsers that have implemented the necessary APIs, though. Chrome may be the only one that lets you traverse directories.

OTHER TIPS

This man did the work of parsing an mp3 file and extracting the tags. It's now up to you to do the loop and to write the result in a text file.

It really annoys me when software developers say something is impossible. Because, it is rarely so... it is simply beyond their comprehension, creativity, or willingness to work for a solution.

Having said that here (https://github.com/aadsm/JavaScript-ID3-Reader) is someone's work to allow reading of parsed ID3 tags from a web browser.

Javascript for Chrome 9 and Webkit browsers, welcome:

http://ericbidelman.tumblr.com/post/8343485440/reading-mp3-id3-tags-in-javascript

This topic comes first in the search result. None of the answer here mentioned TagLib, which is the most famous one that is available as module for nodejs:

https://github.com/nikhilm/node-taglib

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top