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 : calculate album-gain from album tag, not directory #2749

Closed
breversa opened this issue Nov 26, 2017 · 20 comments
Closed

ReplayGain : calculate album-gain from album tag, not directory #2749

breversa opened this issue Nov 26, 2017 · 20 comments
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." stale

Comments

@breversa
Copy link

Problem

From what I understand, the ReplayGain plugin considers that all files in the same directory belong to the same album.
While this is fine (to me) for most of my collection, I do not keep compilation tracks in the same directory (i.e. ALL my files are in an "Artist/Album/Track" hierarchy, even for compilations).

It would be great to have an option to calculate album-gain from all the files' album tag, so that they don't need to be in the same folder.
SoundKonverter does it already : https://github.com/dfaust/soundkonverter

Setup

  • OS: Linux Mint 18.2
  • beets version 1.4.5
  • Python version 2.7.12
  • plugins: chroma, duplicates, fetchart, replaygain, scrub

My configuration (output of beet config) is:

replaygain:
    backend: bs1770gain
    command: /usr/bin/bs1770gain
    method: ebu
    auto: yes
    overwrite: no
    targetlevel: 89
    r128: [Opus]
    chunk_at: 5000
scrub:
    auto: no

plugins: replaygain chroma duplicates fetchart scrub
directory: ~/Musique

ui:
    color: yes

import:
    copy: no
library: ~/.config/beets/musiclibrary.db
fetchart:
    auto: yes
    minwidth: 0
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_engine: 001442825323518660753:hrh5ch1gjzm
    enforce_ratio: no
    cautious: no
    maxwidth: 0
    store_source: no
    google_key: REDACTED
    fanarttv_key: REDACTED
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
duplicates:
    count: no
    full: no
    format: ''
    keys: []
    move: ''
    tag: ''
    path: no
    copy: ''
    tiebreak: {}
    album: no
    strict: no
    checksum: ''
    merge: no
    delete: no
chroma:
    auto: yes
@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Nov 26, 2017
@sampsyo
Copy link
Member

sampsyo commented Nov 26, 2017

Hmm… I don't think this is the case, exactly. We group items together by the album structure in the beets database. While the paths configuration puts albums in distinct directories, you're not required to use the same structure. And similarly, while the importer looks for albums grouped together by directory by default, there are also ways to avoid that.

Can you take a closer look and report what makes you think the plugin is working by directory structure instead of the album structure in the database?

@breversa
Copy link
Author

breversa commented Dec 4, 2017

Sorry for my late reply.
Here's a proof that the replaygain plugin does not calculate by album tag :

$ beet replaygain album:"The blackest album"
replaygain: analyzing Abaddon of Venom - The blackest album - Whiplash
replaygain: analyzing Apoptygma Berzerk - The blackest album - Nothing else matters
replaygain: analyzing Apoptygma Berzerk - The blackest album - Fade to black
replaygain: analyzing Birmingham 6 - The blackest album - Seek and destroy
replaygain: analyzing Carbon - The blackest album - The thing that should not be
replaygain: analyzing Die Krupps - The blackest album - Battery (Refiltered by Filter Section)
replaygain: analyzing Enhanced Reality - The blackest album - Carpe diem baby
replaygain: analyzing Funker Vogt - The blackest album - Harvester of sorrow
replaygain: analyzing Godeater - The blackest album - The house that Jack built
replaygain: analyzing Godheads - The blackest album - Wherever I may roam
replaygain: analyzing Hellsau - The blackest album - Master of puppets
replaygain: analyzing In Strict Confidence - The blackest album - Sad but true
replaygain: analyzing Innocent Blood - The blackest album - Enter sandman
replaygain: analyzing La Honda Militia - The blackest album - Battery (High voltage mix)
replaygain: analyzing Naked Lunch - The blackest album - Shortest straw
replaygain: analyzing Overflow.110 - The blackest album - Bleeding me
replaygain: analyzing Physical Attraction - The blackest album - Creeping death
replaygain: analyzing Pitchshifter - The blackest album - St. Anger
replaygain: analyzing Razed in Black - The blackest album - The thing that should not be (Back in black remix)
replaygain: analyzing Razed in Black - The blackest album - Damage, Inc.
replaygain: analyzing Spew - The blackest album - For whom the bell tolls
replaygain: analyzing Substanz-T - The blackest album - Shoot me again
replaygain: analyzing The Electric Hellfire Club - The blackest album - Devil's dance
replaygain: analyzing The Element - The blackest album - Nothing else matters (Elemental remix)
replaygain: analyzing The Element - The blackest album - My friend of misery
replaygain: analyzing The Sandowski Files - The blackest album - The unforgiven
replaygain: analyzing Transistorhythm - The blackest album - King nothing
replaygain: analyzing Venom - The blackest album - Warhead

