beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.87k stars 1.82k forks source link

Can I query MusicBrainz XML metadata from music files with beets? #2649

Closed crocket closed 6 years ago

crocket commented 7 years ago

Problem

It seems MusicBrainz XML metadata cannot be stored in vorbis comment or matroska tag.

I'd like to search for music by querying MusicBrainz XML metadata.

Is there a way to do it with beets? Can beets convert MusicBrainz XML metadata into vorbis comment without losing information?

sampsyo commented 7 years ago

We don't currently store the entire MusicBrainz API response in the database or files' tags. In fact, that would be a little unwieldy—there are lots of parameters to the web service (such as include) that can vastly change the kind of information returned. What sort of things are you hoping to extract from the web service responses?

crocket commented 7 years ago

I have been into touhou vocal for a while. I gave up on cataloging the songs because there was no decent tagging software that can handle sophisticated metadata.

https://musicbrainz.org/recording/70ca4293-7863-48ef-8669-9dc89b3e8ae2 is an overview of a song. The information for that webpage was extracted from http://vgmdb.net/album/60536

Is it possible to preserve as much information as possible from the overview? I want to search for arranger, vocal, lyricst, is based on, etc, ...

It's a bit odd to find that I don't see genre.

Touhou vocals are based on music from touhou game. To scan for touhou vocals, there are a few things I can do.

sampsyo commented 7 years ago

The Beets Way™ is to fetch each such field into the beets database, which lets you run interesting queries over them. In fact, if you search this issue tracker, you’ll find lots of ongoing and recent efforts to increase the number of fields we fetch is this way.

AFAIK, however, MusicBrainz does not have a genre field by design; they see genres as too subjective for their catalog of ground-truth data. We have other sources for genre data (cf. the lastgenre plugin).

crocket commented 7 years ago

What do you think would be the minimal solution to the problem of finding touhou vocals, game OSTs, movie OSTs, etc, ... according to some criteria?

Sometimes, I want to find touhou vocals. Sometimes, it's OSTs for a game or a movie. Or, I want to find songs associated with a vocaloid or an anime.

I'm looking for a portable standard way to do so. The only way I found so far is to use filesystem folders.

sampsyo commented 7 years ago

Hmm; it’s hard to say without more specifics. For example, if you want to query by composer, you can just use beet list composer:foo. If you have other fields you’d like to associate with music, you can use the beet modify command. Are there specific things missing?

crocket commented 7 years ago

1) names of games, movies, and anime(This might be difficult to extract from MusicBrainz)

2) names of media projects(MusicBrainz might have difficulty with this)

For example, touhou project has multiple touhou games. Hitman franchise has multiple hitman games. Each game comes with its own OST.

3) source

On MusicBrainz, this is represented as is based on.

4) vocal 5) lyricist 6) arranger ...

sampsyo commented 7 years ago

OK, then have you tried setting that data on your music using beet modify?

Or, if you know of a data source that contains all this information, you can also imagine writing a plugin that gathers the information and stores it for you.

crocket commented 7 years ago

I haven't tried beet modify because I haven't figured out a good way to fetch metadata and record it in a portable standard form.

jansol commented 7 years ago

It seems to me that this is a matter of mapping musicbrainz semantics into beets (and actually entering all the data in musicbrainz). One likely problem with this is that musicbrainz may be lacking some fields.

@crocket how about ping me on IRC? We could draft up some spec for OSTs / arranges on musicbrainz that beets could use.

crocket commented 7 years ago

@jansol I tried to ping you at #beets on freenode, but you weren't there. IRC is not really convenient because it is not asynchronous and doesn't send email notifications. Why don't we keep talking here or move the talk to another asynchronous communication channel?

If you chose another place, I would recommend https://gitter.im/beetbox/beets or https://groups.google.com/forum/#!forum/beets-users because they send email notifications.

jansol commented 7 years ago

I am there 24/7 (with a different nick) and noticed you 10 minutes after you left. IRC is very much asynchronous to me, as it is to a lot of other people. If having to be online to receive messages bothers you, you could try Matrix using the https://riot.im/ client, they have (almost) all of freenode bridged, support email and push notifications and you stay in the room even if you close your client; you'll get whatever messages you missed when you check back (much like gitter).

Anyway let's keep the plan on etherpad so we can keep all ideas in one place without spamming this thread too much.

sampsyo commented 7 years ago

We also have a shiny new Discourse that can be sometimes nice for sustained conversations.

crocket commented 7 years ago

Further planning goes to https://discourse.beets.io/t/how-to-organize-game-movie-anime-osts-and-touhou-vocal/160

crocket commented 6 years ago

I found a cheap solution to my problem.

I could just add numbers of artists, album artists, genres, and so on to achieve what I want. IDv2.4 allows multiple entries in a single tag.

mpd can handle multiple values in a tag.