LinuxSir.cn,穿越时空的Linuxsir!

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

教我用下mpd,谢谢

[复制链接]
发表于 2009-2-16 20:33:35 | 显示全部楼层 |阅读模式
emerge了mpd和mpc,创建了歌曲数据库,死活不能播放,修改配置文件,动不动就权限问题不能启动服务
给个简单介绍,最好贴个配置文件,谢谢
发表于 2009-2-16 20:38:45 | 显示全部楼层
ncmpc 美
# MPD CONFIG FILE
# For a full description of all config parameters,
# Check the mpd man page, "man mpd".

##################### REQUIRED ###########################

# You can put symlinks in here, if you like.  Make sure
# user that mpd runs as (see the 'user' config parameter)
# can read the files in this directory

# You can put symlinks in here, if you like.  Make sure
# user that mpd runs as (see the 'user' config parameter)
# can read the files in this directory
music_directory                "/home/kernel/music"  
#music_directory                "/mnt/LEISURE/Group"  
playlist_directory        "/home/kernel/.mpd/playlists"

db_file                        "/home/kernel/.mpd/mpd.db"
log_file                "/home/kernel/.mpd/mpd.log"
error_file                "/home/kernel/.mpd/errors.log"
pid_file                "/home/kernel/.mpd/mpd.pid"
state_file  "/home/kernel/.mpd/mpdstate"
user                  "kernel"
##########################################################

##########################################################
# EVERYTHING ELSE IS OPTIONAL
##########################################################

################## AUDIO OUTPUT ##########################
#
# use this if you want to use OSS audio output
#audio_output {
#        type                "oss"
#        name                "my OSS sound card"
#        device                "/dev/dsp" # optional
#        format                "44100:16:2" #optional
#}
#
# use this if you want to use ALSA audio output
audio_output {
        type                "alsa"
        name                "my ALSA device"
#        device                "hw:0,0" # optional
#        format                "44100:16:2" #optional
}
#
# as a last resort, try using libao
#audio_output {
#        type                "ao"
#        name                "default ao output"
#}
#
#
# Set this if you have problems
# playing audio files.
# This will resample your music so
# that it comes out at the set rate.
#
#audio_output_format        "44100:16:2"
#
##########################################################


################### VOLUME MIXER #########################
#
# Examples:
# ALSA Mixer
mixer_type                "software"
volume_normalization    "yes"
#mixer_device                "default"
#mixer_control                "CM"
#
# OSS Mixer
#mixer_type                "oss"
#mixer_device                "/dev/mixer"
#mixer_control                "CM"
#
# Software Mixer
#mixer_type                "software"
#
##########################################################


################# SHOUT STREAMING ########################
#
# Set this to allow mpd to stream its output to icecast2
# (i.e. mpd is a icecast2 source)
#
#audio_output {
#        type                "shout"
#        name                "my cool stream"
#        host                "hostname"
#        port                "8000"
#        mount                "/mpd.ogg"
#        password        "hackme"
#        quality                "5.0"
#        bitrate                "128"
#        format                "44100:16:1"
#
# Optional Paramters
#        user                "source"
#        description        "here's my long descriptiion"
#       genre                "jazz"
#} # end of audio_output
#
##########################################################


################# FILESYSTEM SETTINGS ####################
#
# If the names of files or directories are
# not correctly displayed then set the
# following to the filesystem coding.
#
#        Usually this is either:
#        ISO-8859-1 or UTF-8
#
# After changing the filesystem_charset
# you will need to recreate the db:
#        mpd --create-db
#
filesystem_charset "UTF-8"
#id3v1_encoding "GBK"
#
##########################################################


#################### OPTIONAL FILES ######################
#
# The state file (if set) will be a file
# for storing all current information
# (playlist, playing/paused, etc...) from
# the last MPD session. This will be used
# to recreate your last MPD session after
# restart.
#
#state_file         "/home/kernel/mpd/state"

#
##########################################################


################# REPLAYGAIN #############################
#
# Use Replay Gain (album or title)
#        http://www.replaygain.org
#
#replaygain                "album"
#
# Sets the pre-amp used for files that have replaygain
# info.  Valid values are between -15 to 15 (in dB).
#
#replaygain_preamp        "0"
#
##########################################################


################ OUTPUT BUFFER SETTINGS ##################
#
# You should not need to mess with this
# unless you know what you're doing.
#
#audio_buffer_size        "2048"
#
# This means exactly what it says, it will
# buffer your file up to the percentage of
# the buffer before it begins playing.
#
#buffer_before_play        "25%"
#
##########################################################


################### HTTP PROXY ###########################
#
# http_proxy_host        "proxy.isp.com"
# http_proxy_port        "8080"
# http_proxy_user        "user"
# http_proxy_password        "password"
#
##########################################################


################# SECURITY SETTINGS ######################
#
# It is encouraged to run MPD as
# non-superuser.  If you start mpd as root
# (for example, in an init script), set
# this value, then  mpd will drop root priveleges
# and runs as the user specified.
#
#
# Set this value if you only have one
# address you want to allow connection to.
#
bind_to_address        "127.0.0.1"
port        "6600"
#
# If you want to setup MPD to use
# passwords set them here
#
#password                "password1@read,add,control,admin"
#password                "password2@read"
#
# Specify permissions used by default when no password is
# given by for a connection/client.
#
#default_permissions        "read,add,control,admin"
#
##########################################


################ MISCELLANEOUS OPTIONS ###################
#
#
# This sets the metadata mpd will use, to disable all metadata, set to "none"
# NOTE: comments are disabled by default
#
#metadata_to_use "artist,album,title,genre,date,track,composer,performer,comment"
#
# This setting exists as precaution against attacks.
#
#max_playlist_length        "16384"
#
# Valid options are "default", "secure" or "verbose".
log_level                "default"
#
#connection_timeout        "60"
#
# This should be fine for 2-3 people using clients
# at the same time.
#
#max_connections        "5"
#
# No need to change these unless you know better.
#
#max_command_list_size        "2048"
#max_output_buffer_size "8192"
#
# This will make playlists compatible with normal music
# players.
#
#save_absolute_paths_in_playlists "no"
#
##########################################################
回复 支持 反对

使用道具 举报

发表于 2009-2-16 20:57:57 | 显示全部楼层
这个是很烦人,迷迷糊糊弄了半天才弄好
回复 支持 反对

使用道具 举报

发表于 2009-2-16 21:11:42 | 显示全部楼层
Post by KenShinXF;1948447
这个是很烦人,迷迷糊糊弄了半天才弄好


这个用起来比别的特别的好使么?
回复 支持 反对

使用道具 举报

发表于 2009-2-16 22:24:05 | 显示全部楼层
估计路径权限问题? mpc用户无法访问?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-16 22:29:37 | 显示全部楼层
奇怪,单独安装mpc却不会依赖mpd,这是怎么回事?
回复 支持 反对

使用道具 举报

发表于 2009-2-16 22:42:08 | 显示全部楼层
mpc好像可以连接到网络上的其他mpd服务上。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-16 22:44:23 | 显示全部楼层
哦,原来这样
在重新装mpd/mpc
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-16 22:49:04 | 显示全部楼层
这次好点了,至少有提示了。没有解码器?
localhost frank # mpc play
volume: 77%   repeat: on    random: on
ERROR: problems decoding "国境之南.mp3"
回复 支持 反对

使用道具 举报

发表于 2009-2-16 22:51:00 | 显示全部楼层
mpc不会依赖mpd的,要是依赖mpd,那就失去c/s模式的意义了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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