And here's the result :

$ beet info -i "rg_album_gain" album:"The blackest album"
/home/breversa/Musique/Abaddon of Venom/The blackest album/Abaddon of Venom - Whiplash.ogg
rg_album_gain: -16.99

/home/breversa/Musique/Apoptygma Berzerk/The blackest album/Apoptygma Berzerk - Nothing else matters.ogg
rg_album_gain: -14.33

/home/breversa/Musique/Apoptygma Berzerk/The blackest album/Apoptygma Berzerk - Fade to black.ogg
rg_album_gain: -14.33

/home/breversa/Musique/Birmingham 6/The blackest album/Birmingham 6 - Seek and destroy.ogg
rg_album_gain: -17.3

/home/breversa/Musique/Carbon/The blackest album/Carbon - The thing that should not be.ogg
rg_album_gain: -13.75

/home/breversa/Musique/Die Krupps/The blackest album/Die Krupps - Battery (Refiltered by Filter Section).ogg
rg_album_gain: -12.66

/home/breversa/Musique/Enhanced Reality/The blackest album/Enhanced Reality - Carpe diem baby.ogg
rg_album_gain: -16.32

/home/breversa/Musique/Funker Vogt/The blackest album/Funker Vogt - Harvester of sorrow.ogg
rg_album_gain: -14.17

/home/breversa/Musique/Godeater/The blackest album/Godeater - The house that Jack built.ogg
rg_album_gain: -17.12

/home/breversa/Musique/Godheads/The blackest album/Godheads - Wherever I may roam.ogg
rg_album_gain: -13.11

/home/breversa/Musique/Hellsau/The blackest album/Hellsau - Master of puppets.ogg
rg_album_gain: -14.98

/home/breversa/Musique/In Strict Confidence/The blackest album/In Strict Confidence - Sad but true.ogg
rg_album_gain: -13.93

/home/breversa/Musique/Innocent Blood/The blackest album/Innocent Blood - Enter sandman.ogg
rg_album_gain: -12.03

/home/breversa/Musique/La Honda Militia/The blackest album/La Honda Militia - Battery (High voltage mix).ogg
rg_album_gain: -12.08

/home/breversa/Musique/Naked Lunch/The blackest album/Naked Lunch - Shortest straw.ogg
rg_album_gain: -16.78

/home/breversa/Musique/Overflow.110/The blackest album/Overflow.110 - Bleeding me.ogg
rg_album_gain: -16.22

/home/breversa/Musique/Physical Attraction/The blackest album/Physical Attraction - Creeping death.ogg
rg_album_gain: -15.43

/home/breversa/Musique/Pitchshifter/The blackest album/Pitchshifter - St. Anger.ogg
rg_album_gain: -16.72

/home/breversa/Musique/Razed in Black/The blackest album/Razed in Black - The thing that should not be (Back in black remix).ogg
rg_album_gain: -15.24

/home/breversa/Musique/Razed in Black/The blackest album/Razed in Black - Damage, Inc..ogg
rg_album_gain: -15.24

/home/breversa/Musique/Spew/The blackest album/Spew - For whom the bell tolls.ogg
rg_album_gain: -14.44

/home/breversa/Musique/Substanz-T/The blackest album/Substanz-T - Shoot me again.ogg
rg_album_gain: -13.25

/home/breversa/Musique/The Electric Hellfire Club/The blackest album/The Electric Hellfire Club - Devil's dance.ogg
rg_album_gain: -15.0

/home/breversa/Musique/The Element/The blackest album/The Element - Nothing else matters (Elemental remix).ogg
rg_album_gain: -15.24

/home/breversa/Musique/The Element/The blackest album/The Element - My friend of misery.ogg
rg_album_gain: -15.24

/home/breversa/Musique/The Sandowski Files/The blackest album/The Sandowski Files - The unforgiven.ogg
rg_album_gain: -10.81

/home/breversa/Musique/Transistorhythm/The blackest album/Transistorhythm - King nothing.ogg
rg_album_gain: -15.39

/home/breversa/Musique/Venom/The blackest album/Venom - Warhead.ogg
rg_album_gain: -16.04

As you can see, the album gain is different for all tracks (remember : they aren't in the same folder, and it's intended).

Using SoundKontverter, here's what I end up with :

snapshot1
(Please note that SoundKonverter does not use bs1770gain, but metaflac/vorbisgain/mp3gain. Still, I expect a great database-driven tool to rely on the database, not on file path :-P )

