Open MahirAbbas opened 9 months ago
removing convert from YAML and then running beet convert
after on the library works
What sticks out here is that you seem to be importing a FLAC file, whereas mutagen (the library used to read/write tags) attempts to parse ID3 tags (but FLAC is usually tagged using Vorbis comments). I don't know any of these well, but I'd guess that there's something unusual about your input files, which gets fixed up when writing tags during the import process (but trips up the convert process otherwise).
Indeed… is there any chance that the convert plugin is producing an invalid MP3 file? I'm not intimately familiar with the FFmpeg CLI, but is the command ffmpeg -i $source -vn -aq 2 $dest
really guaranteed to produce an MP3, even when you feed it a FLAC input?
Ive never had an issue before on FLAC files and my library is >13,000. My guess is that @wisp3rwind was correct about something unusual about the FLAC files. I'm pretty sure it should always be able to convert a FLAC file.
A simple workaround that would be future-proof is to add a config setting that converts files after importing, instead of doing them as they are being imported. So a simple setting in the config thats something like convert_after_import: yes
would likely skip issues like this in the future
A simple workaround that would be future-proof is to add a config setting that converts files after importing, instead of doing them as they are being imported. So a simple setting in the config thats something like
convert_after_import: yes
would likely skip issues like this in the future
Sorry, but introducing a config option to "workaround" a bug that we don't even understand at this point seems like a really bad idea: There's no guarantee that it will even work in all the cases, and it does add real complexity to the code that we might be stuck with for backwards compatibility reasons.
Is there any chance you could provide one of the offending files (i.e. one with a sufficiently free license to allow sharing) so that someone (...) with the time to debug this could have a look at what might be the issue?
I have quite a few of the files, but I don't think any of them have free licenses
@wisp3rwind could I email you?
Sorry, I don't have the time currently to investigate this myself. Hopefully someone else can!
@MahirAbbas, one option might be to try running the relevant ffmpeg
command on one of your files manually. Then, you can inspect the result and see if it looks suspicious. You could even try importing that pre-converted "MP3" file into beets, for example. This could help confirm whether it's an issue with your convert
config.
@sampsyo I've done all 3. The import without convert, with convert and running ffmpeg manually. It seems the issue is only when you import and convert at the same time. ffmpeg with the same command works fine, so it's not an ffmpeg/config issue (I've been using this config for more than a year with >10,000 songs). The issue seems to be when importing and converting, as mutagen cant match the metadata with ffmpeg.
This seems to happen to every file now. Not sure why. This error only occurs on import. Is there a way to get even more verbose output?
That's really mysterious! I think you're already at the most verbose level if you are using -vv
.
It's onerous, but one possible way forward would be to somehow modify the convert plugin so it doesn't delete temporary files. Then maybe we can learn something by looking at those files directly and trying to decide why they're broken.
@sampsyo do you know how to do that? I've found that it leved the tmp files, but they're empty.
Problem
Running this command in verbose (
-vv
) mode:Led to this problem:
Here's a link to the music files that trigger the bug (if relevant): Any Music (Flac) file
Setup
My configuration (output of
beet config
) is: