Using MusicBrainz

753 views
Skip to first unread message

Oka Nogen

unread,
Dec 5, 2014, 11:01:37 AM12/5/14
to amp...@googlegroups.com
Is there some instruction on importing musicbrainz ids and informatoin into the Ampache database? I would like to add that metadata to my catalog, but I have 500 albums.

SUT Jael

unread,
Dec 5, 2014, 12:01:15 PM12/5/14
to amp...@googlegroups.com
You need to process all your albums to set metadata directly on song files. When it's done just recreate (delete the old one before) the ampache catalog and everything should be imported automatically.
Have a look here: https://musicbrainz.org/doc/Products. I've already used Musicbrainz Picard which is pretty good.

Andrew Nettles

unread,
Dec 5, 2014, 3:56:28 PM12/5/14
to amp...@googlegroups.com
When you use Picard, you can have it analyze all your albums at once if you want.  You can then cluster them and tag them.  If, like me, you have a lot of poorly tagged and oddball stuff to begin with then you might want to at least start out having Picard analyze only an album or artist at at time.  Then double check what it comes up with before you save it.  It's really good but it's by no means perfect.  I ended up just doing it an album at a time while correcting mistakes I found and writing down things that weren't found.

In Picard, find an album in the filesystem on the left, then drag it into the middle window.  Then you can use cluster (if you selected multiple albums), Scan, and Lookup.  I think Scan is more thorough and attempts to identify the file with an AcoustID (acoustic fingerprint) as well as other methods.

You shouldn't have to delete the old catalog I don't think - just do an update.  This will add all the new tag information to Ampache including the musicbrainz identifiers.  Once your tags are in order, you can batch rename your files based on the tags (like "%track% - %title%") if you want.  When you do an update after that, the Clean process should remove references to the old filenames and the Add process should pickup the new ones.

Oka Nogen

unread,
Dec 5, 2014, 11:59:45 PM12/5/14
to amp...@googlegroups.com
Ok.

I'm now pretty frustrated. I've downloaded Picard, I scanned my entire database. I have saved all tags. I deleted my catalog and all caches (including all of the personal tags I applied to all albums). I have added that catalog back again, and it spent another half hour re-creating the directory. And it is exactly the same as it was when I first uploaded it a month ago, before I spent time updating tags and artwork and everything else. No musicbrainz tags, similarly named albums are still grouped together. everything else.

Extremely frustrating.


On Friday, December 5, 2014 10:01:37 AM UTC-6, Oka Nogen wrote:

Oka Nogen

unread,
Dec 6, 2014, 2:17:38 AM12/6/14
to amp...@googlegroups.com
How do you add a musicbrainz api to your plugin? I'm not finding that on the web version. Maybe I can add it in a config file?

SUT Jael

unread,
Dec 6, 2014, 5:00:42 AM12/6/14
to amp...@googlegroups.com
No, there's no need to add a musicbrainz api key. You may want to use the latest develop version to handle the new database structure for artist/album distinction (avoid most of duplicates).
Beside that, have you checked your files to see if metadata are really written? Could you activate ampache logs and see if something is going wrong? Which version/system are you using?

Oka Nogen

unread,
Dec 6, 2014, 9:04:05 AM12/6/14
to amp...@googlegroups.com
I have been using 3.8.0 develop. Auto updating is on and my logs are set to debug. I'll check the logs and see what it shows when I run a catalog update.

Oka Nogen

unread,
Dec 6, 2014, 9:06:10 AM12/6/14
to amp...@googlegroups.com
Does Picard save tag information on the file itself?

Andrew Nettles

unread,
Dec 7, 2014, 2:49:29 AM12/7/14
to amp...@googlegroups.com
Yes (as long as you click Save ;)).  After you use Scan or Lookup, check that the tag info is correct, then Save and it will add TXXX tags with musicbrainz identifiers to the files.  Then when you update the catalog, Ampache should read those identifiers and put them in its database.  At that point it can use the Musicbrainz identifiers to differentiate between albums with the same title, group multi-disk albums, group live releases, etc.

The plugin is only if you want to automatically let Musicbrainz tag everything in Ampache's database.  You will get much better results if you use Picard to tag the files, double-checking things as you go, and rely on the tag information in the files and not the plugin.  If you use the plugin you are likely to end up with several mistagged entries in your database - but by default you won't be actually updating the tags in the files unless you've enabled that in your config. If you have Ampache configured to write ID3 tags and also enable the plugin then this can result in losing your original files' tags which in some cases may have been more correct (and are unrecoverable at that point).  By default Ampache will not use getID3 to write tags - you have to turn that on.  But if you enable that plugin and also enable getID3 to update tags then you're relying on Musicbrainz 100% and obviously it's not perfect.  Hope that makes sense...

The plugin is useful if you can't tag the files yourself for whatever reason or if you want to put off tagging the files.  For instance if you had a bunch of files that had *no* tags, then if you enabled the plugin you'd go from having no information about the files in your catalog to having a lot - and most of it would be correct.  If you have a bunch of poorly tagged files then it can result in a better looking catalog without having to do any actual work on tagging the files. And it's non-destructive by default so you can always check out the existing tags on the files later and update them using Picard or another tagger. But the best practice is to have your files tagged as well as possible and have Ampache use the files' tag information first.  This unfortunately can involve some tedious work.

Oka Nogen

unread,
Dec 7, 2014, 8:08:01 PM12/7/14
to amp...@googlegroups.com
This is all very good information.

Does Picard do that metadata tag writing for ALL file-types?

Andrew Nettles

unread,
Dec 8, 2014, 12:41:31 AM12/8/14
to amp...@googlegroups.com
See http://picard.musicbrainz.org/

It supports "MP3, FLAC, OGG, M4A, WMA, WAV, and more"

Oka Nogen

unread,
Dec 9, 2014, 1:45:12 PM12/9/14
to amp...@googlegroups.com
Thanks Andrew,

Actually, I just got this from the Pickard FAQ https://picard.musicbrainz.org/docs/faq/:


What formats does Picard support?

Picard supports MP3, Ogg Vorbis, FLAC, MP4 (AAC), Musepack, WavPack, Speex, The True Audio and Windows Media Audio.

WAVs cannot be tagged due to the lack of a standard for doing so, however, they can be fingerprinted and renamed.


So, although not entirely a waste of time with wav files, not really a good use of time either. It can help fix names, etc. and disambiguate releases, but you will apparently want to do something else for Ampache if your files are wav. Would there be a way, or is there one already to integrate or link your musicbrainz account collection to Ampache?

Andrew Nettles

unread,
Dec 10, 2014, 4:33:53 AM12/10/14
to amp...@googlegroups.com
I don't believe such a feature exists at the moment.  What I have done before is just to keep the existing files but convert them to a taggable format for use in the Ampache catalog.  I used LL2MP3 (lossless to mp3) for this but there are many tools that can accomplish the same thing.  It will batch convert a folder of files - then you can archive the originals and tag the converted ones.  

You could convert wav to FLAC to stay lossless and then transcode the FLACs in Ampache if necessary.  

Using a tagger other than Picard first may help - sometimes it's beneficial to use something like Mp3tag to set the album and artist names, then do a lookup on the album to set the track names and the album art.  After that, run Picard on them and you can be more certain it's looking up the correct release... and then save the tracks with the Musicbrainz identifiers.  It's not as bad as it sounds once you've gotten into it.  There are many tools to choose from depending on your OS - I know a lot of folks like Beets which also supports Musicbrainz ids.  I really like having granular control over the tagging process - there are many pitfalls and doing it an album at a time enabled me to correct a *lot* of details that a more automated approach would have missed.

I had already done most of my tagging with Mp3tag before I realized I needed to add mbids but since my files were well tagged already, using Picard afterwards was really easy for the most part - very few discrepancies (for things that were listed in Musicbrainz).  Mp3tag is really, really useful though.  It's much easier to use for many things than Picard - even for just viewing the tags on a set of tracks I like it better.  I pretty much only use Picard to add mbids as it won't screw up the album art and most of the time I'd already used the Musicbrainz lookup in Mp3tag anyway so the titles & artists all match.  Mp3tag can lookup releases in Discogs & Amazon also though and that can be very helpful.

Oka Nogen

unread,
Dec 10, 2014, 12:12:44 PM12/10/14
to amp...@googlegroups.com
Arrgh. Sorry, not complaining. Just bumming.

I think a lot more people would be a lot less intimidated out of using musicbrainz, ampache, etc., if there was a clear explanation (a FAQ, for instance) that spelled out what you needed to do in advance to prepare your music for inclusion in a database of this kind. If I had known when I started ripping 500-600 cds that wav files were nearly useless in any other database except a Microsoft Windows Media Player database, and I would need to convert them to mp3 to use them effectively, I probably would have not wasted my time with Ampache until I had converted my music file system in an Ampache/Musicbrainz friendly format. Or had a path to automate that. I have deleted and reinstalled my catalog at least six times now, which is weeks worth of work. It would save a lot of trouble and a lot of questions for support if this were out there, somewhere. It would also reduce a lot of issues with transcoding difficulties.

