<?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>gHacks technology news &#187; mpg123</title>
	<atom:link href="http://www.ghacks.net/tag/mpg123/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Mon, 23 Nov 2009 22:22:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configuring gtkpod for Music Playback</title>
		<link>http://www.ghacks.net/2008/12/28/configuring-gtkpod-for-music-playback/</link>
		<comments>http://www.ghacks.net/2008/12/28/configuring-gtkpod-for-music-playback/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 00:07:53 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music and Video]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[gtkpod]]></category>
		<category><![CDATA[mpg123]]></category>
		<category><![CDATA[xmms-mp3]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9397</guid>
		<description><![CDATA[In my recent article I illustrated how to connect your iPod to the Linux application gtkpod. Gtkpod is fairly straightforward, but there can be issues. One of the issues is playback of files. And what good is a multimedia application if it can not play back the files it manages?  Configuring gtkpod is actually quite [...]]]></description>
			<content:encoded><![CDATA[<p>In my recent article I illustrated how to connect your iPod to the Linux application gtkpod. Gtkpod is fairly straightforward, but there can be issues. One of the issues is playback of files. And what good is a multimedia application if it can not play back the files it manages?  Configuring gtkpod is actually quite simple to configure for playback. Of course playback will depend upon which application is installed. You can configure gtkpod playback in two ways: By opening another graphical application or by employing a command-line tool. I am going to show you how to configure both.</p>
<p>The first thing you must do is make sure you have the applications installed on your machine. One reader pointed out that gtkpod had trouble with XMMS (which, I admit, is an old-school application). With modern distributions XMMS is not typically installed, yet gtkpod still defaults to XMMS being the default player on some distributions (Ubuntu and Mandriva for example). We&#8217;ll fix that.</p>
<p><span id="more-9397"></span>Let&#8217;s first show how to get gtkpod running with a command line player. We&#8217;ll use mpg123 because it&#8217;s one of the more universal players. You can install mpg123 either from command line or from the Add/Remove Software utility. From the command line the installation would be something like:</p>
<p>apt-get install mpg123</p>
<p>or</p>
<p>yum install mpg123</p>
<p>One mpg123 is installed you can then fire up gtkpod for configuration.</p>
<p>From the Edit menu select Preferences to open up the configuration window.</p>
<div id="attachment_9399" class="wp-caption alignnone" style="width: 510px"><img class="size-medium wp-image-9399" src="http://www.ghacks.net/wp-content/uploads/2008/12/gtkpod_config-500x396.png" alt="Gtkpod Preferences Window" width="500" height="396" /><p class="wp-caption-text">Gtkpod Preferences Window</p></div>
<p>There are two lines to configure:</p>
<p>Command for &#8216;Play now&#8217;</p>
<p>Command for &#8216;Enqueue&#8217;</p>
<p>Both of these can be configured with the command. As you can see, in the figure above, my Fedora 10 default installation of gtkpod defaults to using XDG. This is an outstanding GUI application for use with gtkpod. But let&#8217;s make a simple change. Edit that line to read:</p>
<p>mpg123 %s</p>
<p>and click OK. Now go back to gtkpod, right click on a song and select &#8220;Play Now&#8221;. The selected song should start playing. Now here&#8217;s one issue with using a command line tool for playback: In order to stop playback you have to open a terminal window and issue the killall command. In our example you would issue the command <em>killall -9 mpg123</em>. Or you could wait for the song to complete. If you queue a number of songs for playback then you will definitetly have to issue the killall command to stop playback.</p>
<p>The same configuration holds true for an external GUI application. The good news about using a GUI application is that you can control the playback of the file much better.</p>
<p>Should you want to use XMMS for the playback of files you will most likely either have to delete the current XMMS (if you do not have mp3 support rolled into your current XMMS installation.) Say you are using Fedora. To change XMMS for mp3 support issue the following commands (as root):</p>
<p>rpm -e xmms (Only if XMMS is already installed)</p>
<p>yum install xmms-mp3</p>
<p>Now if you use XMMS as your playback application you would have <em>xmms %s</em> for your playback configuration.</p>
<p><strong>Final Thoughts</strong></p>
<p>Yes it&#8217;s true, it would be nice if gtkpod had a built in player. However, having a reliable application for syncing an overly-flaky, yet overwhelmingly popular music device far outweighs having to configure the application to use a working playback system.</p>

	Tags: <a href="http://www.ghacks.net/tag/fedora/" title="Fedora" rel="tag">Fedora</a>, <a href="http://www.ghacks.net/tag/gtkpod/" title="gtkpod" rel="tag">gtkpod</a>, <a href="http://www.ghacks.net/tag/ipod/" title="iPod" rel="tag">iPod</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/mpg123/" title="mpg123" rel="tag">mpg123</a>, <a href="http://www.ghacks.net/tag/xmms-mp3/" title="xmms-mp3" rel="tag">xmms-mp3</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/12/26/connect-ipod-to-gtkpod/" title="Connect your iPod to gtkpod (December 26, 2008)">Connect your iPod to gtkpod</a> (8)</li>
	<li><a href="http://www.ghacks.net/2007/02/06/replace-itunes-with-floola/" title="Replace iTunes with Floola (February 6, 2007)">Replace iTunes with Floola</a> (12)</li>
	<li><a href="http://www.ghacks.net/2009/03/12/manage-network-devices-in-fedora/" title="Manage Network Devices in Fedora (March 12, 2009)">Manage Network Devices in Fedora</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/11/18/major-improvements-with-fedora-12/" title="Major improvements with Fedora 12 (November 18, 2009)">Major improvements with Fedora 12</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/18/get-to-know-linux-live-cd/" title="Get To Know Linux: Live CD (February 18, 2009)">Get To Know Linux: Live CD</a> (6)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/12/28/configuring-gtkpod-for-music-playback/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Convert .mp3 files to .wav files in Linux</title>
		<link>http://www.ghacks.net/2008/12/19/convert-mp3-files-to-wav-files-in-linux/</link>
		<comments>http://www.ghacks.net/2008/12/19/convert-mp3-files-to-wav-files-in-linux/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 00:59:33 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music and Video]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[batch conversion]]></category>
		<category><![CDATA[convert mp3]]></category>
		<category><![CDATA[linux mp3]]></category>
		<category><![CDATA[linux tips]]></category>
		<category><![CDATA[mp3 converter]]></category>
		<category><![CDATA[mpg123]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9160</guid>
		<description><![CDATA[With the popularity of mp3 players, and the frustrations of using DRM-crippled music, it is always nice to be able to rip your own mp3 files. There are plenty of Linux tools to handle this task. But what about the mp3 collection that you want to burn onto a playable CD? Although there are many [...]]]></description>
			<content:encoded><![CDATA[<p>With the popularity of mp3 players, and the frustrations of using DRM-crippled music, it is always nice to be able to rip your own mp3 files. There are plenty of Linux tools to handle this task. But what about the mp3 collection that you want to burn onto a playable CD? Although there are many CD players that will play mp3 format, not all will. For that you need to have .wav file format on the CD. One tool for this conversion is the command-line  mpg123 utility. The mpg123 command can do a lot of things, one of the things it is best at is conversion. In this article I am going to show you how to install mpg123 and then use it to convert mp3 files to wav files.</p>
<p><span id="more-9160"></span>The first thing to do is to get mpg123 installed. This can be done very quickly via command line. One of the following commands will do the trick (depending upon which distribution you use):</p>
<p><em>apt-get install mpg123</em></p>
<p><em>urpmi mpg123</em></p>
<p>If you are using Fedora Core you will most likely have to stop by <a title="pbone.net" href="http://rpm.pbone.net" target="_blank">rpm.pbone.net</a>, download the correct rpm package and install with the command:</p>
<p><em>rpm -ivh mpg123-RELEASE_NUMBER.rpm</em></p>
<p>Where RELEASE_NUMBER is the actual release number you download.</p>
<p>Once installed you are ready to go.</p>
<p>With the wav files located in a directory change to that directory to run the command. The format of the command will be:</p>
<p>mpg123 -w file.wav file.mp3</p>
<p>The &#8220;-w&#8221; argument tells mpg123 that the output will be in the .wav format. The first file name is the output file name which is user configurable. A word of warning, spaces in file names aren&#8217;t always the best choice in the Linux operating system. If you want to separate words in a file name you can use &#8220;_&#8221; character. So creating a .wav of Rush&#8217;s Tom Sawyer you would do something like:</p>
<p>mpg123 -w Rush_Tom_Sawyer.wav &#8220;01 &#8211; Tom Sawyer.mp3&#8243;</p>
<p><strong>Batch Conversion</strong></p>
<p>What about batch conversion? This requires a bit of shell scripting. Create a Music directory (in modern Linux distributions there should be one in ~/) and dump all of your mp3 files into that directory. Next, create a shell script in your favorite text editor. We&#8217;ll call that script &#8220;batch_conversion&#8221;. The contents of the script might look like:</p>
<p><em>#!/usr/bin/perl<br />
</em> <em>my $dir = &#8220;~/Music&#8221;;<br />
opendir DH, $dir or die &#8220;Can&#8217;t open  $dir: $!&#8221;;<br />
$count2=1;<br />
while  ($name = readdir DH) {<br />
next unless $name =~ /\.mp3$/;<br />
$wav=&#8221;$count2.wav&#8221;;<br />
print &#8220;$wav\n&#8221;;<br />
system &#8220;mpg123 -w $wav \&#8221;$name\&#8221;";<br />
$count2++;<br />
}</em></p>
<p>Once you save the file you have to give it executable permissions with the command <em>chmod u+x batch_conversion</em>. To run the command you will issue (from the directory the new file is located) <em>./batch_conversion</em>. Once you run the file you will have both the mp3 and the wav files located in the <em>~/Music</em> directory.</p>
<p><strong>Final Thoughts</strong></p>
<p>Converting mp3 files to wav files for burning audio CDs is a simple process with mpg123. There are gui tools for this job but the command line tools make for much more flexible jobs.</p>

	Tags: <a href="http://www.ghacks.net/tag/batch-conversion/" title="batch conversion" rel="tag">batch conversion</a>, <a href="http://www.ghacks.net/tag/convert-mp3/" title="convert mp3" rel="tag">convert mp3</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/linux-mp3/" title="linux mp3" rel="tag">linux mp3</a>, <a href="http://www.ghacks.net/tag/linux-tips/" title="linux tips" rel="tag">linux tips</a>, <a href="http://www.ghacks.net/tag/mp3-converter/" title="mp3 converter" rel="tag">mp3 converter</a>, <a href="http://www.ghacks.net/tag/mpg123/" title="mpg123" rel="tag">mpg123</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2007/03/05/ubuntu-tweaking-guide/" title="Ubuntu Tweaking Guide (March 5, 2007)">Ubuntu Tweaking Guide</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/04/12/quick-linux-tips-file-naming/" title="Quick Linux Tips: File Naming (April 12, 2009)">Quick Linux Tips: File Naming</a> (10)</li>
	<li><a href="http://www.ghacks.net/2008/12/28/configuring-gtkpod-for-music-playback/" title="Configuring gtkpod for Music Playback (December 28, 2008)">Configuring gtkpod for Music Playback</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/12/19/convert-mp3-files-to-wav-files-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
