aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
748 stars 128 forks source link

Support for MusicBrainz tags? #50

Closed tracycollins closed 7 years ago

tracycollins commented 7 years ago

Hi,

Just started playing with this module. It works great. Thanks!

I'd love to be able to read any MusicBrainz tags on files, but it's not supported yet, right?

Any idea how difficult this would be to add? I'd try to do it myself, but I'm definitely a novice in JS and music metadata. Any help or pointers appreciated.

aadsm commented 7 years ago

Hey Tracy,

It is not supported indeed. To be honest, I was not familiar with MusicBrainz until you brought this issue up. From a quick read up on their site it looks like they have a music database similar to IMDB but for music. With reading MusicBrainz tags do you mean these tags that I found on this page? https://picard.musicbrainz.org/docs/mappings/ They mention that they map some of the tags to ID3 TXXX type of tags.

Can you give me an example of a file that you want to read these tags from? From a technical point of view no worries, I'm more than happy to help here.

aadsm commented 7 years ago

Closing for inactivity.

ojsquire commented 6 years ago

Hi, I'm looking for the same functionality. Yes, like those mentioned in the mappings table you linked to, specifically ones that start "musicbrainz_". These are mapped to the ID3 tags TXXX as shown in the table. Here is an example file: https://drive.google.com/open?id=0B6RwcFPH1EAXN3UwYUxuNnE3Ums . When I read the file with jsmediatags I see many entries under TXXX, but they are all [Object] and I can't see what's inside. I guess even without specific MusicBrainz support, I'd like to ask how can I view the TXXX tags? Thank you, and awesome project btw!

aadsm commented 6 years ago

You need to look at the data inside that object, [Object] is what you see if you just print the object. User defined tags in TXXX have the format {description, data: {user_description, data} so you need to read those. I created a simple script that did this for the file you mention at https://jsfiddle.net/jt2bfkdj/, and here's the output: screen shot 2017-09-10 at 2 28 26 pm

ojsquire commented 6 years ago

Great, thanks for that, makes sense. My only question is why the data in the TXXX tags appears to be misformatted. E.g. when I look at the output of the tag "MusicBrainz Artist Id" using ffprobe, I get a long key string "804b1081-b5cd-4f13-baa3-b0ff46a86292" rather than the random characters above. Any idea why this would be? Thanks.

pedroccpimenta commented 6 years ago

Hi!

Dear António Afonso, I'm really interested in this lib, to use in plain Javascript - can you please provide me with a straight example to use in such conditions?

All the best, Pedro Pimenta

aadsm commented 6 years ago

@pedroccpimenta, you can see an example here: https://jsfiddle.net/3ef1cL58/

pedroccpimenta commented 6 years ago

Thank You very much @aadsm ! Worked nicely with file loader button...

Last bothering :-) - instead, if we want to load a mp3 from the current directory, how could we do that?

All the best, PCP