LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3536|回复: 24

发现一个不错的播放器mpd

[复制链接]
发表于 2006-10-16 19:42:50 | 显示全部楼层 |阅读模式
关于mpd:
Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists. MPD is designed for integrating a computer into a stereo system that provides control for music playback over a local network. It is also makes a great desktop music player, especially if you are a console junkie, like frontend options, or restart X often.


能播放:MP3, Ogg,FLAC, AAC, Mod, 和wav文件。

关键是它是一个C/S结构的播放器,它只是服务端。(听说xmms2也是这个架构)
占用资源很少,你只要通过你任意喜欢的客户端对他进行控制。
选好播放列表之后,你就可以把客户端给关了,哈哈省资源。

安装:
arch很简单
[php]
pacman -S mpd
[/php]

官方的安装:
Install

Requirements
1) libao libraries and headers are required!
2) zlib libraries and headers are required!

Libs included with source (i.e. nothing needed for these): libid3tag and libmad

Optional
1) for ogg vorbis support: libogg and libvorbis
2) for flac support: flac 1.1
3) for wave/aiff/au support: audiofile
4) for MP4/AAC support: FAAD2
5) for Mod support: libmikmod

Download
Current Version is 0.12.1
Source tar.bz2 tar.gz
Arch Linux: pacman -S mpd
Debian (sarge): apt-get install mpd
Gentoo: emerge mpd
FreeBSD: in the ports tree under audio/musicpd
NetBSD: in the ports tree under audio/musicpd

Installing from Source
1) download mpd
2) untar and unzip
3) configure (type "./configure")
4) compile (type "make")
5) run: src/mpd
6) find a client that you like

Recommended
Create a mpd config file:
1) as root: make install
2) Edit doc/mpdconf.example
3) Save to ~/.mpdconf or /etc/mpd.conf.
4) Restart mpd: killall mpd && mpd

For more info on the config file parameters, check the mpd man page (type "man mpd").


我装的是svn版本
[php]
svn co https://svn.musicpd.org/mpd/trunk mpd
[/php]
然后编译安装一下就可以了。

配置:
在源代码目录下的doc文件夹有个mpdcon.sample
[php]
mv mpdconf.sample ~/.mpdconf
[/php]
看里面的说明配置一下,注意的地方就几点:

[php]
music_directory                 "~/music" #(音乐库的位置)
playlist_directory              "~/.mpd/playlists"
db_file                         "~/.mpd/mpd.db"
log_file                        "~/.mpd/mpd.log"
error_file                      "~/.mpd/mpd.error"
#配置端口,让别人可以访问
bind_to_address                 "any"
port                            "6600"
#一些编码设置
filesystem_charset              "UTF-8" #你的locale
id3v1_encoding                  "GBK"     #Mp3 tag的编码
[/php]

我的locale是utf8
到目前为止只是装好了服务端。

没有客户端你就不能控制它的播放,作用相当于电视机的遥控(很贴切)
客户端有很多选择,我选的是phpmp2,是php写的网页,方便,这样如果别人没有linux,也可以点歌了。。
命令行方式有:ncmpc...
看自己喜好吧。
自己去他的主页上看吧:http://www.musicpd.org/

用途:
目前我觉得用作办公室的音乐点播器不错,一个办公室不可能大家都放音乐,只能一个音箱放音乐才舒服,而且大家都能控制。哈哈。


如果有conky,也可以监控mpd。


下面是我这里的效果:

conky监控和phpmp2界面

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2006-10-16 19:49:33 | 显示全部楼层
conky设置得不错
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-16 20:24:50 | 显示全部楼层
Post by flycraft
conky设置得不错

真是不好意思,只是把默认的配置文件英文改成中文的,哈哈
回复 支持 反对

使用道具 举报

发表于 2006-10-16 21:43:43 | 显示全部楼层
mpd 不错. 轻巧.
我用 glurp 做它的前端. 还加了个 mpd 的用户来运行 mpd .





感觉象广告:....价格便宜量又足....
回复 支持 反对

使用道具 举报

发表于 2006-10-16 23:29:11 | 显示全部楼层
我的音乐文件都放在windows分区的,.mpddb里的中文歌名很多都是乱码,用的client gmpc也是对应乱码,可中文目录都正常,不知道怎么解决,我用的是zh_cn.utf8。

这个播放器真的很cool:)
回复 支持 反对

使用道具 举报

发表于 2006-10-17 00:54:09 | 显示全部楼层
看了下man,在.mpdconf里面加上:
id3v1_encoding                "GBK"
再重新建立数据库就好了,现在mpd就更完美了:)
回复 支持 反对

使用道具 举报

发表于 2006-10-17 12:13:06 | 显示全部楼层
是不是不能放wma?
回复 支持 反对

使用道具 举报

发表于 2006-10-17 12:42:22 | 显示全部楼层
[nooms]
Server = http://arch.nooms.de/pkg/i686

既然有人喜欢,就贴一个源,这个源里面有mpd-svn,gmpc-svn
直接pacman -S mpd-svn就ok。
回复 支持 反对

使用道具 举报

发表于 2006-10-17 17:21:11 | 显示全部楼层
YourLai 能把你的conky配置文件发一下吗?
谢谢了
回复 支持 反对

使用道具 举报

发表于 2006-10-17 17:42:29 | 显示全部楼层
Post by KenShinXF
YourLai 能把你的conky配置文件发一下吗?
谢谢了

同求,顶一下!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表