{"id":4374,"date":"2009-05-01T22:04:26","date_gmt":"2009-05-02T02:04:26","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=4374"},"modified":"2009-05-01T22:19:39","modified_gmt":"2009-05-02T02:19:39","slug":"time-to-get-mad","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2009\/05\/01\/time-to-get-mad\/","title":{"rendered":"time to get MAD"},"content":{"rendered":"<p>The prime reason I bought the Sheevaplug is to run <a href=\"..\/..\/autocast\/\">the automatic podcast<\/a>. Every day, the script has to decode a bunch of mp3s to WAV format.On a normal computer, this takes a few seconds per file. On the Sheevaplug &#8211; with no floating-point instructions, things get painful:<\/p>\n<p><code>$ time lame --mp3input 03-in_the_aeroplane_over_the_sea.mp3 03-in_the_aeroplane_over_the_sea.wav<br \/>\nID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.<br \/>\nLAME 3.98 32bits (http:\/\/www.mp3dev.org\/)<br \/>\nUsing polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz<br \/>\nEncoding 03-in_the_aeroplane_over_the_sea.mp3<br \/>\nto 03-in_the_aeroplane_over_the_sea.wav<br \/>\nEncoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3<br \/>\nFrame\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 |\u00c2\u00a0 CPU time\/estim | REAL time\/estim | play\/CPU |\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 ETA<br \/>\n7750\/7750\u00c2\u00a0 (100%)|\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 8:45\/\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 8:45|\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 8:46\/\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 8:46|\u00c2\u00a0\u00c2\u00a0 0.3851x|\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 0:00<br \/>\n-------------------------------------------------------------------------------<br \/>\nkbps\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 LR\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 MS\u00c2\u00a0 %\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 long\u00c2\u00a0 %<br \/>\n128.0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 2.1\u00c2\u00a0 97.9\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 100.0<br \/>\nWriting LAME Tag...done<br \/>\nReplayGain: -8.9dB<\/code><\/p>\n<p>real\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 8m46.408s<br \/>\nuser\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 8m45.940s<br \/>\nsys\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 0m0.090s<\/p>\n<p>That&#8217;s right &#8211; nearly 9 minutes to decode a song! My very first Pentium 75 could probably do better than that.<\/p>\n<p>I&#8217;d heard that <a href=\"http:\/\/www.underbit.com\/products\/mad\/\">MAD<\/a> was really fast on integer-only CPUs, so I tried it:<\/p>\n<p><code>$ time madplay -o 03-in_the_aeroplane_over_the_sea.wav 03-in_the_aeroplane_over_the_sea.mp3<br \/>\nMPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.<br \/>\nTitle: In the Aeroplane Over the Sea<br \/>\nArtist: Neutral Milk Hotel<br \/>\nAlbum: In the Aeroplane Over the Sea<br \/>\nTrack: 3<br \/>\nYear: 1998<br \/>\nGenre: Alternative<br \/>\nComment:<br \/>\n7748 frames decoded (0:03:22.3), +1.2 dB peak amplitude, 1423 clipped samples<\/code><\/p>\n<p>real\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 0m7.134s<br \/>\nuser\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 0m6.500s<br \/>\nsys\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 0m0.580s<\/p>\n<p>Seven seconds sure beats nearly nine minutes. Now, if only I could find an integer MP3 encoder &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The prime reason I bought the Sheevaplug is to run the automatic podcast. Every day, the script has to decode a bunch of mp3s to WAV format.On a normal computer, this takes a few seconds per file. On the Sheevaplug &#8211; with no floating-point instructions, things get painful: $ time lame &#8211;mp3input 03-in_the_aeroplane_over_the_sea.mp3 03-in_the_aeroplane_over_the_sea.wav ID3v2 [&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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[45,1524],"class_list":["post-4374","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-mp3","tag-sheeva"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-18y","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/4374","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=4374"}],"version-history":[{"count":2,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/4374\/revisions"}],"predecessor-version":[{"id":4376,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/4374\/revisions\/4376"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=4374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=4374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=4374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}