<?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>蓝色的华 &#187; mpd</title>
	<atom:link href="http://bluehua.org/tag/mpd/feed" rel="self" type="application/rss+xml" />
	<link>http://bluehua.org</link>
	<description>分享所学,backup一切~</description>
	<lastBuildDate>Wed, 23 Nov 2011 08:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ubuntu下mpd+mpc的安装配置</title>
		<link>http://bluehua.org/2010/01/27/896.html</link>
		<comments>http://bluehua.org/2010/01/27/896.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:18:24 +0000</pubDate>
		<dc:creator>冥王星2011</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[mpc]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=896</guid>
		<description><![CDATA[今天大学的一个哥们说在ubuntu下面mpd一直配不好,俺就把俺的配置过程简单写一下 首先 sudo apt-get install mpd mpc 然后复制一份配置文件到自己的用户目录 cd ~ cp /etc/mpd.conf .mpdconf #创建几个文件夹,后面用到 mkdir .mpd mkdir .mpd/playlists 之后编辑.mpdconf,修改如下 #mp3所在的文件夹 music_directory &#34;/media/data/music&#34; #下面几个的user要替换成自己的用户名 playlist_directory &#34;/home/user/.mpd/playlists&#34; db_file &#34;/home/user/.mpd/tag_cache&#34; log_file &#34;/home/hualu/.mpd/mpd.log&#34; pid_file &#34;/home/hualu/.mpd/pid&#34; state_file &#34;/home/hualu/.mpd/state&#34; #替换成自己的用户名 user &#34;user&#34; 除了上面几项,我还修改了下面几个配置,如果改完已上配置就可以运行就没有必要修改下面的了 我注释了下面这行,为了解决mpc报”unable to bind port 6600&#8243;错误的问题 #bind_to_address &#34;localhost&#34; 声卡的配置我改成了下面,否则我用mpc调不了音量,而且有flash的时候会报”Failed to open ALSA device “plug:dmix”: Device or resource busy” audio_output [...]]]></description>
			<content:encoded><![CDATA[<p>今天大学的<a href="http://mindrecorder.info/">一个哥们</a>说在ubuntu下面mpd一直配不好,俺就把俺的配置过程简单写一下<br />
首先</p>

<div class="wp_syntax"><div class="code overflow"><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> mpd mpc</pre></div></div>

<p>然后复制一份配置文件到自己的用户目录</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mpd.conf .mpdconf
<span style="color: #666666; font-style: italic;">#创建几个文件夹,后面用到</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> .mpd
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> .mpd<span style="color: #000000; font-weight: bold;">/</span>playlists</pre></div></div>

<p>之后编辑.mpdconf,修改如下</p>

<div class="wp_syntax"><div class="code overflow"><pre class="text" style="font-family:monospace;">#mp3所在的文件夹
music_directory		&quot;/media/data/music&quot;
#下面几个的user要替换成自己的用户名
playlist_directory		&quot;/home/user/.mpd/playlists&quot;
db_file			&quot;/home/user/.mpd/tag_cache&quot;
log_file			&quot;/home/hualu/.mpd/mpd.log&quot;
pid_file			&quot;/home/hualu/.mpd/pid&quot;
state_file			&quot;/home/hualu/.mpd/state&quot;
#替换成自己的用户名
user				&quot;user&quot;</pre></div></div>

<p>除了上面几项,我还修改了下面几个配置,如果改完已上配置就可以运行就没有必要修改下面的了<br />
我注释了下面这行,为了解决mpc报”unable to bind port 6600&#8243;错误的问题</p>

<div class="wp_syntax"><div class="code overflow"><pre class="text" style="font-family:monospace;">#bind_to_address		&quot;localhost&quot;</pre></div></div>

<p>声卡的配置我改成了下面,否则我用mpc调不了音量,而且有flash的时候会报”Failed to open ALSA device “plug:dmix”: Device or resource busy”</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;">audio_output <span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #7a0874; font-weight: bold;">type</span>		<span style="color: #ff0000;">&quot;alsa&quot;</span>
	name		<span style="color: #ff0000;">&quot;My ALSA Device&quot;</span>
        options <span style="color: #ff0000;">&quot;dev=dmixer&quot;</span>
	mixer_control	<span style="color: #ff0000;">&quot;Master&quot;</span>		<span style="color: #666666; font-style: italic;"># optional</span>
	mixer_index	<span style="color: #ff0000;">&quot;0&quot;</span>		<span style="color: #666666; font-style: italic;"># optional</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>配置完毕,可以使用了</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#首次运行需要初始化一下</span>
mpd <span style="color: #660033;">--create-db</span>
<span style="color: #666666; font-style: italic;">#把所有曲目添加到播放列表</span>
mpc listall <span style="color: #000000; font-weight: bold;">|</span> mpc add
<span style="color: #666666; font-style: italic;">#播放</span>
mpc play</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/01/27/896.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>偶的mpd全局快捷键配置</title>
		<link>http://bluehua.org/2010/01/18/859.html</link>
		<comments>http://bluehua.org/2010/01/18/859.html#comments</comments>
		<pubDate>Mon, 18 Jan 2010 13:08:12 +0000</pubDate>
		<dc:creator>冥王星2011</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[mpc]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=859</guid>
		<description><![CDATA[2010.1.27 更新 发现直接调用mpc next 切歌有时候会把mpd搞死, mpc pause;mpc next;mpc play;这么搞就没问题了&#8230; mpc.sh.4 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 更新一个高级点的,使用zenity提示搜索 下载:mpc.sh.3 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 2010.1.19 更新 ubuntu.org.cn上开的帖子 http://forum.ubuntu.org.cn/viewtopic.php?f=21&#038;t=253241 更新下脚本:mpc.sh.2 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; 换了好多播放器，最终还是回归mpd了&#8230; 配上快捷键和模糊搜索，好用多了。效果如下: 上一首,下一首可以使用notify-send提示 快捷键调出搜索框,跳转到某一首歌 配置过程如下，假设已经装好了mpd和mpc： 1 . 安装notify-send sudo apt-get install libnotify-bin 2 . 下载一个shell脚本 : mpc.sh,将脚本解压到 ~/bin/ 目录 3 . 配置全局快捷键 可用命令如下 #停止 sh /home/yourname/bin/mpc.sh stop #播放/暂停 sh /home/yourname/bin/mpc.sh toggle #下一首 sh /home/yourname/bin/mpc.sh next [...]]]></description>
			<content:encoded><![CDATA[<p>2010.1.27 更新<br />
发现直接调用mpc next 切歌有时候会把mpd搞死, mpc pause;mpc next;mpc play;这么搞就没问题了&#8230;<br />
<a href='http://bluehua.org/wp-content/uploads/2010/01/mpc.sh.4.zip'>mpc.sh.4</a><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
更新一个高级点的,使用<a href="http://library.gnome.org/users/zenity/stable/">zenity</a>提示搜索</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_043.png"><img src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_043.png" alt="" title="screenshot_043" width="510" height="301" class="alignnone size-full wp-image-879" /></a></p>
<p>下载:<a href='http://bluehua.org/wp-content/uploads/2010/01/mpc.sh.3.zip'>mpc.sh.3</a><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
2010.1.19 更新<br />
ubuntu.org.cn上开的帖子 <a href="http://forum.ubuntu.org.cn/viewtopic.php?f=21&#038;t=253241">http://forum.ubuntu.org.cn/viewtopic.php?f=21&#038;t=253241</a><br />
更新下脚本:<a href='http://bluehua.org/wp-content/uploads/2010/01/mpc.sh.2.zip'>mpc.sh.2</a><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
换了好多播放器，最终还是回归mpd了&#8230; 配上快捷键和模糊搜索，好用多了。效果如下:</p>
<p>上一首,下一首可以使用notify-send提示<br />
<a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_040.png"><img class="alignnone size-full wp-image-861" title="screenshot_040" src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_040.png" alt="" width="408" height="292" /></a></p>
<p>快捷键调出搜索框,跳转到某一首歌</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_041.png"><img class="alignnone size-full wp-image-862" title="screenshot_041" src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_041.png" alt="" width="530" height="114" /></a></p>
<p>配置过程如下，假设已经装好了mpd和mpc：<br />
1 . 安装notify-send</p>

<div class="wp_syntax"><div class="code overflow"><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> libnotify-bin</pre></div></div>

<p>2 . 下载一个shell脚本 : <a href='http://bluehua.org/wp-content/uploads/2010/01/mpc.sh.zip'>mpc.sh</a>,将脚本解压到 ~/bin/ 目录<br />
3 . 配置全局快捷键<br />
可用命令如下</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#停止</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>yourname<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mpc.sh stop
<span style="color: #666666; font-style: italic;">#播放/暂停</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>yourname<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mpc.sh toggle
<span style="color: #666666; font-style: italic;">#下一首</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>yourname<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mpc.sh next
<span style="color: #666666; font-style: italic;">#上一首</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>yourname<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mpc.sh prev
<span style="color: #666666; font-style: italic;">#弹出一个搜索窗口</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>yourname<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mpc.sh popfav</pre></div></div>

<p>偶的快捷键的配置</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/01/screenshot_042.png"><img class="alignnone size-full wp-image-864" title="screenshot_042" src="http://bluehua.org/wp-content/uploads/2010/01/screenshot_042.png" alt="" width="593" height="446" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/01/18/859.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.518 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-05 03:13:18 -->

