MP3 codec round trip encode decode possible?

Hi,

I want to write a dead simple JUCE plugin to take input, convert it to a 128kbps MP3 stream internally, then de-convert back to audio on the output. The goal is a simple way to hear how a basic streaming service might affect the audio. Can anyone point me in the right direction for this?

I have some experience with JUCE; I have written a simple mono to stereo plugin that I love to death and I use on everything. But I cannot seem to find anything related to MP3 codecs.

Thanks,
Fred

You probably want LAMEEncoderAudioFormat.

https://docs.juce.com/develop/classLAMEEncoderAudioFormat.html#details

That is not suitable for real time processing of the sound, which the original poster wants.

1 Like

This plugin idea seems to come up in various forums every now and then. It’s not at all a simple plugin to implement, but might be possible if you are willing to tolerate quite a lot of latency. You will probably also need to use the mp3 encoders and decoders directly, I think the Juce classes are not suitable for implementing that kind of a real time plugin.

The JUCE codec code is suitable for reading/writing audio files, not for real-time encoding/decoding of audio streams. There are existing products which can do this for you in real-time, which I’m happy to shamelessly self-promote if necessary!

I am interested, so please do. Is that available with JUCE interfaces? like AudioSource? or what do you use?

Thank you for clarifying, this is info I needed.

We collaborated with Fraunhofer directly to create products which do exactly what the OP was discussing:

https://www.sonnox.com/plugin/fraunhofer-pro-codec
https://www.sonnox.com/plugin/codec-toolbox

Obviously the code is not available publicly, which I think is perhaps what you were asking! But if you’re looking for an existing product to get that end result as a user…

Thank you for clarifying, this is info I needed.

Damn it, I deleted my original reply trying to figure out how to reply with quoting.

Thanks. I was aware of the Sonnox products. Since all I wanted was a dead simple 128kbps round trip, I wanted to write it myself. They do look like well-designed products, though.