# Debugging a ReplayGain failure

**URL:** <https://discourse.beets.io/t/debugging-a-replaygain-failure/2272>\
**Category:** Help\
**Created:** [March 7, 2023, 9:56pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272 "2023-03-07T21:56:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wcage](https://avatars.discourse-cdn.com/v4/letter/w/439d5e/32.png) [@wcage](https://discourse.beets.io/u/wcage)\
**Post date:** [March 7, 2023, 9:56pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/1 "2023-03-07T21:56:28Z")

</div>

I am using the ReplayGain plugin for sound leveling and I have noticed that it fails for some files. For example, my copy of U2 The Unforgettable Fire won’t update. I get a message for each file similar to the following -  
“replaygain: ReplayGain backend `command` failed for track U2 - The Unforgettable Fire - Pride (In the Name of Love)”

My question is how to debug this? I have used another program to alter tags and I have used that to ensure that I can alter tags and successfully save the files so it doesn’t seem to be a file access problem. The number of files that “fail” is small (less than 5%), but consistent (if I re-run ReplayGain I get consistent fails for these files). Are their logs that I can review? Any help pointing me in the right direction is appreciated.

---

<div class="post-metadata">

**Author:** ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)\
**Post date:** [March 7, 2023, 10:11pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/2 "2023-03-07T22:11:20Z")

</div>

If you run `beets` in verbose mode (with `-v`) whilst running `replaygain`, it should log the command that is being run. You can try running the command it outputs yourself to possibly get a bit more information about what is happening.

---

<div class="post-metadata">

**Author:** ![wcage](https://avatars.discourse-cdn.com/v4/letter/w/439d5e/32.png) [@wcage](https://discourse.beets.io/u/wcage)\
**Post date:** [March 7, 2023, 10:20pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/3 "2023-03-07T22:20:43Z")

</div>

Thanks for the advice. I used verbose and got “no supported tracks to analyze”; took a look at the files, they are FLAC files. This was very helpful.

---

<div class="post-metadata">

**Author:** ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)\
**Post date:** [March 7, 2023, 10:43pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/4 "2023-03-07T22:43:10Z")

</div>

Ah that explains it then, the `command` ReplayGain backend (which is the default) only supports `mp3gain` and `aacgain`.

It’s probably worth trying out one of the other backends if you want support for a larger number of formats: [ReplayGain Plugin — beets 1.6.0 documentation](https://beets.readthedocs.io/en/stable/plugins/replaygain.html)

---

<div class="post-metadata">

**Author:** ![wcage](https://avatars.discourse-cdn.com/v4/letter/w/439d5e/32.png) [@wcage](https://discourse.beets.io/u/wcage)\
**Post date:** [March 7, 2023, 10:59pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/5 "2023-03-07T22:59:46Z")

</div>

I know FLAC is lossless and a better quality representation, but, my equipment (and my ear) is incapable of distinguishing the difference so I opt for reasonably high bitrate mp3s. My intent is to keep the library all mp3 so I am not sure how these slipped past my workflow.

I use ffmpeg to convert FLAC to mp3 so my first thought was to simply run the script to make the change, but I wonder if changing the file type in the library directory would cause a problem for beet. My other thought was to enable the convert plugin thinking that if beet would be impacted by a format change, the plugin would probably handle that when my external script wouldn’t.

You seem knowledgeable, any thoughts on that question?

---

<div class="post-metadata">

**Author:** ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)\
**Post date:** [March 9, 2023, 8:15pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/6 "2023-03-09T20:15:10Z")

</div>

Changing the files in-place will definitely upset beets, as it stores the full path to library items (and also information about their format).

Your best option is probably to use the `convert` plugin and convert to another directory, then import that directory and tell beets to replace your current copies with the converted ones.

---

<div class="post-metadata">

**Author:** ![wcage](https://avatars.discourse-cdn.com/v4/letter/w/439d5e/32.png) [@wcage](https://discourse.beets.io/u/wcage)\
**Post date:** [March 9, 2023, 9:55pm UTC](https://discourse.beets.io/t/debugging-a-replaygain-failure/2272/7 "2023-03-09T21:55:38Z")

</div>

Thanks for your advice. I am about ankle deep into this so far (headed for neck deep) so all help is appreciated!
