0

I occasionally bump into audio with ‘whisper and explosions’, namely podcasts and audiobooks—and need to do range compression to listen more comfortably. I can do that with a variety of apps that decode the files, apply the effect and encode again into some format. However, since the source files are often shipped in the MP3 format, and MP3Gain can change volume of MP3 files without recompressing the data (just changing the volume value specified in each frame), perhaps it's possible to do the same between MP3 frames, to achieve range compression? Just for the sake of keeping what fidelity is still there, especially seeing as podcasts and audiobooks don't have too high bitrate.

Are there programs that do range compression in this manner?

Are MP3 frames short enough to permit doing this at all?

1
  • 1
    I think you're barking up the wrong tree, here. By the time you're listening to it, it's already been unpacked into a 44.1 stream. At that point, you can insert compression into your playback itself, there's no need at all to do this to the file beforehand. You didn't tell us what your playback hardware is though.
    – Tetsujin
    Dec 20, 2021 at 12:21

1 Answer 1

1

Simply put, and without going into the reasons why, in any great detail, no there is not. You would need to decode and recode back to mp3, which be definition would never be lossless.

5
  • Have you heard of MP3Gain?
    – aaa
    Dec 28, 2021 at 12:45
  • 1
    Compression is a dynamic effect whereas gain normalization is not. These are two very different things. Without analysing mp3gain in detail, I would presume that the level changes it references apply to the entire file and are either implemented in metadata, or by processing (adding level to) the entire fft dataset of the mp3 file.
    – Mark
    Dec 29, 2021 at 2:07
  • Well, WIkipedia says that volume coefficients are applied per each MP3 frame, though I so far didn't see technical details to either support or refute that. Frame duration at 44.1 KHz seems to be 26 ms, which afaict should be quite enough granularity for compression. However, I'm not entirely sure of these details and whether that's sufficient for an implementation.
    – aaa
    Dec 29, 2021 at 8:49
  • 1
    Read up on how loudness (LKFS) normalization works. It is applied to the entire file.
    – Mark
    Dec 29, 2021 at 23:11
  • No, it's calculated on the entire file. It's applied per frame (possibly). There is a difference.
    – aaa
    Dec 31, 2021 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.