{"id":10233,"date":"2013-12-13T21:09:57","date_gmt":"2013-12-14T02:09:57","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=10233"},"modified":"2017-05-26T08:33:21","modified_gmt":"2017-05-26T12:33:21","slug":"faster-mp3-options-for-raspberry-pi","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2013\/12\/13\/faster-mp3-options-for-raspberry-pi\/","title":{"rendered":"Faster MP3 options for Raspberry Pi"},"content":{"rendered":"<p style=\"padding-left: 30px;\">Hi there! This post is <span style=\"color: #ff0000;\"><strong>beyond ancient<\/strong><\/span>, and made sense back when the original Raspberry Pi Linux distributions didn&#8217;t have floating point support. With the multi-core Raspberry Pi 3, lame now runs at an acceptable rate. You should probably ignore this post unless you&#8217;re deliberately trying to recreate that bubbly old MP3 sound.<\/p>\n<p>One thing the Raspberry Pi is <em>not <\/em>good at is encoding MP3s at any great speed. At best (using <a href=\"http:\/\/lame.sourceforge.net\/\">lame<\/a>) you might get slightly better than 2\u00c3\u2014 real time playback. If you&#8217;re using your Raspberry Pi to transcode to another format, that might be slow enough (with other system overhead) to make the output stutter.<\/p>\n<p>While it would be nice to have the GPU as a general media encoder, we&#8217;re not there yet. If you must encode mp3s quickly on a Raspberry Pi, there are a couple of options:<\/p>\n<ul>\n<li><strong>Comprec<\/strong> &#8211; <a href=\"http:\/\/unimut.fsk.uni-heidelberg.de\/demi\/comprec\/index.html\">http:\/\/unimut.fsk.uni-heidelberg.de\/demi\/comprec\/index.html<\/a><br \/>\nThis uses ARM assembly language. The code is a little fiddly to compile, but can encode to a 128 kbit\/s mp3 in ~ 6\u00c3\u2014 real time. I&#8217;ve used this for <a href=\"http:\/\/scruss.com\/blog\/2009\/05\/06\/fast-fixed-point-mp3-encoder-for-arm\/\">years<\/a>.<\/li>\n<li><strong>Shine<\/strong> &#8211; <a href=\"https:\/\/github.com\/savonet\/shine\">https:\/\/github.com\/savonet\/shine<\/a><br \/>\nThis is actually being maintained, and is portable between architectures. Not quite as fast as comprec, at 2.7\u00c3\u2014 real time, but still a bit faster than lame.<\/li>\n<\/ul>\n<p>Please note that both of these are based on the old &#8216;8hz&#8217; mp3 encoder, which was a fairly literal interpretation of the original Fraunhofer code. They only start producing okay sounding files at high bitrates.<\/p>\n<p>If you need to decode mp3s quickly, MAD is pretty good: <a href=\"http:\/\/www.underbit.com\/products\/mad\">http:\/\/www.underbit.com\/products\/mad<\/a>. It&#8217;s in the repos as \u00e2\u20ac\u02dcmadplay\u00e2\u20ac\u2122.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi there! This post is beyond ancient, and made sense back when the original Raspberry Pi Linux distributions didn&#8217;t have floating point support. With the multi-core Raspberry Pi 3, lame now runs at an acceptable rate. You should probably ignore this post unless you&#8217;re deliberately trying to recreate that bubbly old MP3 sound. One thing [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2755,2509,2753,2759,45,2510,2754],"class_list":["post-10233","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-8hz","tag-arm","tag-comprec","tag-madplay","tag-mp3","tag-raspberrypi","tag-shine"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-2F3","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/10233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=10233"}],"version-history":[{"count":3,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/10233\/revisions"}],"predecessor-version":[{"id":13981,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/10233\/revisions\/13981"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=10233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=10233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=10233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}