The generic remote interface allows frontends to easily control
mpg123 by commands through stdin/stdout. To start the generic
remote interface, start mpg123 with parameter -R.
In case of a frontend that starts mpg123 with the -s option to read the audio from stdout, the --remote-err option is automatically activated to send responses to stderr so that stdout stays clean for audio.
(Still the case?)
As an example it's used by IRMP3, a tool that allows you to
control mpg123 with a standard infrared remote control. See
http://www.fasta.fh-dortmund.de/users/andy/irmp3/ for more
information.
You can also specify --fifo <path> to create a named pipe at <path> and listen on that for commands instead stdin.
That way, you can deliberately control mpg123 by echoing into the named pipe from any terminal / program.
The command respones are still sent to standard out or standard error (depending on -s or --remote-err switches).
COMMAND CODES
-------------
You can get this info via the control command "help".
HELP/H: command listing (LONG/SHORT forms), command case insensitve
LOAD/L <trackname>: load and start playing resource <trackname>
LOADPAUSED/LP <trackname>: load but do not start playing resource <trackname>
LOADLIST/LL <entry> <url>: load a playlist from given <url>, and display its entries, optionally load and play one of these specificed by the integer <entry> (<0: just list, 0: play last track, >0:play track with that position in list)
PAUSE/P: pause playback
STOP/S: stop playback (closes file)
JUMP/J <frame>|<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame <frame> or change position by offset, same in seconds if number followed by "s"
VOLUME/V <percent>: set volume in % (0..100...); float value
MUTE: turn on software mute in output
UNMUTE: turn off software mute in output
RVA off|(mix|radio)|(album|audiophile): set rva mode
EQ/E <channel> <band> <value>: set equalizer value for frequency band 0 to 31 on channel 1 (left) or 2 (right) or 3 (both)
EQFILE <filename>: load EQ settings from a file
SHOWEQ: show all equalizer settings (as <channel> <band> <value> lines in a SHOWEQ block (like TAG))
SEEK/K <sample>|<+offset>|<-offset>: jump to output sample position <samples> or change position by offset
SCAN: scan through the file, building seek index
SAMPLE: print out the sample position and total number of samples
FORMAT: print out sampling rate in Hz and channel count
SEQ <bass> <mid> <treble>: simple eq setting...
PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 % faster)
STATE: Print auxiliary state info in several lines (just try it to see what info is there).
TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names. NOTE: ID3v2 data will be deleted on non-forward seeks.
The output is multiple lines, begin marked by "@T {", end by "@T }".
ID3v1 data is like in the @I info lines (see below), just with "@T" in front.
An ID3v2 data field is introduced via ([ ... ] means optional):