{"action":"created","issue":{"url":"https://api.github.com/repos/LMMS/lmms/issues/2000","labels_url":"https://api.github.com/repos/LMMS/lmms/issues/2000/labels{/name}","comments_url":"https://api.github.com/repos/LMMS/lmms/issues/2000/comments","events_url":"https://api.github.com/repos/LMMS/lmms/issues/2000/events","html_url":"https://github.com/LMMS/lmms/issues/2000","id":69972164,"number":2000,"title":"Add mp3 encoding and/or decoding support","user":{"login":"Wallacoloo","id":1210751,"avatar_url":"https://avatars.githubusercontent.com/u/1210751?v=3","gravatar_id":"","url":"https://api.github.com/users/Wallacoloo","html_url":"https://github.com/Wallacoloo","followers_url":"https://api.github.com/users/Wallacoloo/followers","following_url":"https://api.github.com/users/Wallacoloo/following{/other_user}","gists_url":"https://api.github.com/users/Wallacoloo/gists{/gist_id}","starred_url":"https://api.github.com/users/Wallacoloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wallacoloo/subscriptions","organizations_url":"https://api.github.com/users/Wallacoloo/orgs","repos_url":"https://api.github.com/users/Wallacoloo/repos","events_url":"https://api.github.com/users/Wallacoloo/events{/privacy}","received_events_url":"https://api.github.com/users/Wallacoloo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-21T22:55:31Z","updated_at":"2015-04-22T16:33:18Z","closed_at":null,"body":"The discussion on #1471 recently led to some talk over the possibility of supporting the mp3 file format (specifically in decoding samples, but it also has use as an export option). \r\n\r\nFor those that don't know, there are a variety of patents associated with encoding *and* decoding mp3's. In order to do either option, you must obtain a license. These patents are all *scheduled* to expire in the U.S. sometime before 2018 (the last one expires 30/Dec/2017), according to [this](http://www.tunequest.org/a-big-list-of-mp3-patents/20070226/) source. Other sources ([liftarn's comment](https://github.com/LMMS/lmms/issues/1471#issuecomment-94673440)) indicate that September 2015 is the month that mp3-related patents expire in the U.S. However, the patents have *already* expired in most other countries, and may have never applied to some countries.\r\n\r\nLAME\r\n------\r\n\r\nNow, there *is* a non-commercial (LGPL-licensed) mp3 encoder/decoder, [LAME](http://lame.sourceforge.net/). According to [Wikipedia](http://en.wikipedia.org/wiki/LAME#Patents_and_legal_issues), distributing LAME in compiled form along with LMMS would likely be in violation of the US patents. A popular open source tool, Audacity, is able to provide mp3 encoding through LAME by detecting its presence on the system at runtime instead of shipping precompiled binaries. They explain the reasoning briefly at the top of [this](http://wiki.audacityteam.org/index.php?title=Lame_Installation) page. This *appears* to remove responsibility from the developers of Audacity over patent licensing, instead pushing that responsibility to the users that are affected (i.e. U.S. users who download LAME). Additionally, that same page says that Thomson (the patent enforcer) permits mp3 encoding for \"personal\" use, which a decent portion of LMMS users do.\r\n\r\nSo if we want mp3 support before the patents expire, we could go with a similar approach to Audacity if all the developers are comfortable with it. I sure am not a lawyer, so I can only judge based upon prior projects, of which Audacity is a relevant one to reference.\r\n\r\nGstreamer\r\n------\r\nAnother option to supporting mp3's is through gstreamer. [gstreamer](en.wikipedia.org/wiki/GStreamer) is essentially a plugin-based audio routing library. As such, it provides plugins for both encoding and decoding a *variety* of audio formats, including mp3.\r\n\r\nHistorically, I think Gstreamer has been more linux-oriented, as it was adopted by the gnome project fairly early. But it claims to support OS X and Windows plus mobile.\r\n\r\nI wish I knew more about this option. All I can say is that it seems like a more generalized approach to encoding and decoding that happens to support mp3's.\r\n\r\n------\r\n\r\nAnyways, feel free to discuss your opinions or concerns about mp3 support in lmms, whether you think it's worth adding now or best to wait for the patents to completely expire, and which implementation approach might be the best. Also, clarifications on the expiration dates or legal issues are much appreciated if you have that knowledge."},"comment":{"url":"https://api.github.com/repos/LMMS/lmms/issues/comments/95256730","html_url":"https://github.com/LMMS/lmms/issues/2000#issuecomment-95256730","issue_url":"https://api.github.com/repos/LMMS/lmms/issues/2000","id":95256730,"user":{"login":"Wallacoloo","id":1210751,"avatar_url":"https://avatars.githubusercontent.com/u/1210751?v=3","gravatar_id":"","url":"https://api.github.com/users/Wallacoloo","html_url":"https://github.com/Wallacoloo","followers_url":"https://api.github.com/users/Wallacoloo/followers","following_url":"https://api.github.com/users/Wallacoloo/following{/other_user}","gists_url":"https://api.github.com/users/Wallacoloo/gists{/gist_id}","starred_url":"https://api.github.com/users/Wallacoloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wallacoloo/subscriptions","organizations_url":"https://api.github.com/users/Wallacoloo/orgs","repos_url":"https://api.github.com/users/Wallacoloo/repos","events_url":"https://api.github.com/users/Wallacoloo/events{/privacy}","received_events_url":"https://api.github.com/users/Wallacoloo/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T16:33:18Z","updated_at":"2015-04-22T16:33:18Z","body":"The option of opening a wave in audacity (or another program) sounds\nrelatively easy to implement & could be useful for more than just\nconversions. I think licensing mp3 for lmms is definitely out of the\nquestion and frankly just not worth anywhere near that amount of money.\n\nBut I really like @tresf's idea of using the OS licenses if that turns out\nto be possible. MIT is *far* more permissive than GPL, so I do believe it's\nok to use it in a GPL codebase (would have to doublecheck this though).\nIMO, it's a shame that lmms doesn't have a more permissive license, but\nthat's a different discussion.\nOn Apr 22, 2015 5:38 AM, \"Tres Finocchiaro\" <notifications@github.com>\nwrote:\n\n> Thanks for the licensing research... I think the vast majority of our\n> proprietary OS users are already licensed for decoding and encoding as the\n> licensing costs are covered by Microsoft, Apple.\n>\n> *libaudiodecoder*\n>\n> Here's a project which claims to leverage the licensed versions of the\n> libraries already on the OS (originally part of the mixxx project):\n>\n> https://github.com/asantoni/libaudiodecoder/\n>\n> The license is MIT, so I think we'd likely need special permission to\n> re-release it as GPL.\n>\n> *Allegro*\n>\n> Here's another project which may have hooks to the correct DirectShow\n> libraries on Linux, created primarily for game development:\n>\n> http://alleg.sourceforge.net/\n>\n> The license is a \"do what you want\" license, so we should have the ability\n> to re-license it. They recommend a \"pay it forward\" or \"giftware\" usage,\n> which we're not bound to, but we'd likely comply with by patching stuff\n> upstream if we were to use it.\n>\n> *Windows DirectShow*\n>\n> Or we roll our own GPL version of the same libary... Here's a C++ example\n> for Windows to use the built-in MP3 decoder library, assuming mingw has\n> support\n>\n> using dshow.h\n>\n> http://stackoverflow.com/questions/8121570/use-windows-built-in-mp3-decoder-to-play-audio/8121768#8121768\n>\n> [gist mirror]: https://gist.github.com/tresf/dc21ba5c9ccac92b8527\n>\n> *irrKlang*\n>\n> This one is just bazaar. It is very cheap to use and they have options for\n> \"free\", \"cheap\" and \"hobbyist\" projects, but I highly doubt they'd offer up\n> a GPL version of the code.\n>\n> http://www.ambiera.com/irrklang/irrklang_pro.html\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/LMMS/lmms/issues/2000#issuecomment-95159024>.\n>\n"}}