Open haasn opened 4 years ago
Interesting idea, then again, the recommendation could change, or the users have their own preferences. In principle, I’m kinda against hardcoding things like that. Probably some kind of config file would be nice to have.
The scripts were done way back, and in a "quick-and-dirty" way, that’s why they check for file extensions only. Loudgain itself actually tries to correctly determine what the file really is, and the stream number to use (yes, you could even use it to tag a video file, say "mp4" …). So, if you’ve misnamed, say, a FLAC file to ".mp3" accidentally, it would still see it’s FLAC and handle it correctly.
You can actually already today mix file types in an album (though I don’t recommend it). Commandline options only affect file types for which they make sense, i.e., if you specified "-L -I 3" this would affect MP3 files but tags in FLAC would of course still be uppercase Vorbis Comment tags.
If you mix different file types in one album, loudgain will issue a warning (but continue). The only exception that generates an error (and aborts) is mixing Opus and non-Opus files in one album. Opus is based on a fixed -23 LUFS reference, so it is not possible to calculate correct album values when mixing with other files that might be referenced to -18 LUFS.
I’ll consider your idea of predefined "recommended settings" for a future version. It’s just that I’m a bit short of time right now.
Rather than users/scripts needing to duplicate the
loudgain
invocation with the recommended flags based on the filetype, it would be cool if you could add one single-G / --golden
flag to enable your recommended settings.This would offer a few minor advantages:
rgbpm
much more easily, without needing to reproduce your settings for every file type.loudgain {01..04}*.mp3 05*.flac {06..09}*.mp3
. Using-G
here would apply the recommended settings per file, based on its format (e.g. using-L
for the mp3 files but not the flac). Similar scenarios can arise when a "bonus track" is only available in MP3 format but the rest of the album is FLAC, etc.A simple wrapper script could accomplish this in practice, but rather than going by the file extension, it would be ideal to look at the file type itself (since you decode it anyways); which would require integration into
loudgain