1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488
|
.\" Start example.
.de EX
. nr mE \\n(.f
. nf
. nh
. ft CW
..
.
.\" End example.
.de EE
. ft \\n(mE
. fi
. hy \\n(HY
..
.
.TH MOC 1 "16 November 2016" "Version 2.6-alpha3" "Music On Console"
.ad l
.SH NAME
MOC \- Console audio player
.LP
.SH SYNOPSIS
\fBmocp\fR [\fIOPTIONS\fR] [\fIFILE\fR|\fIDIR\fR ...]
.LP
.SH DESCRIPTION
MOC is a console audio player with simple ncurses interface. It supports
OGG, WAV, MP3 and other formats. Just run \fBmocp\fP, go to some directory
using the menu and press enter to start playing the file. The program will
automatically play the rest of the files in the directory.
.LP
With no options and no file arguments the program begins in current
directory, or in \fBMusicDir\fP if the \fBStartInMusicDir\fP option is set
in the configuration file. If you give a directory on the command line,
MOC will try to go there. If a playlist is given, then it is loaded.
With multiple files, playlists or directories, everything will be added to
the playlist recursively (including the contents of any playlist given).
(Note that relative paths in playlists are resolved with respect to the
directory of the playlist, or of the symlink being used to reference it.)
.LP
.SH OPTIONS
If an option can also be set in the configuration file the command line
overrides it (but see the \fB\-O\fP option for the list-valued
configuration file options exception).
.LP
.TP
\fB\-D\fP, \fB\-\-debug\fP
Run MOC in debug mode. The client and server log a lot of information
to debug files. Don't use this; the server log is large. This is only
available if MOC was compiled without \fB\-\-disable\-debug\fP.
.LP
.TP
\fB\-S\fP, \fB\-\-server\fP
Run only the server and exit.
.LP
.TP
\fB\-F\fP, \fB\-\-foreground\fP
Implies \fB\-S\fP. Run the server in foreground and log everything to stdout.
.LP
.TP
\fB\-R\fP \fINAME\fP[\fB:\fP...], \
\fB\-\-sound\-driver\fP \fINAME\fP[\fB:\fP...]
Use the specified sound driver(s). They can be \fBOSS\fP, \fBALSA\fP,
\fBJACK\fP, \fBSNDIO\fP or \fBnull\fP (for debugging). Some of the drivers
may not have been compiled in. This option is called \fBSoundDriver\fP in
the configuration file.
.LP
.TP
\fB\-m\fP, \fB\-\-music\-dir\fP
Start in \fBMusicDir\fP (set in the configuration file). This can be also
set in the configuration file as \fBStartInMusicDir\fP.
.LP
.TP
\fB\-q\fP, \fB\-\-enqueue\fP
Add files given after command line options to the queue. Don't start the
interface.
.LP
.TP
\fB\-a\fP, \fB\-\-append\fP
Append files, directories (recursively) and playlists given after command
line options to the playlist. Don't start the interface.
.LP
.TP
\fB\-c\fP, \fB\-\-clear\fP
Clear the playlist.
.LP
.TP
\fB\-p\fP, \fB\-\-play\fP
Start playing from the first item on the playlist.
.LP
.TP
\fB\-l\fP, \fB\-\-playit\fP
Play files given on the command line without modifying the clients'
playlists.
.LP
.TP
\fB\-f\fP, \fB\-\-next\fP
Request playing the next song from the server's playlist.
.LP
.TP
\fB\-r\fP, \fB\-\-previous\fP
Request playing the previous song from the server's playlist.
.LP
.TP
\fB\-s\fP, \fB\-\-stop\fP
Request the server to stop playing.
.LP
.TP
\fB\-x\fP, \fB\-\-exit\fP
Bring down the server.
.LP
.TP
\fB\-P\fP, \fB\-\-pause\fP
Request the server to pause playing.
.LP
.TP
\fB\-U\fP, \fB\-\-unpause\fP
Request the server to resume playing when paused.
.LP
.TP
\fB\-G\fP, \fB\-\-toggle\-pause\fP
Toggle between play and pause.
.LP
.TP
\fB\-k\fP [\fB+\fP|\fB\-\fP]\fIN\fP, \
\fB\-\-seek \fP[\fB+\fP|\fB\-\fP]\fIN\fP
Seek forward (positive) or backward (negative) by \fIN\fP seconds in the
file currently being played.
.LP
.TP
\fB\-T\fP \fITHEME\fP, \fB\-\-theme\fP \fITHEME\fP
Use a theme file. If the path is not absolute, the file will be searched
for in \fB/usr/share/moc/themes/\fP (depends on installation prefix),
\fB~/.moc/themes/\fP and the current directory.
.LP
.TP
\fB\-C\fP \fIFILE\fP, \fB\-\-config\fP \fIFILE\fP
Use the specified configuration file (which must be readable) instead of the
default. As this file can specify commands which invoke other applications
MOC will refuse to start if it is not owned by either root or the current
user, or if it is writable by anyone other than its owner.
.LP
.TP
\fB\-\-no\-config\fP
Do not read any configuration file but use the built-in defaults.
.LP
.TP
\fB\-O\fP \fINAME\fP[\fB+\fP]\fB=\fP\fIVALUE\fP, \
\fB\-\-set\-option\fP \fINAME\fP[\fB+\fP]\fB=\fP\fIVALUE\fP
Override configuration file option NAME with VALUE. This option can be
repeated as many times as needed and the option name is not case sensitive.
Most option values are set before the configuration file is processed (which
allows the new values to be picked up by substitutions); however, list-valued
options are overridden afterwards (which gives the choice of whether the
configured values are replaced or added to).
.IP
See the example configuration file (\fBconfig.example\fP) for a description
of the options available.
.LP
.RS
.EX
Examples: \fB\-O AutoNext=no\fP
\fB\-O messagelingertime=1 \-O XTerms+=xxt:xwt\fP
.EE
.RE
.IP
Note that MOC does not perform variable substitution as it does for values
read from the configuration file.
.LP
.TP
\fB\-M\fP \fIDIR\fP, \fB\-\-moc\-dir\fP \fIDIR\fP
Use the specified MOC directory instead of the default. This also causes
the configuration file from that directory to be used. This can also be
specified in the configuration file using the \fBMOCDir\fP option.
.LP
.TP
\fB\-y\fP, \fB\-\-sync\fP
This copy of the interface will synchronize its playlist with other clients.
This option is called \fBSyncPlaylist\fP in the configuration file.
.LP
.TP
\fB\-n\fP, \fB\-\-nosync\fP
This copy of the interface will not synchronize its playlist with other
clients (see above).
.LP
.TP
\fB\-A\fP, \fB\-\-ascii\fP
Use ASCII characters to draw lines. (This helps on some terminals.)
.LP
.TP
\fB\-i\fP, \fB\-\-info\fP
Print the information about the file currently being played.
.LP
.TP
\fB\-Q\fP \fIFORMAT_STRING\fP, \fB\-\-format\fP \fIFORMAT_STRING\fP
Print information about the file currently being played using a format
string. Replace string sequences with the actual information:
.IP
.RS 16
.EX
\fB%state\fP State
\fB%file\fP File
\fB%title\fP Title
\fB%artist\fP Artist
\fB%song\fP SongTitle
\fB%album\fP Album
\fB%tt\fP TotalTime
\fB%tl\fP TimeLeft
\fB%ts\fP TotalSec
\fB%ct\fP CurrentTime
\fB%cs\fP CurrentSec
\fB%b\fP Bitrate
\fB%r\fP Rate
.EE
.RE
.IP
It is also possible to use variables from the \fBFormatString\fP
configuration file option.
.LP
.TP
\fB\-e\fP, \fB\-\-recursively\fP
Alias of \fB\-a\fP for backward compatibility.
.LP
.TP
\fB\-h\fP, \fB\-\-help\fP
Print a list of options with short descriptions and exit.
.LP
.TP
\fB\-\-usage\fP
Print a synopsis of the mocp command and exit.
.LP
.TP
\fB\-V\fP, \fB\-\-version\fP
Print the program version and exit.
.LP
.TP
\fB\-\-echo-args\fP
Print the POPT-interpreted command line arguments and exit.
.LP
.TP
\fB\-v\fP [\fB+\fP|\fB\-\fP]\fIN\fP, \
\fB\-\-volume\fP [\fB+\fP|\fB\-\fP]\fIN\fP
Adjust the mixer volume. You can set (\fB\-v 50\fP) or adjust
(\fB\-v +10\fP, \fB\-v \-10\fP).
.LP
.TP
\fB\-t\fP \fIOPTION\fP[\fB,\fP...], \fB\-\-toggle\fP \fIOPTION\fP[\fB,\fP...]
.TQ
\fB\-o\fP \fIOPTION\fP[\fB,\fP...], \fB\-\-on\fP \fIOPTION\fP[\fB,\fP...]
.TQ
\fB\-u\fP \fIOPTION\fP[\fB,\fP...], \fB\-\-off\fP \fIOPTION\fP[\fB,\fP...]
Followed by a list of identifiers, these will control MOC's playlist
options. Valid identifiers are \fBshuffle\fP, \fBrepeat\fP and \fBautonext\fP.
They can be shortened to '\fBs\fP', '\fBr\fP' and '\fBn\fP' respectively.
Both the identifiers and short forms are case insensitive.
.LP
.RS
.EX
Example: \fB\-t shuffle,R,n\fP
.EE
would toggle shuffle, repeat and autonext all at once.
.RE
.LP
.TP
\fB\-j\fP \fIN\fP{\fBs\fP|\fB%\fP}, \fB\-\-jump\fP \fIN\fP{\fBs\fP|\fB%\fP}
Jump to some position in the current file. \fIN\fP is the number of seconds
(when followed by an '\fBs\fP') or the percent of total file time (when
followed by a '\fB%\fP').
.LP
.RS
.EX
Examples: \fB\-j 10s\fP, \fB\-j 50%\fP
.EE
.RE
.LP
.SH USING POPT ALIASES
MOC uses the POPT library to process its command line. This allows
users to assign MOC options and arguments to an alias of their choosing.
The aliases are just lines in the \fB~/.popt\fP text file and have the
general form:
.IP
.RS
.EX
.BI mocp " " alias " " \fInewoption\fP " " \fIexpansion\fP
.EE
.RE
.LP
This works as if \fIexpansion\fP textually replaces \fInewoption\fP
on the command line. The replacement is recursive; that is,
other \fInewoption\fPs can be embedded in the \fIexpansion\fP.
The \fIexpansion\fP is parsed similarly to a shell command, which
allows \\, ", and ' to be used for quoting. If a backslash is the
final character on a line, the next line in the file is assumed to be a
logical continuation of the line containing the backslash, just as in
the shell. The \fInewoption\fP can be either a short or long option,
and any syntactically valid name the user wishes to use.
.LP
If you add a description for the new option and/or for any argument by
appending the special POPT options \fB\-\-POPTdesc\fP and \fB\-\-POPTargs\fP,
then the option will be displayed in the output of \fB\-\-help\fP and
\fB\-\-usage\fP. The value for these two options are strings of the form
\fB$"\fP\fIstring\fP\fB"\fP.
.LP
So, for example:
.IP
.RS
.EX
\fBmocp alias \-\-single \-D \-\-set\-option autonext=no \\\fP
\fB \-\-POPTdesc=$"Play just the file selected"
.EE
.RE
.LP
would allow the user to turn on logging (\fB\-D\fP) and override
the configuration file's \fBAutoNext\fP option setting just by using
\fB\-\-single\fP as an option to the mocp command.
.LP
Sometimes you may wish to provide values to aliased options from the
command line. If just one aliased option has such a value, then it's
a simple matter of placing it last:
.LP
.IP
.RS
.EX
\fBmocp alias \-\-yours \-\-sound-driver OSS \-\-theme
.EE
.RE
.LP
when used like this:
.LP
.IP
.RS
.EX
\fBmocp \-\-yours your_theme
.EE
.RE
.LP
would result in:
.LP
.IP
.RS
.EX
\fBmocp \-\-sound-driver OSS \-\-theme your_theme
.EE
.RE
.LP
But aliasing multiple options with such values means making use of the
special construct \fB!#:+\fP (and quoting carefully):
.LP
.IP
.RS
.EX
\fBmocp alias \-1 "\-R !#:+" "\-T my_theme" "\-O !#:+"
.EE
.RE
.LP
when used like this:
.LP
.IP
.RS
.EX
\fBmocp \-1 OSS shuffle=yes ~/my_music
.EE
.RE
.LP
would result in:
.LP
.IP
.RS
.EX
\fBmocp \-R OSS \-T my_theme \-O shuffle=yes ~/my_music
.EE
.RE
.LP
There is also a \fB~/.popt\fP entry which allows for the execution of
a different program when the associated option is used. For this, an
\fBexec\fP is used in place of the \fBalias\fP and the \fIexpansion\fP
is the program to be executed:
.LP
.IP
.RS
.EX
\fBmocp exec \-\-help /usr/bin/man 1 mocp \\
\fB POPTdesc=$"Provide the man page instead of help"
.EE
.RE
.LP
This would override the usual MOC \fB\-\-help\fP output and use the
system's \fBman\fP program to present this man page instead.
.LP
Note that while \fB~/.popt\fP (or \fB/etc/popt\fP) is the default POPT
configuration file, you can nominate specific file(s) to be used instead
via the \fBMOCP_POPTRC\fP environment variable.
.LP
.SH ENVIRONMENT VARIABLES
The following environment variables are used directly by MOC. Additional
variables may be relevant to the libraries MOC uses. Also, any environment
environment variable may be substituted into a configuration file option
value (see the 'config.example' file for details).
.LP
.TP
.B ESCDELAY
An ncurses(3X) variable which specifies the delay (in milliseconds)
after which it will treat an ESC as a standalone key and not part of
an escaped character sequence (such as is generated by function keys).
MOC sets this value to 25ms by default, which is sufficient for most
systems.
.LP
.TP
.B HOME
Tells MOC where your home directory is located and is used for various
purposes, including the default location of the MOC directory.
.LP
.TP
.B MOCP_OPTS
The value of this variable will be prepended to the command line options
before they are processed.
.LP
.TP
.B MOCP_POPTRC
A colon-separated list of POPT configuration files which will be loaded in
sequence by MOC during initialisation. If the variable is unset then the
default POPT configuration file will be used. If the variable is set but
empty then no POPT configuration file will be loaded. If the variable is
set then those files which exist will be loaded and those which don't will
be skipped.
.IP
As these files can specify commands which invoke other applications, MOC
will refuse to start if they are not owned by root or the current user,
or they are writable by anyone other than their owner.
.LP
.TP
.B TERM \fPand\fB WINDOW
Used by MOC to distinguish between X-terminals, screen(1) and console
terminals. MOC uses the configuration file options \fBXTerms\fP and
\fBScreenTerms\fP to help make this determination.
.LP
.SH FILES
.TP
.B ~/.moc
MOC directory for the configuration file, socket, the pid file and other data.
.LP
.TP
.B ~/.moc/config
Configuration file for MOC. The format is very simple; to see how to use
it look at the example configuration file (\fBconfig.example\fP) distributed
with the program. The example file fully describes all the configuration
options, and so is a useful reference when using the \fB\-O\fP option. As
this file can specify commands which invoke other applications MOC will
refuse to start if it is not owned by either root or the current user, or if
it is writable by anyone other than its owner.
.LP
.TP
.B ~/.popt
.TQ
.B /etc/popt
The default files POPT reads to obtain aliased options. As these files can
specify commands which invoke other applications, MOC will refuse to start
if it is not owned by root or the current user, or if it is writable by
anyone other than its owner. (Also see the \fBMOCP_POPTRC\fP environment
variable above.)
.LP
.TP
.B ~/.moc/themes
.TQ
.B /usr/share/moc/themes
Default directories for the theme files.
.LP
.TP
.B /usr/share/moc/decoder_plugins
Default directories for the audio decoder plugins.
.LP
.TP
.B mocp_client_log
.TQ
.B mocp_server_log
Client and server log files. These files are created in the directory in
which the client and server are started. (Also see the \fB\-D\fP option.)
.LP
.SH BUGS
Command line options that affect the server behaviour (like
\fB\-\-sound\-driver\fP) are ignored if the server is already running at
the time of executing \fBmocp\fP. The user is not warned about this.
.LP
.SH HOMEPAGE
http://moc.daper.net/
.LP
.SH AUTHOR
Damian Pietras <daper@daper.net>
.br
MOC Maintainer(s) <mocmaint@daper.net>
|