question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

R128_*_GAIN tags are rounded or truncated

See original GitHub issue

Problem

Running this command in verbose (-vv) mode:

$ beet -vv replaygain -a "a matter of life and death"

Led to this problem:

user configuration: /home/streetwalrus/.config/beets/config.yaml
data directory: /home/streetwalrus/.config/beets
plugin paths: 
Sending event: pluginload
library database: /home/streetwalrus/music/beets.blb
library directory: /home/streetwalrus/music
Sending event: library_opened
replaygain: Analyzing 1 albums ~ ffmpeg backend...
replaygain: analyzing Iron Maiden - A Matter of Life and Death
replaygain: analyzing Iron Maiden - A Matter of Life and Death - Different World
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/01 Different World.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - Different World: 2517 blocks over -18.7 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - Different World: gain -5.4 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - These Colours Don't Run
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/02 These Colours Don't Run.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - These Colours Don't Run: 3872 blocks over -20.0 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - These Colours Don't Run: gain -4.199999999999999 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - Brighter Than a Thousand Suns
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/03 Brighter Than a Thousand Suns.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - Brighter Than a Thousand Suns: 5082 blocks over -20.0 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - Brighter Than a Thousand Suns: gain -4.1 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - The Pilgrim
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/04 The Pilgrim.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - The Pilgrim: 3022 blocks over -18.6 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - The Pilgrim: gain -5.4 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - The Longest Day
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/05 The Longest Day.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - The Longest Day: 4579 blocks over -19.5 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - The Longest Day: gain -4.6 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - Out of the Shadows
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/06 Out of the Shadows.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - Out of the Shadows: 3316 blocks over -19.6 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - Out of the Shadows: gain -4.5 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - The Reincarnation of Benjamin Breeg
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/07 The Reincarnation of Benjamin Breeg.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - The Reincarnation of Benjamin Breeg: 3931 blocks over -20.2 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - The Reincarnation of Benjamin Breeg: gain -4.199999999999999 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - For the Greater Good of God
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/08 For the Greater Good of God.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - For the Greater Good of God: 5575 blocks over -19.3 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - For the Greater Good of God: gain -4.699999999999999 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - Lord of Light
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/09 Lord of Light.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - Lord of Light: 4384 blocks over -20.4 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - Lord of Light: gain -3.6999999999999993 LU, peak 0
replaygain: analyzing Iron Maiden - A Matter of Life and Death - The Legacy
replaygain: executing ffmpeg -nostats -hide_banner -i /home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/10 The Legacy.flac -map a:0 -filter ebur128=peak=none -f null -
replaygain: Iron Maiden - A Matter of Life and Death - The Legacy: 4785 blocks over -20.6 LUFS
replaygain: Iron Maiden - A Matter of Life and Death - The Legacy: gain -4.1 LU, peak 0
replaygain: [Item(id=3406, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/01 Different World.flac', album_id=265, title='Different World', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=1, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='4ff68a16-0999-4702-964f-6c9dc82235df', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-5.4, rg_track_peak=0.9225714271547631, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-5, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=258.1769479166667, bitrate=3051907, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3401, path=b"/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/02 These Colours Don't Run.flac", album_id=265, title="These Colours Don't Run", artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=2, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='23bb40a3-109c-4296-a238-42133096be9e', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.199999999999999, rg_track_peak=0.954992586021436, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-4, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=412.21316666666667, bitrate=3040916, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3405, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/03 Brighter Than a Thousand Suns.flac', album_id=265, title='Brighter Than a Thousand Suns', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=3, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='9f253d2d-2147-4790-991e-cd2dfe5547fb', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.1, rg_track_peak=0.9120108393559098, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-4, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=526.1221666666667, bitrate=3008059, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3402, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/04 The Pilgrim.flac', album_id=265, title='The Pilgrim', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=4, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='72dbf4aa-3776-4c1d-ad4e-fd183fa8b4d7', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-5.4, rg_track_peak=0.954992586021436, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-5, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=307.8536041666667, bitrate=3123613, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3399, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/05 The Longest Day.flac', album_id=265, title='The Longest Day', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=5, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='eedabc25-0497-420d-a3c1-92295205955f', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.6, rg_track_peak=0.9885530946569389, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-5, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=468.0979375, bitrate=2999957, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3404, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/06 Out of the Shadows.flac', album_id=265, title='Out of the Shadows', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=6, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='dba49ffd-4eeb-4fef-bdca-e6176a263668', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.5, rg_track_peak=1.0471285480508996, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-4, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=336.63379166666664, bitrate=3029328, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3397, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/07 The Reincarnation of Benjamin Breeg.flac', album_id=265, title='The Reincarnation of Benjamin Breeg', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=7, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='076ccee2-d83a-4a49-8338-9698b68c344d', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.199999999999999, rg_track_peak=0.9440608762859234, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-4, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=442.06395833333335, bitrate=2975691, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3400, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/08 For the Greater Good of God.flac', album_id=265, title='For the Greater Good of God', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=8, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='f4fb05ae-f16d-4266-bc80-6ed3cea38429', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.699999999999999, rg_track_peak=0.9440608762859234, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-5, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=565.02503125, bitrate=3115563, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3398, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/09 Lord of Light.flac', album_id=265, title='Lord of Light', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=9, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='85915896-1f02-4835-aebb-f0bd3464fd4f', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-3.6999999999999993, rg_track_peak=0.933254300796991, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-4, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=444.65034375, bitrate=2936702, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz'), Item(id=3403, path=b'/home/streetwalrus/music/Iron Maiden/A Matter of Life and Death/10 The Legacy.flac', album_id=265, title='The Legacy', artist='Iron Maiden', artist_sort='Iron Maiden', artist_credit='Iron Maiden', album='A Matter of Life and Death', albumartist='Iron Maiden', albumartist_sort='Iron Maiden', albumartist_credit='Iron Maiden', genre='Heavy Metal', style='', discogs_albumid=0, discogs_artistid=0, discogs_labelid=0, lyricist='', composer='', composer_sort='', work='', mb_workid='', work_disambig='', arranger='', grouping='', year=2006, month=0, day=0, track=10, tracktotal=10, disc=1, disctotal=1, lyrics='', comments='', bpm=0, comp=0, mb_trackid='5ca687ac-c1ce-42a2-b0e3-9879396b9192', mb_albumid='46e0f7f4-f702-38c0-a6f7-c9569e61b3d8', mb_artistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_albumartistid='ca891d65-d9b0-4258-89f7-e6ba29d83767', mb_releasetrackid='', trackdisambig='', albumtype='album', label='EMI', acoustid_fingerprint='', acoustid_id='', mb_releasegroupid='f27a9426-7f13-3c21-8861-204e42a82bd8', asin='B000GRU6XI', isrc='', catalognum='0946 372321 2 5', script='Latn', language='eng', country='XE', albumstatus='Official', media='CD', albumdisambig='', releasegroupdisambig='', disctitle='', encoder='', rg_track_gain=-4.1, rg_track_peak=0.933254300796991, rg_album_gain=-4.448753403915745, rg_album_peak=1.0471285480508996, r128_track_gain=-4, r128_album_gain=-4, original_year=2006, original_month=8, original_day=28, initial_key=None, length=562.9385208333333, bitrate=3013178, format='FLAC', samplerate=96000, bitdepth=24, channels=2, mtime=0.0, added=1439311230.369512, data_source='MusicBrainz')]: gain -4.448753403915745 LU, peak 0
Sending event: database_change
replaygain: applied r128 track gain -5 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - Different World
Sending event: database_change
replaygain: applied r128 track gain -4 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - These Colours Don't Run
Sending event: database_change
replaygain: applied r128 track gain -4 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - Brighter Than a Thousand Suns
Sending event: database_change
replaygain: applied r128 track gain -5 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - The Pilgrim
Sending event: database_change
replaygain: applied r128 track gain -5 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - The Longest Day
Sending event: database_change
replaygain: applied r128 track gain -4 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - Out of the Shadows
Sending event: database_change
replaygain: applied r128 track gain -4 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - The Reincarnation of Benjamin Breeg
Sending event: database_change
replaygain: applied r128 track gain -5 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - For the Greater Good of God
Sending event: database_change
replaygain: applied r128 track gain -4 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - Lord of Light
Sending event: database_change
replaygain: applied r128 track gain -4 LU
Sending event: database_change
replaygain: applied r128 album gain -4 LU
Sending event: write
Sending event: after_write
replaygain: done analyzing Iron Maiden - A Matter of Life and Death - The Legacy
Sending event: cli_exit

The calculated gain for all of these tracks gets rounded to an integer value when stored as R128. ReplayGain tags are fine (confirmed by looking at the tags with ffprobe, where RG stores -4.45, R128 is -1024, or -4 * 256). Querying those tags with beet ls "a matter of life and death" -f '$r128_album_gain $r128_track_gain' also gives an integer value. I believe this is due to the fact that those tags are NullPaddedInt in the database: https://github.com/beetbox/beets/blob/3c7853712f83aafb3a9aa7b1c2943b45858e660f/beets/library.py#L518-L519

Setup

  • OS: Arch Linux
  • Python version: 3.9.7
  • beets version: 1.5.0
  • Turning off plugins made problem go away (yes/no): this is a problem with the replaygain plugin

My configuration (output of beet config) is:

library: ~/music/beets.blb
directory: ~/music

plugins: fetchart embedart replaygain

import:
    copy: yes
    group_albums: yes
embedart:
    auto: no
    maxwidth: 0
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    quality: 0
replaygain:
    backend: ffmpeg
    overwrite: yes
    targetlevel: 93
    r128_targetlevel: 93
    r128: FLAC
    auto: yes
    threads: 12
    parallel_on_import: no
    per_disc: no
    peak: 'true'
fetchart:
    auto: yes
    minwidth: 0
    maxwidth: 0
    quality: 0
    max_filesize: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    lastfm_key: REDACTED
    store_source: no
    high_resolution: no

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ybndcommented, Dec 10, 2021

Looks like it was changed to NullPaddedInt to make it nullable in #2757, and it started out as regular integers. Maybe it was originally intended to be Q7.8 in beets but never got implemented? If we keep using LU internally (I guess that was the conclusion ~ #3311) making these fields floats makes more sense.

I’ve checked whether we can just change it to NullFloat, seems like we can:

Sending event: database_change
replaygain: applied r128 track gain -13.3 LU
Sending event: database_change
replaygain: applied r128 album gain -14.487821730577789 LU
Sending event: write
Sending event: after_write

I’ve also confirmed that mediafile handles the floats just as well; as @9ary described above: e.g. -13.3 * 256 -> -3405 in my case

As far as I can tell beets only ever uses those fields in the RG plugin, I don’t think there would be any issues with changing it.

1reaction
9arycommented, Nov 29, 2021

As far as I understand from digging around, it seems beets originally stored the raw Q7.8 value as an integer in the database, but it was later changed to store a value similar to replaygain, and conversion was moved to mediafile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

My thoughts on two ReplayGain taggers: loudgain and r128gain
So all presentation (tags) are rounded to 2 decimal digits. Peak values: Yes, I actually use the true peak values (as calculated by...
Read more >
Ogg Encapsulation for the Opus Audio Codec RFC 7845
This tag is intended to identify the codec encoder and encapsulation ... This gives a size of 61,310 octets, which is rounded up...
Read more >
beets Documentation - Read the Docs
Welcome to the documentation for beets, the media library management system for obsessive music geeks. If you're new to beets, ...
Read more >
Any bash scripters can help me with a metaflac bash script
Yes, between -10dB and -10.99dB rounded/truncated so the awk knows ... that your FLAC files have at least the ALBUM, ARTIST and TITLE...
Read more >
Changelog — beets 1.5.0 documentation
#3301 · ReplayGain Plugin: Fix the storage format for R128 gain tags. ... Lyrics Plugin: Avoid fetching truncated lyrics from the Google ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found