Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaygain: Add more tags (like those generated by loudgain) #3378

Closed
Moonbase59 opened this issue Sep 28, 2019 · 4 comments
Closed

replaygain: Add more tags (like those generated by loudgain) #3378

Moonbase59 opened this issue Sep 28, 2019 · 4 comments
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." stale

Comments

@Moonbase59
Copy link

Moonbase59 commented Sep 28, 2019

Use case

I'm trying to use beets in conjunction with loudgain. Loudgain is an EBU R128 based replaygain tagger than can tag a lot of file types, using a superset of the well-known mp3gain commandline syntax.

Loudgain has the ability, apart from calculating track/album gain and peak values, to also store the track/album loudness ranges (LRA) and the reference loudness used in the tags.

MusicBrainz Picard already recognizes these, and I’d much like to bring loudgain and beets closer together, also supporting these values. (I actually do search for things like reference loudness and dynamic ranges.)

For the loudgain backend proposed in #3368, loudgain could of course also provide these values.

Solution

As a first step, I’d like beets to recognise the additional fields. Second, we should be sure that beets can read these case-insensitively, because this is today still a problem with many players, for instance KODI requires lowercase ReplayGain tags, VLC requires uppercase. Sigh.

It’d also be great if beets could write these tags as found, or at least upper-/lowercase be specified somewhere, for the same reasons. It wouldn’t much help if a user had tagged his whole collection of 150k files using lowercase ReplayGain tags (for a reason), and beets would overwrite them with uppercase versions … You might want to read this.

If anyone knowledgeable could point me at a good start (i.e., where to look), I’d even try to prepare a PR.

Alternatives

These are quite basic values, and should be in the core. I think.

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Sep 28, 2019
@sampsyo
Copy link
Member

sampsyo commented Sep 28, 2019

Sounds pretty good to me! The place to start adding support for reading and writing those tags is in MediaFile: https://github.com/beetbox/mediafile/

Because of the complexity of the multitude of tag formats, MediaFile is a pretty complex thing and requires some staring to get accustomed to. So please ask questions if there's anything there that you can't figure out.

The precise answer about case sensitivity depends on the format. For ID3, for example, we manually search desc strings for TXXX frames case insensitively. For Vorbis Comments, the standard says that keys are case insensitive, so Mutagen normalizes to lower case on write.

@Moonbase59
Copy link
Author

beetbox/mediafile#19
beetbox/mediafile#20

Done. Working. So now: How to make beets use and store these? :-)

@sampsyo
Copy link
Member

sampsyo commented Sep 30, 2019

You've doubtless already seen this, but just for completeness in the historical record, here are my notes about how to do that:
https://discourse.beets.io/t/better-replaygain-2-loudgain-support/947/5?u=adrian

@stale
Copy link

stale bot commented Jul 11, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 11, 2020
@stale stale bot closed this as completed Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." stale
Projects
None yet
Development

No branches or pull requests

2 participants