For converting, it really doesn't make much sense to convert lossless wav to lossless FLAC just to maintain two lossless file sets which could double terrabytes worth of data storage. One of those file types is basically useless for anything except archiving, and the other still needs to be transcoded to stream. Might as well skip that step and just convert them straight to 160-192kb mp3 and be done with it.

I hate to say it, but it would almost be better if support for wav files was just dropped outright, then a person would not try to do something that is basically not easily possible.

Andrew Nettles

unread,
Dec 11, 2014, 3:07:25 PM12/11/14
to amp...@googlegroups.com
Hey, sorry you ripped all those CDs to wav - it's an old standard that came about before tagging was implemented.  I wasn't suggesting that you convert them to FLAC  and then keep the wavs, I was saying you could convert them to FLAC (or another lossless taggable format) and then delete the wavs.  That way you'd have files in a lossless format (like wav) that was taggable.  That would keep you from having to re-rip everything - you could use a converter and do it in batches or possibly even all at once.  You would still have to tag the files though.   Then you can setup your computer so it plays FLAC and setup Ampache to transcode to mp3 for using it with mobile devices.  There are different codecs to choose from - it just depends what you're trying to accomplish and how much flexibility you need.  Probably the least problematic way is to rip everything to mp3 in id3v2.3 format - it's taggable and just about every player and device out there works with the codec and reads the tags.

Ripping them again but to a format that supports tags might actually save you time since the ripper should automatically tag the files with %artist%, %album%, %title%, and %track% which is a good starting point.  Then when you run Picard on them, it has some tags to work with in addition to trying to find acoustic fingerprints.

It is a lot of work to get a music catalog in order.  It won't get done overnight or in a couple of weeks.  Start with a handful of albums, then try out some different tools on them with the goal of getting everything set.  Make the folder hierarchy like:  /MyMusicLibrary/Artist/Album.  Make a Various Artists folder for compilations.  Start out making sure you've organized the files into those correctly named folders.  Then tag the files an album at a time.  Once the files are tagged you can rename the files based on the tag information - for instance I like renaming files like:

%track% - %title%

There isn't much need IMO to put the artist or album in the filename if it's correctly filed in your folder hierarchy and the artist & album is embedded in the file as a tag.

Then add album art of your preferred dimensions - 500x500 is a decent compromise.  I like larger art but this can be problematic when using Ampache with mobile devices that have limited bandwidth.

You could, of course, try a more automated approach - convert them and then see how well Picard identifies them when scanning.  Or try Beets.  You're going to want to play around with a few things to decide what's best in your case.

Ahmed Alrasheed

unread,
Apr 23, 2015, 12:45:07 PM4/23/15
to amp...@googlegroups.com
hi guys, i have a related question, can i use ampache as a musicbrainz server ? scan my catalog and add the info to musicbrainz catalog ?

and i am importing my catalog in a correct folder structure, how can i later write the new id3 info to the mp3 files

  

Afterster

unread,
Apr 24, 2015, 1:19:21 AM4/24/15
to Ahmed Alrasheed, amp...@googlegroups.com
I was thinking about emulating musicbrainz api to be considered as a Musicbrainz server but this doesn't make much sens as a musicbrainz server should normally contains the complete database. Moreover everybody is using the default Musicbraine server and almost never setup a custom mirror.
Having the possibility to publish metadata from Ampache to Musicbrainz would be awesome, but that's a lot of extra work just for publishing and I'm not even sure this is possible through their API (https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2 only talks about a limited set of data you can push like rating, ...).

Ampache is using the folder structure as a fallback if your metadata doesn't contains enough information (or if you disabled id3 in the metadata plugin list). You just have to update your catalog once your files updated with correct id3 metadata. On the other way, if you want to update your files according to the metadata you edited on Ampache, you can enable write_id3 but be careful about this feature as it write on your files at each metadata change (better to do a test with a small mp3 set first).

2015-04-23 18:45 GMT+02:00 Ahmed Alrasheed <a7me...@gmail.com>:
hi guys, i have a related question, can i use ampache as a musicbrainz server ? scan my catalog and add the info to musicbrainz catalog ?

and i am importing my catalog in a correct folder structure, how can i later write the new id3 info to the mp3 files

  

--
You received this message because you are subscribed to the Google Groups "Ampache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampache+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampache/5c864cf8-3d1d-43d4-a457-897c7dbeabea%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ahmed Alrasheed

unread,
Apr 24, 2015, 10:59:42 PM4/24/15
to amp...@googlegroups.com, a7me...@gmail.com
cool, will try that, thanks
Reply all
Reply to author
Forward
0 new messages