<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>r3dux.org &#187; mp3</title>
	<atom:link href="http://r3dux.org/tag/mp3/feed/" rel="self" type="application/rss+xml" />
	<link>http://r3dux.org</link>
	<description>A number-pimping side project from the valleys in *NEW* upside-down flavour.</description>
	<lastBuildDate>Fri, 10 Sep 2010 08:00:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How To: Rip CDs with EAC and Lame in Linux</title>
		<link>http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-rip-cds-with-eac-and-lame-in-linux</link>
		<comments>http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 07:10:44 +0000</pubDate>
		<dc:creator>r3dux</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[CD]]></category>
		<category><![CDATA[EAC]]></category>
		<category><![CDATA[Exact Audio Copy]]></category>
		<category><![CDATA[Lame]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[Rip]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://r3dux.org/?p=3281</guid>
		<description><![CDATA[I think I&#8217;ve tried pretty much every piece of CD ripper software on Linux, and my considered weapon of choice is none of them. That&#8217;s not to say there aren&#8217;t good CD rippers for linux, there are some great ones &#8211; but they all either have problems or quirks or lack features I deem essential [...]


Related posts:<ol><li><a href='http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/' rel='bookmark' title='Permanent Link: How To: Convert a Directory of MP3s to WAVs in Linux'>How To: Convert a Directory of MP3s to WAVs in Linux</a></li>
<li><a href='http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/' rel='bookmark' title='Permanent Link: How To: Easily Convert FLAC audio to MP3s in Linux'>How To: Easily Convert FLAC audio to MP3s in Linux</a></li>
<li><a href='http://r3dux.org/2009/02/firefoxs-secret-shame/' rel='bookmark' title='Permanent Link: Firefoxs Secret Shame'>Firefoxs Secret Shame</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I think I&#8217;ve tried pretty much every piece of CD ripper software on Linux, and my considered weapon of choice is <strong><em>none of them</em></strong>. That&#8217;s not to say there aren&#8217;t good CD rippers for linux, there are some great ones &#8211; but they all either have problems or quirks or lack features I deem essential for my own personal ripping tastes, so one by one they get ruled out until there is literally nothing left. What I wanted to use all along was simply EAC (Exact Audio Copy) with the Lame encoder &#8211; just in <em>Linux</em>. So that&#8217;s exactly what I&#8217;m going to do&#8230;</p>
<h4>Wine Setup</h4>
<p><a href="http://www.winehq.org/">Wine</a> is a piece of software which acts as a Microsoft Windows compatibility layer / API interpreter, that is, it contains a rewrite of the Windows APIs and interprets the calls made by Windows software (which a Linux system cannot natively understand) into a Linux-specific system calls (which of course Linux can work with). If this is all a bit more detail than you need then the take away is this: You can run <em>most</em> Windows applications on Linux through Wine.</p>
<p>Installing and configuring Wine on any modern Linux distribution is pretty straight-forward, assuming you&#8217;re using Ubuntu just snag it from the standard repositories through Synaptic or grab it through apt-get with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> wine</pre></div></div>

<p>Next, you&#8217;ll want to configure it, so if the Wine configuration window isn&#8217;t launched as part of the install, then run the following command to bring up the configuration dialogue:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">winecfg</pre></div></div>

<p>From here hit the <strong>Drives</strong> tab and then click on the <strong>[Autodetect...]</strong> button &#8211; what you see on your machine will obviously differ from what I see on this machine in terms of detected drives:</p>
<p><img src="http://r3dux.org/wp-content/uploads/2010/09/Wine-EAC-Drive-Autodetect.jpg" alt="Wine EAC Drive Autodetect" title="Wine EAC Drive Autodetect" width="427" height="327" class="aligncenter size-full wp-image-3282" /></p>
<p>With the drives detected (don&#8217;t worry about not seeing your CD drive for the moment) just click the <strong>[OK]</strong> button and we&#8217;re done for this bit.</p>
<p>A final note &#8211; Wine creates a hidden folder called <strong>.wine</strong> in your home folder, and this is where it puts its configuration files along with all installed Windows applications. If you can&#8217;t see this folder  (i.e. you have Show Hidden Files disabled) and you&#8217;re using Gnome/Nautilus then you can toggle it through the <strong>View | Show Hidden Files</strong> menu option (Shortcut: <strong>Ctrl+H</strong>).</p>
<h4>Getting and Installing Exact Audio Copy</h4>
<p>EAC is freely available from <a href="http://www.exactaudiocopy.de/">here</a>. Get yourself a version <img src='http://r3dux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Once you&#8217;ve downloaded the installer .exe, right-click on it and select <strong>Properties</strong> from the pop-up menu, then go to the <strong>Permissions tab</strong> and check the <strong>Allow executing as a program</strong> checkbox followed by the <strong>[Close]</strong> button:</p>
<p><img src="http://r3dux.org/wp-content/uploads/2010/09/EAC-Allow-Executing-As-A-Program.jpg" alt="EAC Allow Executing As A Program" title="EAC Allow Executing As A Program" width="492" height="384" class="aligncenter size-full wp-image-3283" /></p>
<p>Because not every Windows program will work through Wine, and it&#8217;s often useful to see at what point it&#8217;s failing, it&#8217;s good practice to launch Windows apps through Wine via the command line by using:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wine <span style="color: #000000; font-weight: bold;">&lt;</span>PROGRAM.EXE<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>This way, you can see any Wine or program output in the console, and see what&#8217;s going on. You&#8217;re free to just right-click on an exe and choose <strong>Open with Wine Windows Program Loader</strong> (and if you know a program works properly that&#8217;s probably the best option), but first time at least, run it through the command-line so you can see what (if anything) is happening when you launch the executable.</p>
<p>EAC itself is pretty easy to install, just click Next / Next / Finish etc and let it install to the default location (do pay attention to the part of the install process where it wants you to install the <em>Ask</em> toolbar though &#8211; you probably don&#8217;t want that rubbish). Skip ahead briefly at this point if you&#8217;d like to grab Lame in time to configure it during install, otherwise you can always configure it later on.</p>
<p>Once EAC&#8217;s installed, you can launch it from the terminal with the following (rather fugly) command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wine ~<span style="color: #000000; font-weight: bold;">/</span>.wine<span style="color: #000000; font-weight: bold;">/</span>drive_c<span style="color: #000000; font-weight: bold;">/</span>Program\ Files<span style="color: #000000; font-weight: bold;">/</span>Exact\ Audio\ Copy<span style="color: #000000; font-weight: bold;">/</span>EAC.exe</pre></div></div>

<h4>Installing the Lame Encoder (Windows version)</h4>
<p><a href="http://lame.sourceforge.net/">Lame</a> is IMHO the best mp3 encoder available, and is free, open-source software &#8211; but you probably don&#8217;t want to build it yourself. It&#8217;s a lot quicker and easier to grab a copy from somewhere like <a href="http://www.softpedia.com/get/Multimedia/Audio/Audio-CD-Rippers-Encoders/LAME-MP3-Encoder.shtml">here</a>. Once you&#8217;ve got the zip file, extract it and move the <strong>lame.exe</strong> and <strong>lame_enc.dll</strong> files into your Exact Audio Copy folder (wine ~/.wine/drive_c/Program\ Files/Exact\ Audio\ Copy/) then navigate to that folder, right click on <strong>lame.exe</strong> and enable the execution flag on it just like we did for the EAC installer earlier.</p>
<p>A point to note is that you need to get the 32-bit version of Lame, as Wine won&#8217;t handle the 64-bit version.</p>
<p>During install EAC will ask you where it can find lame, and will have a try at finding it itself &#8211; either allow it to or click the <strong>[Cancel]</strong> button to manually point it at the lame executable.</p>
<h4>Using EAC</h4>
<p>Configuration of EAC is a huge topic, and how far you want to go with it is entirely up to you (and entirely outside the scope of this article) &#8211; but I will say that when you&#8217;re ripping any audio, you&#8217;re going to rip it once, and listen to it a hundred times &#8211; so it makes sense to go for a relatively slow and accurate rip, and then encode the rip at a high bitrate using variable-bitrate encoding.</p>
<p>For my own Lame encoding, I use the following set of parameters to maximise the quality and bitrate of the final mp3 using variable-bitrate encoding:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-q</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-v</span> <span style="color: #000000;">0</span> <span style="color: #660033;">--vbr-new</span> <span style="color: #000000; font-weight: bold;">%</span>s <span style="color: #000000; font-weight: bold;">%</span>d</pre></div></div>

<p>These need to be entered into the <strong>Compression options</strong> section of EAC (from the <strong>File</strong> menu), so my setup looks like this:</p>
<p><img src="http://r3dux.org/wp-content/uploads/2010/09/EAC-Lame-Compression-Options.jpg" alt="EAC Lame Compression Options" title="EAC Lame Compression Options" width="638" height="426" class="aligncenter size-full wp-image-3285" /></p>
<h4>Wrap Up</h4>
<p>With all this in place, you should be able to use EAC just like you might&#8217;ve done before in Windows, with the exact same functionality, and obtaining the exact same quality results. It&#8217;s worth noting that although once configured and working you can easily launch EAC through the Wine menu entry in Gnome or KDE or whatever you&#8217;re using, but if you launch it from the command line get to see the lame encoding output so you can see what kind of bitrate different parts of any given song are using.</p>
<p>Cheers!<a href="http://flattr.com/thing/60602/How-To-Rip-CDs-with-EAC-and-Lame-in-Linux" target="_blank"><br />
<img src="http://api.flattr.com/button/button-static-50x60.png" align="right" alt="Flattr this" title="Flattr this" border="0" /></a></p>


<p>Related posts:<ol><li><a href='http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/' rel='bookmark' title='Permanent Link: How To: Convert a Directory of MP3s to WAVs in Linux'>How To: Convert a Directory of MP3s to WAVs in Linux</a></li>
<li><a href='http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/' rel='bookmark' title='Permanent Link: How To: Easily Convert FLAC audio to MP3s in Linux'>How To: Easily Convert FLAC audio to MP3s in Linux</a></li>
<li><a href='http://r3dux.org/2009/02/firefoxs-secret-shame/' rel='bookmark' title='Permanent Link: Firefoxs Secret Shame'>Firefoxs Secret Shame</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Convert a Directory of MP3s to WAVs in Linux</title>
		<link>http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-convert-a-directory-of-mp3s-to-wavs-in-linux</link>
		<comments>http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 00:11:45 +0000</pubDate>
		<dc:creator>r3dux</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Convert]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[mp32wav]]></category>
		<category><![CDATA[mpg123]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wav]]></category>

		<guid isPermaLink="false">http://r3dux.org/?p=1273</guid>
		<description><![CDATA[I went to burn a couple of audio CDs for the boy today, and bod-frickn-dammit if Brasero / GnomeBaker and K3B didn&#8217;t all threw their hands in the air in dismay that I might actually have the nerve to want to convert mp3s to CD-audio on the fly. Very poor. So, as wav files come [...]


Related posts:<ol><li><a href='http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/' rel='bookmark' title='Permanent Link: How To: Easily Convert FLAC audio to MP3s in Linux'>How To: Easily Convert FLAC audio to MP3s in Linux</a></li>
<li><a href='http://r3dux.org/2009/04/how-to-compress-a-directory-of-files-into-individual-archives/' rel='bookmark' title='Permanent Link: How To: Compress a Directory of Files into Individual Archives'>How To: Compress a Directory of Files into Individual Archives</a></li>
<li><a href='http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/' rel='bookmark' title='Permanent Link: How To: Rip CDs with EAC and Lame in Linux'>How To: Rip CDs with EAC and Lame in Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I went to burn a couple of audio CDs for the boy today, and bod-frickn-dammit if Brasero / GnomeBaker and K3B didn&#8217;t <b><i>all</i></b> threw their hands in the air in dismay that I might actually <i>have the nerve</i> to want to convert mp3s to CD-audio on the fly. Very poor.</p>
<p>So, as wav files come in less flavours than mp3s and tend to work first time, I knocked up a quick script to convert a directory of mp3s to .wav files using <a href="http://www.mpg123.de/">mpg123</a>, it even handles spaces correctly after I&#8217;d given it a stern talking to&#8230; Anyways:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#/bin/bash</span>
<span style="color: #007800;">gotmpg123</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span> mpg123<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># If there's no copy of mpg123 we're not going to be doing any converting. Abort!</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$gotmpg123</span>&quot;</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;No copy of mpg123 found on system! Try running: sudo apt-get install mpg123&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Otherwise, if we're all set, make a directory to dump our wav files into</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> WAV
&nbsp;
<span style="color: #666666; font-style: italic;"># For each file in the current directory that ends with .mp3, convert it to .wav and place in our new WAV folder</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> .<span style="color: #000000; font-weight: bold;">/*</span>.mp3
<span style="color: #000000; font-weight: bold;">do</span>
  mpg123 <span style="color: #660033;">-w</span> .<span style="color: #000000; font-weight: bold;">/</span>WAV<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">${file}</span>&quot;</span>.wav <span style="color: #ff0000;">&quot;<span style="color: #007800;">$file</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>To use the script:<br />
- Copy and paste the above code into a new text file called <i>mp32wav</i> or something<br />
- Make it executable with <b>chmod +x mp32wav</b>, then<br />
- Copy it to <i>/usr/bin</i> for easy access with <b>sudo cp mp32wav /usr/bin/</b></p>
<p>With that all done you can just go into a folder of mp3s in the terminal and fire it off. It&#8217;ll create a folder called <b>WAV</b> inside whatever directory you&#8217;re in and stick the converted wav files there with the original filename but with .wav tacked on the end.</p>
<p>Cheers! </p>
<div class="diggbutton"><script type="text/javascript">digg_url = 'http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/';digg_title = 'How To: Convert a Directory of MP3s to WAVs in Linux';</script><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div>


<p>Related posts:<ol><li><a href='http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/' rel='bookmark' title='Permanent Link: How To: Easily Convert FLAC audio to MP3s in Linux'>How To: Easily Convert FLAC audio to MP3s in Linux</a></li>
<li><a href='http://r3dux.org/2009/04/how-to-compress-a-directory-of-files-into-individual-archives/' rel='bookmark' title='Permanent Link: How To: Compress a Directory of Files into Individual Archives'>How To: Compress a Directory of Files into Individual Archives</a></li>
<li><a href='http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/' rel='bookmark' title='Permanent Link: How To: Rip CDs with EAC and Lame in Linux'>How To: Rip CDs with EAC and Lame in Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Easily Convert FLAC audio to MP3s in Linux</title>
		<link>http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-easily-convert-flac-audio-to-mp3s-in-linux</link>
		<comments>http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 02:56:12 +0000</pubDate>
		<dc:creator>r3dux</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[FLAC]]></category>
		<category><![CDATA[Formats]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[ogg]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[SoundConverter]]></category>

		<guid isPermaLink="false">http://r3dux.org/?p=1011</guid>
		<description><![CDATA[I grabbed a bunch of FLAC files the other day, and as nice as they sound, I don&#8217;t think ~30-40MB per track is acceptable, so I did a bit of research and stumbled across this great post on LinuxTutorialBlog. Turns out there&#8217;s a dead simple GUI based tool called SoundConverter &#8211; which really is as [...]


Related posts:<ol><li><a href='http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/' rel='bookmark' title='Permanent Link: How To: Convert a Directory of MP3s to WAVs in Linux'>How To: Convert a Directory of MP3s to WAVs in Linux</a></li>
<li><a href='http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/' rel='bookmark' title='Permanent Link: How To: Rip CDs with EAC and Lame in Linux'>How To: Rip CDs with EAC and Lame in Linux</a></li>
<li><a href='http://r3dux.org/2010/04/how-to-convert-wbfs-image-files-to-iso-images/' rel='bookmark' title='Permanent Link: How To: Convert .WBFS Image Files to .ISO Images'>How To: Convert .WBFS Image Files to .ISO Images</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I grabbed a bunch of <a href="http://en.wikipedia.org/wiki/Free_Lossless_Audio_Codec">FLAC</a> files the other day, and as nice as they sound, I don&#8217;t think ~30-40MB per track is acceptable, so I did a bit of research and stumbled across <a href="http://www.linuxtutorialblog.com/post/solution-converting-flac-to-mp3">this</a> great post on <a href="http://www.linuxtutorialblog.com">LinuxTutorialBlog</a>.</p>
<p>Turns out there&#8217;s a dead simple GUI based tool called <a href="http://soundconverter.berlios.de/">SoundConverter</a> &#8211; which really is as simple as pointing it at a directory and configuring your transcoding preferences (mp3, ogg, file-naming etc). A swift <b><i>sudo apt-get install soundcoverter</i></b> and a couple of clicks later and the job&#8217;s done.</p>
<p><center><a href="http://r3dux.org/wp-content/uploads/2009/09/SoundConverter1.jpg"><img src="http://r3dux.org/wp-content/uploads/2009/09/SoundConverter1.jpg" alt="SoundConverter1" title="SoundConverter1" width="446" height="278" class="aligncenter size-full wp-image-1012" /></a><a href="http://r3dux.org/wp-content/uploads/2009/09/SoundConverter2.jpg"><img src="http://r3dux.org/wp-content/uploads/2009/09/SoundConverter2.jpg" alt="SoundConverter2" title="SoundConverter2" width="408" height="492" class="aligncenter size-full wp-image-1013" /></a></center></p>
<p>If you really want a bash method, there&#8217;s a bunch of scripts and links in <a href="http://www.linuxtutorialblog.com/post/solution-converting-flac-to-mp3">tfa</a>, such as <a href="http://github.com/tacvbo/yaflac2mp3/blob/master/yaflac2mp3.sh">this</a> one by Octavio Ruiz :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Copyright 2008 Octavio Ruiz</span>
<span style="color: #666666; font-style: italic;"># Distributed under the terms of the GNU General Public License v3</span>
<span style="color: #666666; font-style: italic;"># $Header: $</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Yet Another FLAC to MP3 script</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Author:</span>
<span style="color: #666666; font-style: italic;"># Octavio Ruiz (Ta^3) &lt;tacvbo@tacvbo.net&gt;</span>
<span style="color: #666666; font-style: italic;"># Modification/Fixage:</span>
<span style="color: #666666; font-style: italic;"># r3dux</span>
<span style="color: #666666; font-style: italic;"># Thanks:</span>
<span style="color: #666666; font-style: italic;"># Those comments at:</span>
<span style="color: #666666; font-style: italic;"># http://www.linuxtutorialblog.com/post/solution-converting-flac-to-mp3</span>
<span style="color: #666666; font-style: italic;"># WebPage:</span>
<span style="color: #666666; font-style: italic;"># https://github.com/tacvbo/yaflac2mp3/tree</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This program is distributed in the hope that it will be useful,</span>
<span style="color: #666666; font-style: italic;"># but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR</span>
<span style="color: #666666; font-style: italic;"># WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY</span>
<span style="color: #666666; font-style: italic;"># OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.</span>
<span style="color: #666666; font-style: italic;"># See the GNU General Public License for more details.</span>
&nbsp;
<span style="color: #007800;">LAME_OPTS</span>=<span style="color: #ff0000;">&quot;-V 0 -q 0 --vbr-new&quot;</span>
&nbsp;
<span style="color: #007800;">id3v2</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span> id3v2<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">old_IFS</span>=<span style="color: #800000;">${IFS}</span>
<span style="color: #007800;">IFS</span>=<span style="color: #ff0000;">''</span>
<span style="color: #007800;">files</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*flac'</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> N_files <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${!files[@]}</span>
<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #007800;">vars</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">`</span>metaflac <span style="color: #660033;">--no-utf8-convert</span> <span style="color: #660033;">--export-tags-to</span>=- <span style="color: #ff0000;">&quot;<span style="color: #007800;">${files[${N_files}</span>]}&quot;</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> N_vars <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${!vars[@]}</span>
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(echo &quot;${vars[${N_vars}]%=*}&quot; | tr [:upper:] [:lower:])</span>=<span style="color: #007800;">${vars[${N_vars}</span>]#*=}&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
flac <span style="color: #660033;">-dc</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${files[${N_files}</span>]}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span>\
    <span style="color: #c20cb9; font-weight: bold;">lame</span> <span style="color: #800000;">${LAME_OPTS}</span> <span style="color: #660033;">--ignore-tag-errors</span> <span style="color: #660033;">--add-id3v2</span> \
        <span style="color: #800000;">${artist:+--ta}</span> <span style="color: #800000;">${artist}</span> \
        <span style="color: #800000;">${tracknumber:+--tn}</span> <span style="color: #800000;">${tracknumber}</span> \
        <span style="color: #800000;">${title:+--tt}</span> <span style="color: #800000;">${title}</span> \
        <span style="color: #800000;">${album:+--tl}</span> <span style="color: #800000;">${album}</span> \
        <span style="color: #800000;">${date:+--ty}</span> <span style="color: #800000;">${date}</span> \
        <span style="color: #800000;">${genre:+--tg}</span> <span style="color: #800000;">${genre}</span> \
        <span style="color: #800000;">${comment:+--tc}</span> <span style="color: #800000;">${comment}</span> \
        - <span style="color: #ff0000;">&quot;<span style="color: #007800;">${files[${N_files}</span>]/\.flac/.mp3}&quot;</span>
&nbsp;
    <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-x</span> <span style="color: #800000;">${id3v2}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #800000;">${id3v2}</span> \
        <span style="color: #800000;">${artist:+--artist}</span> <span style="color: #800000;">${artist}</span> \
        <span style="color: #800000;">${tracknumber:+--track}</span> <span style="color: #800000;">${tracknumber}</span> \
        <span style="color: #800000;">${title:+--song}</span> <span style="color: #800000;">${title}</span> \
        <span style="color: #800000;">${album:+--album}</span> <span style="color: #800000;">${album}</span> \
        <span style="color: #800000;">${date:+--year}</span> <span style="color: #800000;">${date}</span> \
        <span style="color: #800000;">${genre:+--genre}</span> <span style="color: #800000;">${genre}</span> \
        <span style="color: #800000;">${comment:+--comment}</span> <span style="color: #800000;">${comment}</span> \
        <span style="color: #ff0000;">&quot;<span style="color: #007800;">${files[${N_files}</span>]/\.flac/.mp3}&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #007800;">IFS</span>=<span style="color: #800000;">${old_IFS}</span></pre></div></div>

<p>I&#8217;ve modded the LAME_OPTS line in the above script to use the <b>-q 0</b> switch in <a href="http://lame.sourceforge.net/">lame</a> (so it uses the highest quality algorithm it can), and changed the order of when the ${LAME_OPTS) options are passed to lame, which results in them actually being honoured. Which is nice. Should you have any specific encoding goals, you can always browse through the <a href="http://lame.cvs.sourceforge.net/*checkout*/lame/lame/doc/html/switchs.html">lame switches</a> and mod it to your hearts content.</p>
<p>Sweet like chocolate =D</p>
<p><b>Note</b>: To run the above script, just copy &#038; paste into a file, maybe <b>flac2mp3.sh</b> or something, then <b>chmod +x flac2mp3.sh</b> to make it executable and run it on a folder like <b>flac2mp3.sh MyFolderOfFLACFiles</b>.</p>
<div class="diggbutton"><script type="text/javascript">digg_url = 'http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/';digg_title = 'How To: Easily Convert FLAC audio to MP3s in Linux';</script><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div>


<p>Related posts:<ol><li><a href='http://r3dux.org/2009/11/how-to-convert-a-directory-of-mp3s-to-wavs-in-linux/' rel='bookmark' title='Permanent Link: How To: Convert a Directory of MP3s to WAVs in Linux'>How To: Convert a Directory of MP3s to WAVs in Linux</a></li>
<li><a href='http://r3dux.org/2010/09/how-to-rip-cds-with-eac-and-lame-in-linux/' rel='bookmark' title='Permanent Link: How To: Rip CDs with EAC and Lame in Linux'>How To: Rip CDs with EAC and Lame in Linux</a></li>
<li><a href='http://r3dux.org/2010/04/how-to-convert-wbfs-image-files-to-iso-images/' rel='bookmark' title='Permanent Link: How To: Convert .WBFS Image Files to .ISO Images'>How To: Convert .WBFS Image Files to .ISO Images</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://r3dux.org/2009/09/how-to-easily-convert-flac-audio-to-mp3s-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
