I have MP3 files on which I need to perform some audio operations, then get them back to MP3. I know every operation degrades them a little bit, so my goal is just to minimize that.
I need to use both ffmpeg and SoX in series, because each program has some options that the other does not. As a result, I have ffmpeg output to WAV or FLAC, then SoX starts with that, performs its modifications, and outputs back to MP3. I assume that using a lossless format like WAV or FLAC for that middle step minimizes file degradation, compared with keeping them in a lossy format like MP3 through each step, because that would degrade from both the processing AND ALSO from saving to a lossy MP3. I also want to preserve the ID3 tags from the original file (especially track # and cover art, if possible, other fields don't matter too much).
I had been using WAV files, because they're lossless, but those lose the ID3 tags. I would then manually add the ID3 tags back. FLAC appears to keeps the ID3 tags and seems to work, but hard for me to know if it's as good at WAV for preserving the audio -- sounds good to me, but even if I can't hear the problem it might be there for those with better ears or if some files are marginal, even a small degradation could be enough to ruin it. I think FLAC, like WAV is also lossless, and so should be good for this, but that's what I'm trying to confirm.
Because it's only for the intermediate file that I have a choice of filetype and it's temporary (to be deleted after re-exporting back to MP3), the file size of the intermediate file doesn't matter at all, just the quality.
Questions:
- Am I correct that FLAC should work as well as WAV when output from ffmpeg with respect to audio quality, because both are lossless, for minimizing any audio loss as a function of the file format? (I can already see that it does work to maintain the ID3 tags)
- Are there any downsides to FLAC for this purpose or any other formats that would work better (e.g., I think AIFF, WMA, and a few other formats are also lossless and support ID3)?
- Am I right to think that using a lossless format as an intermediary at worst can't hurt, and may help, depending on the kind of changes being made to the file? If not, what else should I be considering?
- Do I need to worry about quality, bitrate, or anything like that for this intermediate file with a lossless format, or will ffmpeg automatically select the best options for those by default (I do have a specific destination bitrate and frequency for the final MP3 files that I must use at the end)?