Read id3 tags from mp3 files in a folder through javascript

我的梦境 提交于 2019-12-24 04:25:10

问题


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


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


Javascript for Chrome 9 and Webkit browsers, welcome:

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




回答5:


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



来源:https://stackoverflow.com/questions/4863608/read-id3-tags-from-mp3-files-in-a-folder-through-javascript

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!