_ _ ___ | |__ __ _ _______ | |_ / _ \| '_ \ / _` |_ / _ \| __| | (_) | | | | (_| |/ / (_) | |_ \___/|_| |_|\__,_/___\___/ \__|
| ohazot | docs | links | dev | conf | txt |
| es | en |
| mdoc file |
| search |
mpd —
music player daemon - usage, config,
clients and tips
DESCRIPTION
MPD is a music daemon which can be crontrolled through different clients.
CONFIG
MPD provides a sample config file which can be found at /etc/mpd.conf. Uncomment and edit the following lines as needed.
music_directory MUSIC_DIR playlist_directory "PLAYLIST_DIR" db_file "DATABASE_FILE" log_file "LOG_FILE" pid_file "PID_FILE" state_file "STATE_FILE" sticker_file "SQL_FILE" port "6600"
Outputs
Multiple outputs can be enabled.
audio_output {
type "alsa"
name "My ALSA Device"
mixer_type "software" # optional
}
audio_output {
type "pulse"
name "My Pulse Output"
}
HTTPD streaming
An httpd streaming output can be configured to be played using the url http://HOST:PORT.
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
port "8000"
bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
bitrate "128" # do not define if quality is defined
format "44100:16:1"
max_clients "0" # optional 0=no limit
}
ENV
| MPD_HOST |
| MPD_PORT |
Command line options
| mpd [CONFIG_FILE] | | start mpd. CONFIG_FILE can be specified. |
| mpd --kill [CONFIG_FILE] | | kill mpd session. If CONFIG_FILE is given, kill session running from CONFIG_FILE |
CLIENTS
| mpc | | command line client. |
| ncmpc | | ncurses client. |
| ncmpcpp | | ncurses client inspired by ncmpc (written in c++). |
| vimpc | | ncurses client with vi-like bindings. |
mpc
mpc [COMMAND]format
Format to display songs in playlist:
| ENV | | MPC_FORMAT | | MPC_FORMAT="%position% - %file%" |
| command line | | | | mpc -f "%position% - %file%"
playlist |
queue control
toggle , next , prev , clear , shuffle
playing modes
random , single , repeat , consume
commands
| playlist | | | | display queue. |
| lsplaylist | | | | display available playlists. |
| update | | [MPD_DIR] | | update database, if directory is given, only that directory will be updated. |
| vol | | [+-]N | | mpc vol +10 | mpc vol
50. |
| save | | PLAYLIST | | save playlist. |
| load | | PLAYLIST | | load playlist. |
| rm | | PLAYLIST | | remove playlist. |
| seek | | [+-]N | | seek position in song, eg.: seek -20. |
| del | | QUEUE_ID | | delete song in given position, if position is 0, delete the current song. |
| search | | TYPE QUERY | | search song in database, eg.: search filename "SEARCH_TERM". |
| searchplay | | TYPE QUERY | | play song in queue matching the query, eg.: searchplay filename "SEARCH TERM". |
| add | | FILEPATH | | add file to the end of the queue (can read input from pipes). |
| insert | | FILEPATH | | add file to the queue after the current song (can read input from pipes). |
| outputs | | | | display available outputs. |
| disable | | OUTPUT_ID | | disable output. |
| enable | | OUTPUT_ID | | enable output. |
Examples
mpc search filename
"SEARCH" | mpc addmpc search filename
"SEARCH" | mpc insertSLACKWARE
slackbuilds
mpd has the requirement fmt from slackbuilds which conflicts with the core fmt, editing this requirement should avoid the conflict. The version 0.23.16 on the repository does not build, the version can be changed to 0.24.6 which works fine.
SEE ALSO
- ArchLinux manpages: mpd(1) , mpd.conf(5) , mpc(1) , ncmpc(1) , ncmpcpp(1)
links
| - mpd |
| - vimpc |