@sampsyo
Copy link
Member

sampsyo commented Dec 4, 2017

Can you verify that the beets database thinks that all those tracks are on the same album? You can check by using beet ls -a, for example, or beet ls -f '$title $albumid' or similar to directly inspect which album structure the tracks belong to.

@breversa
Copy link
Author

Sorry for the overly late reply : this bug fell out of my following list…
The database thinks those track belong to the same album (I'm not 100% sure of my command though) :

$ beet ls -a "The blackest album"
Abaddon of Venom - The blackest album
Apoptygma Berzerk - The blackest album
Birmingham 6 - The blackest album
Carbon - The blackest album
Die Krupps - The blackest album
Enhanced Reality - The blackest album
Funker Vogt - The blackest album
Godeater - The blackest album
Godheads - The blackest album
Hellsau - The blackest album
In Strict Confidence - The blackest album
Innocent Blood - The blackest album
La Honda Militia - The blackest album
Naked Lunch - The blackest album
Overflow.110 - The blackest album
Physical Attraction - The blackest album
Pitchshifter - The blackest album
Razed in Black - The blackest album
Spew - The blackest album
Substanz-T - The blackest album
The Electric Hellfire Club - The blackest album
The Element - The blackest album
The Sandowski Files - The blackest album
Transistorhythm - The blackest album
Venom - The blackest album

@sampsyo
Copy link
Member

sampsyo commented Feb 19, 2018

Hmm; that actually looks like many different albums. If beets was tracking this as a single album, then beet ls -a [...] would only have one line of output. You may need to re-import these tracks to group them together into an album.

@breversa
Copy link
Author

I've re-imported my whole collection with --group-albums, but that didn't change a thing, because here's the problem : Beets can group files by their album if they are in the same directory, but not if they are in different directories. :-(

@sampsyo
Copy link
Member

sampsyo commented Feb 20, 2018

True. You may want to move them into one directory first.

@breversa
Copy link
Author

That's unfortunately not something I can practically do.

@sampsyo
Copy link
Member

sampsyo commented Feb 20, 2018

(You May also be interested in the --flat flag.)

@breversa
Copy link
Author

Wow… Thanks, I never knew about that option ! No sure how well it goes with --group-albums, but that's definitely worth a try ! :D

@breversa
Copy link
Author

breversa commented Mar 8, 2018

Well, no luck.
Even with --group-albums and --flat, my files are still no grouped according to their album tag. :-(

@sampsyo
Copy link
Member

sampsyo commented Mar 8, 2018

Hmm! Any guesses about what's going wrong? Can you investigate a little to isolate a reproducible problem?

@Freso
Copy link
Member

Freso commented Mar 15, 2018

Just a thought… are they tagged with MusicBrainz identifiers?

If they don't have MBIDs (to unambiguously say that "The Blackest Album" is the same as "The Blackest Album" but different from "The Blackest Album"), you/beets may have set the Album Artists for the Tracks the same as the Track Artists, which means you have a Release "The Blackest Album" by Abaddon of Venom, a "The Blackest Album" by Apoptygma Berzerk, etc., instead of a single "The Blackest Album" by Various Artists. Without any additional information, this would tell beets that those are different albums, even if they happen to have the same name. (Just like "Reckoning" by Grateful Dead is a different release than "Reckoning" by R.E.M. (or the 5+ other "Reckoning" albums out there.))

@breversa
Copy link
Author

Indeed, they do NOT have MBID (as I frequently disagree with MB's capitalization of album titles).

@breversa
Copy link
Author

Any news about this ?
It's not a show-stopper bug from me, but still prevents me from going full-beets nonetheless.

@sampsyo
Copy link
Member

sampsyo commented May 23, 2018

Hello! This thread is still waiting on you to help shed some light via a reproducible test case.

@breversa
Copy link
Author

Well, the problem is reproducible for every album which files are not in the same directory. Actually, it's as if the --flat option is ignored when using --group-albums.

@sampsyo
Copy link
Member

sampsyo commented May 25, 2018

Interesting! Can you check whether beets imports these albums separately? (It's not important to have the RG plugin enabled for that test.) Can you include an import session with full details about how files were laid out originally—i.e., all the details for a full bug report?

@breversa
Copy link
Author

breversa commented Jun 8, 2018

I'll give it a try when release 1.4.8 is out, that should solve my other issue (#2757).

@stale
Copy link

stale bot commented Jul 12, 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 12, 2020
@stale stale bot closed this as completed Jul 19, 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

3 participants