# Mp3 licencing avoidance

**URL:** <https://forum.juce.com/t/mp3-licencing-avoidance/19342>\
**Category:** General JUCE discussion\
**Created:** [October 3, 2016, 1:28pm UTC](https://forum.juce.com/t/mp3-licencing-avoidance/19342 "2016-10-03T13:28:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/samuel/32/21_2.png) [@samuel](https://forum.juce.com/u/samuel)\
**Post date:** [October 3, 2016, 1:28pm UTC](https://forum.juce.com/t/mp3-licencing-avoidance/19342/1 "2016-10-03T13:28:56Z")

</div>

I would like to support mp3 de- and encoding in one of my applications.

As @martinrobinson-2 [stated a few days ago](https://forum.juce.com/t/general-questions-about-modular-audio-processing/18976/10), the licence for including an mp3 codec will cost at least US $15’000 per year.

So what about using system APIs on macOS and on Windows to de- and encode mp3s? Apple and Microsoft (or more precise the end user) have already payed royalties to be able to provide these APIs. This way, no codec will be part of my application and I assume it is a legal way to avoid the high licencing costs.

**Is using the system APIs a proper way to avoid mp3 licencing?**  
Or is there a big flaw in my line of thought?

A few related statements I found in this forum:

> [@MP3AudioFormat produces values outside of \[-1.0:+1.0\]](https://forum.juce.com/t/mp3audioformat-produces-values-outside-of-1-0-1-0/19258/3):
>
> Whilst JUCE’s MP3 decoder is useful to have it isn’t fully standards compliant. The usual caveat applies too - I’m most certainly not a lawyer, and I cannot suggest its use in any serious projects unless you are paying for an MP3 license. If you’re working on OS X or Windows I would use their native decoders.

> [@mp3 decoding fees](https://forum.juce.com/t/mp3-decoding-fees/3503/2):
>
> With tracktion we didn’t include any mp3 encoding, but made it clear that if the user was to get their own copy of lame.dll and put it in a convenient location, then it would use that…
> 
> I heard somewhere recently that the mp3 patent is due to expire in the next couple of years though (?)

> [@MP3AudioFormat vs WindowsMediaFormat|CoreAudioFormat?](https://forum.juce.com/t/mp3audioformat-vs-windowsmediaformat-coreaudioformat/9877/4):
>
> If you’re not using an AudioFormatManager I highly recommend it, it takes care of all these issues and will give you a wildcard string for all decodable formats (so you can use it in file choosers etc.). My point was that maybe Jules should add the WindowsMediaFormat before his own to prefer this. Personally I build with MP3AudioFormat disabled to avoid any potential licensing issues but I haven’t benchmarked the two so don’t know if MP3AudioFormat is more efficient.

@dave96 In Tracktion, does the user still have to download the lame.dll to get mp3 support? Or do you use system APIs nowadays? Or have you found another approach?

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [October 4, 2016, 7:42am UTC](https://forum.juce.com/t/mp3-licencing-avoidance/19342/2 "2016-10-04T07:42:58Z")

</div>

We use the CoreAudioFormat and WindowsMediaFormat for decoding but still use lame for encoding.
