aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-02-23 23:41:20 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-02-23 23:41:20 +0000
commitd35747a40c7dea12de95f78a4f283a45ef687597 (patch)
tree3a85f138e68c7ef3e5a9ece863ed7266ad1cd7ce /doc
downloadmpd-d35747a40c7dea12de95f78a4f283a45ef687597.tar.gz
mpd-d35747a40c7dea12de95f78a4f283a45ef687597.tar.xz
mpd-d35747a40c7dea12de95f78a4f283a45ef687597.zip
import from SF CVS
git-svn-id: https://svn.musicpd.org/mpd/trunk@1 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--doc/COMMANDS163
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/mpd.1213
-rw-r--r--doc/mpdconf.example30
4 files changed, 410 insertions, 0 deletions
diff --git a/doc/COMMANDS b/doc/COMMANDS
new file mode 100644
index 000000000..4bcc9899f
--- /dev/null
+++ b/doc/COMMANDS
@@ -0,0 +1,163 @@
+ Music Player Daemon - Commands
+
+This document is intended for client developers, not end users.
+
+Format:
+-------
+
+If arguments contain spaces, they should be surrounded by double quotation
+marks, ".
+
+command <type arg1> <type arg2> ...
+ explanation: w/ arg1 and arg2
+
+Command Completion:
+-------------------
+
+A command returns "OK\n" on completion or "ACK some error\n" on failure.
+These denote the end of command execution.
+
+Commands:
+---------
+
+add <string file>
+ add the file _file_ to the playlist
+
+clear
+ clears the current playlist
+
+clearerror
+ clear the current error message in status
+ (this is also accomplished by any command that starts playback)
+
+close
+ close the connection with the MPD
+
+delete <int song>
+ delete _song_ from playlist
+
+find <string type> <string what>
+ finds songs in the db that are exactly _what_
+ _type_ should be "album", "artist", or "title"
+ _what_ is what to find
+
+kill
+ kill MPD
+
+list <string type> <string arg1>
+ list all tags of _type_
+ _type_ should be "album" or "artist"
+ _arg1_ is an optional parameter when type is album, this specifies
+ to list albums by a artist, where artist is specified with
+ arg1
+
+listall <string directory>
+ lists all songs and directories in _directory_ (recursively)
+ _directory_ is optional
+
+load <string name>
+ loads the playlist _name_.m3u from the playlist directory
+
+ls <string directory>
+ list files in _directory_. _directory_ is optional.
+ NOTE: us this only for debugging, not meant to be used by a client.
+ instead use 'lsinfo'
+
+lsinfo <string directory>
+ list contents of _directory_, from the db. _directory_ is optional
+
+move <int from> <int to>
+ move song at _from_ to _to_ in the playlist
+
+next
+ plays next song in playlist
+
+pause
+ pause/resume playing
+
+play <int song>
+ begin playing playlist at song number _song_, _song_ is optional
+
+playlist
+ displays the current playlist
+ NOTE: do not use this, instead use 'playlistinfo'
+
+playlistinfo
+ displays information about the current playlist
+
+previous
+ plays previous song in playlist
+
+random <int state>
+ set random state to _state_, _state_ should be 0 or 1
+
+repeat <int state>
+ set repeat state to _state_, _state_ should be 0 or 1
+
+rm <string name>
+ removes the playlist <name>.m3u from the playlist directory
+
+save <string name>
+ saves the current playlist to _name_.m3u in the playlist directory
+
+search <string type> <string what>
+ same as "find" but searches for any song that contain _what_
+ search is not case sensitive
+
+seek <int song> <int time>
+ seeks to the position _time_ (in seconds) of entry _song_ in the
+ playlist
+
+shuffle
+ shuffles the current playlist
+
+stats
+ display stats
+ artists: number of artists
+ albums: number of albums
+ songs: number of songs
+ uptime: daemon uptime in seconds
+ db_update: last db update in UNIX time
+ playtime: time length of music played
+ songs_played: total number of songs played
+
+status
+ reports current status of player, and volume level.
+ volume: (0-100).
+ repeat: (0 or 1)
+ playlist: (31-bit unsigned integer, the playlist version number)
+ playlistlength: (integer, the length of the playlist)
+ state: ("play", "stop", or "pause")
+ song: (current song playing/paused, playlist song number)
+ time: <int elapsed>:<time total> (of current playing/paused song)
+ bitrate: <int bitrate> (instantaneous bitrate in kbps)
+ error: if there is an error, returns message here
+
+stop
+ stop playing
+
+swap <int song1> <int song2>
+ swap positions of _song1_ and _song2_
+
+update
+ searches mp3 directory for new music and removes old music from the db
+
+volume <int change>
+ change volume by amount _change_
+
+COMMAND LIST
+------------
+
+To facilitate faster adding of files, etc, you can pass a list of commands all
+at once using a command list. The command list beings with:
+
+command_list_begin
+
+And ends with:
+
+command_list_end
+
+It does not execute any commands until the list has ended. The return
+value is whatever the return for a list of commands is. On success
+for all commands, OK is returned. If a command fails, no more commands
+are executed and the appropriate ACK error is returned.
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 000000000..f9a7ccc36
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,4 @@
+man_MANS = mpd.1
+docdir = $(prefix)/share/doc/$(PACKAGE)
+doc_DATA = COMMANDS
+EXTRA_DIST = mpdconf.example $(man_MANS) $(doc_DATA)
diff --git a/doc/mpd.1 b/doc/mpd.1
new file mode 100644
index 000000000..e4c3300d6
--- /dev/null
+++ b/doc/mpd.1
@@ -0,0 +1,213 @@
+.TH "Music Player Daemon" 1
+.SH NAME
+MPD \- A daemon for playing music (mp3, ogg vorbis, and flac)
+.SH SYNOPSIS
+.B mpd
+.RI [ options ]
+.RI [ CONF_FILE ]
+.br
+.B mpd
+.RI [ options ]
+.I PORT MUSIC_DIR PLAYLIST_DIR LOG_FILE ERROR_FILE
+.br
+.SH DESCRIPTION
+MPD is a daemon for playing music (mp3, ogg vorbis, and flac). Music is played
+through the server's audio device. The daemon stores info about all available
+music, and this info can be easily searched and retrieved. Player control, info
+retrieval, and playlist management can all be managed remotely.
+
+MPD searches for a config file in ~/.mpdconf then /etc/mpd.conf or uses
+CONF_FILE. Instead of using a config file, the minimal configuration paramters
+can be specified on the command line: PORT, MUSIC_DIR, PLAYLIST_DIR, LOG_FILE,
+ and ERROR_FILE.
+
+Read more about MPD on http://www.musicpd.org
+.SH OPTIONS
+.TP
+.B --create-db
+(Re)Crete the db file for mpd.
+.TP
+.BI --help
+Output a brief help message.
+.br
+.TP
+.BI --no-daemon
+Don't detach from console or redirect output to log files.
+.TP
+.BI --verbose
+Output verbose amounts of information to the logs
+.TP
+.BI --version
+Print version information.
+.SH PARAMETERS
+Below are a list of parameters that can be specified in the config file. Each line in the config file should be of the form:
+.br
+parameter "value"
+.TP
+.B port <port>
+This specifies the port that MPD listens on. This parameter is required. This is typically 2100.
+.TP
+.B music_directory <directory>
+This specifies the directory where music is located. This parameter is required. The directory path should be an absolute path.
+.TP
+.B playlist_directory <directory>
+This specifies the directory where saved playlists are stored. This parameter is required. The directory path should be an absolute path.
+.TP
+.B log_file <file>
+This specifies where the log file should be located. This parameter is required. The file path should be an absolute path.
+.TP
+.B error_file <file>
+This specifies where the error file should be located. This parameter is required. The file path should be an absolute path.
+.TP
+.B log_level <default, secure, or verbose>
+This specifies how verbose logs are. "default" is minimal logging, "secure" reports from what address a connection is opened, and when it is closed, and "verbose" records excessive amounts of information for debugging purposes. The default is "default".
+.TP
+.B db_file <file>
+This specifies where the db file will be stored. The file path should be an
+absolute path. The default is ".mpddb" in the playlist directory.
+.TP
+.B filesystem_charset <charset>
+This specifies the character set used for the filesystem. A list of supported
+character sets can be obtained by running "iconv -l". The default is
+determined from the locale when the db was originally created.
+.TP
+.B bind_to_address <ip address or hostname or any>
+This specifies which address MPD binds to and listens on. The default is "any",
+which binds to all available addresses.
+.TP
+.B user <user>
+This specifies the user that mpd will run as, if set.
+.TP
+.B password <password@permissions>
+This specifies a password for access to mpd. The format is
+"password@permissions" where permissions is a comma delimmitted list composed
+of "read","add","control", and/or "admin". "read" allows for reading of
+the database, displaying the current playlist, and current status of mpd.
+"add" allows for adding songs and loading playlists. "control" allows
+for all other player and playlist manipulations. "admin" allows the db
+to be updated and for the client to kill mpd. More than one password can
+be specified. An example of a password is "somePassword@read,add".
+.TP
+.B default_permissions <permissions>
+This specifies the permissions of a client that has not been authenticated using
+a password. The format of permissions is specified n the description of the
+"password" config paramter. If not passwords are specified, the default is
+"read,add,control,admin", otherwise it is "" (no permissions).
+.TP
+.B state_file <file>
+This specifies if a state file is used and where it is located. The file path should be an absolute path. The state of mpd will be saved to this file when mpd is terminated by a TERM signal or by the "kill" command.
+.TP
+.B connection_timeout <seconds>
+If a client does not send any new data in this time period, the connection is closed. The default is 60 seconds.
+.TP
+.B max_connections <int>
+This specifies the maximum number of clients that can be connected to MPD. The default is 5 connections.
+.TP
+.B mixer_type <oss or alsa>
+This specifies which mixer to use. The default is oss.
+.TP
+.B mixer_device <mixer dev>
+This specifies which mixer to use. The default for oss is /dev/mixer;
+the default for alsa is "hw:0".
+.TP
+.B mixer_control <string>
+This specifies which mixer control to use (sometimes referred to as the "device"). Examples of mixer controls are PCM, Line1, Master, etc. An example for OSS is "Pcm", and an example for alsa is "PCM".
+.TP
+.B max_playlist_length <int>
+This specifies the maximum number of songs that can be in the playlist. The default is 4096 songs.
+.TP
+.B buffer_size <size in KB>
+This specifies the size of the buffer that mpd uses. The default is 2048 kilobytes.
+.B buffer_before play <0-100%>
+This specifies the amount of buffer that will be filled before a song begins playing. The default is 25%.
+.TP
+.B max_command_list_size <size in KB>
+This specifies the maximum size a command list can be (in kilobytes). The default is 2048 kilobytes.
+.TP
+.B max_output_buffer_size <size in KB>
+This specifies the maximum size of the output buffer to a client (in kilobytes).
+The default is 2048 kilobytes.
+.TP
+.B ao_driver <ao plug-in>
+This specifies the ao plug-in to use for audio output. Typical values for
+Linux include "oss" and "alsa09". The default value is "default".
+.TP
+.B ao_driver_options <ao plug-in options>
+This specifies the options to use for the selected ao_driver. For oss, the
+only option available is "dsp". For alsa09, the available options are:
+"dev", "buf_size", and "periods". Options are assigned using "=" and ";" is
+used to separate options. An example for oss: "dsp=/dev/dsp". An example for
+alsa09: "dev=hw:0,0;buf_size=4096". The default value is "".
+.TP
+.B audio_write_size <size in bytes>
+This specifies how many bytes mpd writes to the audio device at once. The
+default is 1024. This options is to work around a bug in older versions
+of libao on sound cards with very small buffers.
+.TP
+.B save_absolute_paths_in_playlists <yes or no>
+This specifies whether relative or absolute paths for song filenames are
+used when saving playlists. The default value is "no".
+.SH EXAMPLES
+.TP
+Below is an example config file. (Note: '#' at the beginning of a line denotes
+a comment. The '#' must be the first character/symbol on that line.)
+.br
+
+.br
+# required
+.br
+port "2100"
+.br
+music_directory "/home/shank/mp3"
+.br
+playlist_directory "/home/shank/playlists"
+.br
+log_file "/home/shank/mpd.log"
+.br
+error_file "/home/shank/mpd.error"
+.br
+
+.br
+# optional
+.br
+mixer_type "oss"
+.br
+mixer_device "/dev/mixer"
+.br
+#mixer_type "alsa"
+.br
+#mixer_device "default"
+.br
+#ao_driver "oss"
+.br
+#ao_driver_options "dsp=/dev/dsp"
+.br
+max_playlist_length "4096"
+.br
+buffer_before_play "25%"
+.br
+#db_file "/home/shank/playlists/.mpddb"
+.br
+#state_file "/home/shank/playlists/.mpdstate"
+.br
+#user "shank"
+.br
+connection_timeout "60"
+.br
+max_connections "5"
+.br
+max_command_list_size "2048"
+.br
+max_output_buffer_size "2048"
+.br
+save_absolute_paths_in_playlists "no"
+.br
+# log_level can be "default", "secure", "verbose"
+.br
+log_level "default"
+.br
+# if bind_to_address is "any", MPD binds all addresses
+.br
+bind_to_address "any"
+.SH SEE ALSO
+mpc(1)
diff --git a/doc/mpdconf.example b/doc/mpdconf.example
new file mode 100644
index 000000000..278588390
--- /dev/null
+++ b/doc/mpdconf.example
@@ -0,0 +1,30 @@
+# required
+port "2100"
+music_directory "/home/shank/mp3"
+playlist_directory "/home/shank/playlists"
+log_file "/home/shank/mpd.log"
+error_file "/home/shank/mpd.error"
+
+# optional
+mixer_type "oss"
+mixer_device "/dev/mixer"
+#mixer_control "Pcm"
+#mixer_type "alsa"
+#mixer_device "default"
+#mixer_control "PCM"
+#ao_driver "oss"
+#ao_driver_options "dsp=/dev/dsp"
+max_playlist_length "4096"
+buffer_before_play "25%"
+#db_file "/home/shank/playlists/.mpddb"
+#state_file "/home/shank/playlists/.mpdstate"
+#user "shank"
+connection_timeout "60"
+max_connections "5"
+max_command_list_size "2048"
+max_output_buffer_size "2048"
+save_absolute_paths_in_playlists "no"
+# log_level can be "default", "secure", "verbose"
+log_level "default"
+# when bind_to_address is set to "any", MPD binds all available addresses
+bind_to_address "any"