-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Sets R128 fields to zero when R128 values are not calculated #2757
Comments
Hi! Hmm, I'm a little confused so far… as of 1.4.5, we're supposed to be keeping R128 and ReplayGain tags separate. The new Any chance this dual-tag problem came from older versions of beets? If so, maybe all you need is to use |
As I'm fairly new to Beets (I discovered it two weeks ago), I'm pretty sure it's not a matter of previous version. Actually, Beets seems to set up r128 tags regardless of the ReplayGain plugin config ; or maybe even without that plugin enabled, and |
I see! So is the problem here that the R128 tags are zero (always zero) when they should be missing? Or do they sometimes have nonzero values? |
Yes, that's the problem : there shouldn't be any r128 tags except for files specifically configured in the ReplayGain plugin config. |
Here's a proof, with a new track :
I then calculated the gain (for the full album, but only displayed the relevant info for one track, to avoid clutter) :
And here's the result :
|
Got it; thanks! That really does clarify the issue. It sounds like the plugin is somehow writing zeroes for the R128 fields even when it's only calculating the RG values. I don't immediately see the root cause of the problem. Doing a little more digging into where, in the plugin's workflow, the tags are being set to zero would help nail it down. |
Any way I can help ? |
Good question! If you know a teensy bit of Python, you could try throwing in bunch of |
Sadly, I don't know Python. But bash, if that helps… |
Maybe this is the perfect time to learn! 😃 🐍 |
I'm the author of the R128 implementation so I've done some quick debugging today. The replaygain plugin only sets the tags values by calling An easy way to test it is to change the debug messages for the r128 methods to be different from the "standard" ones at lines 880 and 894 in A bit of a wild guess but I have a feeling it also might be related to this. (That at least explains why I'll look at this a bit more if I have the time but if anybody else decides to pick this up hopefully this information will be of some use. |
Hmm, yes, it could indeed be that the Item abstraction never actually deletes these flags on the underlying MediaFile... but somehow I thought we had addressed that, so that these fields wouldn’t keep reappearing when there’s no RG analysis done. I’ll look into it too. |
Glad know the experts are on the case. ;-) |
I've managed to track down the issue: the tags don't have a value of I'll submit a fix as a PR. |
@breversa can you maybe pull the branch with the fix and see if it works for you as well? It should but extra testing never hurts. |
Okay… just how does it work ? |
https://github.com/autrimpo/beets/tree/issue2757 download the code from here and run |
So, here goes…
Replaygain calculation :
Checking the results (only showing the first track) :
Those r128_*_gain tags are still there. :-( |
Try |
First I thought I was out of luck :
but then :
No more R128 tags ! :D |
Hello, is this issue fixed ? I'm using beet version 1.4.6 and even with the replaygain plugin disabled the files are being tagged with R128_*_GAIN = 0. |
@hdante, can you please try the latest source? (The FAQ has instructions.) |
From what I can read here : https://github.com/autrimpo/beets/blob/96a421df83d1dcbc85f3ab6870f508dc3f62f8ff/docs/changelog.rst, it has been fixed as of v1.4.7 (not released yet). |
Hello, I've just tested with beet 1.4.7 and the issue was not fixed. Here follows the steps to reproduce, starting with an empty library.
|
Argh; how did I forget to merge this? My fault; sorry. Yes, we should release this ASAP. |
How about a release, then ? :-) |
Running 1.4.7, this happens to me randomly for some albums.
will fix the album in question, but still a pretty big annoyance. |
I think that's #3049 that you're seeing there @WatermelonDriveway (which I see you've already commented on), as this issue seems to be going from None -> 000000 instead of 000000 -> 000000. |
Problem
The Replaygain plugins calculate either replaygain_* OR r128 tags, but when using "beet write", both series of tags are written, one being equal to zero.
My music player (Vanilla Music, on Android) applies r128_* gain if the tags are present, before trying the replaygain_* ones.
Is there any way NOT to write the r128 tags with the "beet write" command ? And to delete the existing r128 tags in my now messed-up library (I'm not blaming anyone ; just looking for a solution :) ) ?
Setup
My configuration (output of
beet config
) is:The text was updated successfully, but these errors were encountered: