{"id":5,"date":"2013-01-10T22:25:55","date_gmt":"2013-01-10T22:25:55","guid":{"rendered":"http:\/\/ggkarman.de\/tech\/?p=5"},"modified":"2013-11-28T16:16:24","modified_gmt":"2013-11-28T16:16:24","slug":"building-sox-with-mp3-support-on-osx","status":"publish","type":"post","link":"https:\/\/ggkarman.de\/tech\/building-sox-with-mp3-support-on-osx\/","title":{"rendered":"Building sox with mp3 support on OSX <strong>(old)<\/strong>"},"content":{"rendered":"<p><strong>The instructions in this post have been updated, <a href=\"http:\/\/ggkarman.de\/tech\/?p=270\"> here<\/a>.<\/strong><\/p>\n<p>Hi, it took me a bit to figure out how to build  <a href=\"http:\/\/sox.sourceforge.net\">sox<\/a> with mp3 support on OSX, so I thought that sharing how I did it might help others:<\/p>\n<p>1. Download sox, and the lame and libmad tarballs: <a href=\"http:\/\/sourceforge.net\/projects\/sox\/files\/sox\/\">sox-14.4.1<\/a>, <a href=\"http:\/\/sourceforge.net\/projects\/lame\/files\/lame\/3.99\/\">lame-3.99.5<\/a>, <a href=\"http:\/\/sourceforge.net\/projects\/mad\/files\/libmad\/\">libmad-0.15.1b<\/a>. There&#8217;s people that claim that it is possible to take advantage of a preexisting installation of the libraries but that didn&#8217;t work for me. What works on my system (OSX 10.6.8 \/ MBP i7 \/ 64-bit kernel) is to build all three from source forcing a 32-bit build (libmad is a bit old):<\/p>\n<p>2. Build libmad using the following configure flags:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">.\/configure CFLAGS=&quot;-m32 -arch i386&quot; LDFLAGS=&quot;-arch i386&quot; --enable-shared --disable-static\r\nsudo make\r\nsudo make install\r\n<\/pre>\n<p>3. Build lame\u00a0using the following configure flags:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">.\/configure CFLAGS=&quot;-m32 -arch i386&quot; LDFLAGS=&quot;-arch i386&quot; --enable-shared --disable-static\r\nsudo make\r\nsudo make install\r\n<\/pre>\n<p>4. Build sox with libmad and lame support using the following options:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n.\/configure CFLAGS=&quot;-m32 -arch i386&quot; LDFLAGS=&quot;-arch i386&quot; --with-mad --with-lame\r\nsudo make -s\r\nsudo make install\r\n<\/pre>\n<p>After running the .\/configure line in step #4 you should check the list of optional file formats to make sure that everything went well, i.e. mp3 is now active (&#8220;mp3=yes&#8221;):<\/p>\n<p><a href=\"http:\/\/ggkarman.de\/tech\/building-sox-with-mp3-support-on-osx\/screen-shot-2013-05-17-at-00-15-43\/\" rel=\"attachment wp-att-238\"><img src=\"http:\/\/ggkarman.de\/tech\/wp-content\/uploads\/2013\/01\/Screen-shot-2013-05-17-at-00.15.43-226x300.png\"\/><\/a><\/p>\n<p>Disclaimer: this may or may not work for you. On my computer the previous steps produce a fully functional sox binary with mp3 encoding\/decoding capabilities. With this post I am trying to help to the best of my knowledge, but don&#8217;t make me responsible if those instructions fail to work for you or even break your computer.<\/p>\n<p>Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The instructions in this post have been updated, here. Hi, it took me a bit to figure out how to build sox with mp3 support on OSX, so I thought that sharing how I did it might help others: 1. Download sox, and the lame and libmad tarballs: sox-14.4.1, lame-3.99.5, libmad-0.15.1b. There&#8217;s people that claim [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/posts\/5"}],"collection":[{"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":76,"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":6,"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/posts\/5\/revisions\/6"}],"wp:attachment":[{"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ggkarman.de\/tech\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}