<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.townx.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>townx - Sneetchalizer: nice Ruby audio format transformer/tag transferrer - Comments</title>
 <link>http://www.townx.org/blog/elliot/nice-ruby-audio-format-transformer-tag-transferrer</link>
 <description>Comments for &quot;Sneetchalizer: nice Ruby audio format transformer/tag transferrer&quot;</description>
 <language>en</language>
<item>
 <title>Also, you can specify</title>
 <link>http://www.townx.org/blog/elliot/nice-ruby-audio-format-transformer-tag-transferrer#comment-39444</link>
 <description>&lt;p&gt;Also, you can specify multiple input formats using a comma: &#039;mp3,m4a,wma&#039;. Input format is only neccesary when passing directory arguments, as file arguments are handled by context (read: file extension). The &quot;copy&quot; output option copies files directly, bypassing decoding/encoding steps (useful in conjunction with --rename). &lt;/p&gt;</description>
 <pubDate>Sun, 24 May 2009 14:32:00 -0500</pubDate>
 <dc:creator>Golly Trip</dc:creator>
 <guid isPermaLink="false">comment 39444 at http://www.townx.org</guid>
</item>
<item>
 <title>Sneetchalizer: nice Ruby audio format transformer/tag transferrer</title>
 <link>http://www.townx.org/blog/elliot/nice-ruby-audio-format-transformer-tag-transferrer</link>
 <description>&lt;p&gt;I have quite a few ogg files, as well as a few mp3s. Occasionally I like to change formats around so I can play oggs on my mp3 player, or give them to friends and family. I have a few batch scripts lying around which do this using ogg2mp3, toolame etc., but they lose the ogg tags and I usually end up with mp3s without tags.&lt;/p&gt;

&lt;p&gt;I thought things could be better, so I went in search of a tool to help. I found a Ruby script called &lt;a href=&quot;http://badcomputer.org/unix/code/sneetchalizer/&quot;&gt;The Sneetchalizer&lt;/a&gt;, which is great. To get it working I had to install &lt;a href=&quot;http://rubyforge.org/projects/ruby-mp3info/&quot;&gt;ruby-mp3info&lt;/a&gt; (using gem) and download &lt;a href=&quot;http://rubyforge.org/projects/ruby-ogginfo/&quot;&gt;ruby-ogginfo&lt;/a&gt;. The latter isn&#039;t a gem, so you have to make sure you include it in Ruby&#039;s load path (see the example below). Also, rather than install it, I just pulled the sneetchalizer file out of the tarball, added a .rb to the end of it, and ran it directly using Ruby.&lt;/p&gt;

&lt;p&gt;Sneetchalizer uses a whole bunch of Linux command line tools and Ruby libraries to do its work, but providing you&#039;ve got them installed (probably you just need oggenc, oggdec and lame or toolame), it works a charm. It supports a whole load of audio formats and options, so had no problem with my ogg to mp3 challenge.&lt;/p&gt;

&lt;p&gt;Here&#039;s an example of the command line I used to translate some ogg files in one directory into mp3s in another one:&lt;/p&gt;



&lt;pre&gt;
ruby -I ~/Desktop ~/Desktop/sneetchalizer.rb --out=mp3 --in=ogg -r --sanitize \
-D /home/ell/no_backup/music/for_chloe_mp3s /home/ell/no_backup/music/for_chloe
&lt;/pre&gt;



&lt;p&gt;Notice the -I option passed to Ruby, which makes any Ruby files in the stated path (~/Desktop in my case) available on the load path. I also like the fact that you can tell it to sanitize tags (&lt;tt&gt;--sanitize&lt;/tt&gt;); and work recursively (&lt;tt&gt;-r&lt;/tt&gt;).&lt;/p&gt;</description>
 <comments>http://www.townx.org/blog/elliot/nice-ruby-audio-format-transformer-tag-transferrer#comments</comments>
 <category domain="http://www.townx.org/tech">tech</category>
 <pubDate>Fri, 14 Dec 2007 17:37:56 -0600</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">692 at http://www.townx.org</guid>
</item>
</channel>
</rss>
