Skip to content

Beets replaygain with ffmpeg writing 0 values #6173

@Th3K1ngP1n

Description

@Th3K1ngP1n

Problem

Running this command in verbose (-vv) mode:

$ beet -vv (.plugin paths: []
Loading plugins: beatport4, duplicates, edit, embedart, fetchart, ftintitle, importreplace, info, lastgenre, lyrics, musicbrainz, permissions, replaygain, scrub, zero
fetchart: lastfm: Disabling art source due to missing key
fetchart: google: Disabling art source due to missing key
lastgenre: Loading whitelist /home/max/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beetsplug/lastgenre/genres.txt
lastgenre: Loading canonicalization tree /home/max/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beetsplug/lastgenre/genres-tree.yaml
Sending event: pluginload
library database: /home/max/.config/beets/data/musiclibrary.db
library directory: /home/max/nas/media/music
Sending event: library_opened
Parsed query: AndQuery([PathQuery('path', b'/home/max/nas/media/music/albums/Mefjus/FabricLive 95_ Mefjus/01 Decypher.flac', fast=True, case_sensitive=True)])
Parsed sort: NullSort()
replaygain: Analyzing 1 tracks ~ ffmpeg backend...
replaygain: analyzing Mefjus & Kasra - FabricLive 95: Mefjus - Decypher feat. Kasra
replaygain: executing ffmpeg -nostats -hide_banner -i /home/max/nas/media/music/albums/Mefjus/FabricLive 95_ Mefjus/01 Decypher.flac -map a:0 -filter ebur128=peak=true -f null -
replaygain: Mefjus & Kasra - FabricLive 95: Mefjus - Decypher feat. Kasra: gain -11.7 LU, peak 1.4791083881682074
Sending event: database_change
replaygain: applied track gain -11.7 LU, peak 1.4791083881682074 of FS
Sending event: write
Sending event: after_write
replaygain: done analyzing Mefjus & Kasra - FabricLive 95: Mefjus - Decypher feat. Kasra
Sending event: cli_exit
)

Led to this problem:

r128_album_gain: '0.0'
r128_track_gain: '0.0'

Here's a link to the music files that trigger the bug (if relevant):

Setup

  • OS:
  • Python version: 3.12
  • beets version: Latest
  • Turning off plugins made problem go away (no):

My configuration (output of beet config) is:

directory: /home/max/nas/media/music
library: /home/.config/beets/data/musiclibrary.db
#library: /home/nas/media/beets/data/musiclibrary.db
import:
    none_rec_action: ask
    copy: no
    move: no
    log: beetslog.txt
    write: yes

match:
    strong_rec_thresh: 0.20

paths:
  default: $albumartist/$album/$track $title

art_filename: cover

plugins: lyrics fetchart info lastgenre edit replaygain embedart ftintitle zero importreplace duplicates scrub musicbrainz permissions beatport4

permissions:
    file: 644
    dir: 755

duplicates:
  count: yes
  format: $albumartist/$album/$track $title

musicbrainz:
    host: musicbrainz.org
    https: no
    ratelimit: 1
    ratelimit_interval: 1.0
    searchlimit: 5
    extra_tags: []
    genres: no
    external_ids:
        discogs: no
        bandcamp: no
        spotify: no
        deezer: no
        beatport: no
        tidal: no

beatport4:
    art: yes
    art_overwrite: no

lastgenre:
  auto: true
  force: yes
  prefer_specific: true
  separator: '; '
  source: album
  count: 4
  min_weight: 15


deezer:
   source_weight: 0.5

discogs:
   data_source_mismatch_penalty: 0.5
   append_style_genre: true
   genre_separator: "; "
   user_token: "redacted"


lyrics:
    auto: yes
    translate:
        api_key:
        from_languages: [en]
        to_language:
    dist_thresh: 0.11
    fallback: null
    force: no
    print: no
    sources: [lrclib, genius]
    synced: yes

fetchart:
  auto: yes
  high_resolution: yes
  sources:
        - itunes
        - coverart: release
        - beatport
        - coverart: release

replaygain:
    auto: yes
    backend: ffmpeg
    overwrite: yes
    r128_targetlevel:  89
    r128: flac mp3
    parallel_on_import: yes


ftintitle:
    auto: yes
    keep_in_artist: yes

edit:
    albumfields: album albumartist genre artist artist_sort composer length
    itemfields: track title artist artists artist_sort album genre composer length mb_artistid mb_artistids

embedart:
    auto: yes
   # compare_threshold: 10

zero:
  auto: yes
  fields:
#    comments:
  update_database: true

importreplace:
  replacements:
    - item_fields:
        - albumartist
        - albumartist_credit
        - albumartist_sort
        - artist
        - artist_credit
        - artist_sort
        - artists
        - artists_credit
        - artists_ids
        - artists_sort
        - composer


      album_fields:
        - albumartist
        - albumartist_credit
        - albumartist_sort
        - artist
        - artist_credit
        - artist_sort
        - artists
        - artists_credit
        - artists_ids
        - artists_sort
        - composer

      replace:
        ',': ';'
        ' b2b ': '; '
        ', ': ';'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions