cplay
is a minimalist music player with a textual user interface
written in Python. It aims to provide a power-user-friendly interface
with simple file list and playlist control.
Instead of building an elaborate database of your music library,
cplay
allows you to quickly browse the filesystem and enqueue
directories. Cue-files and other playlists are supported.
The original cplay was started by Ulf Betlehem in 1998 and is no longer maintained. This is a fork that keeps the original design as much as possible. For a rewrite, see https://github.com/xi/cplay-ng
Music players supported (one of the first three provides support for most formats):
mplayer, ffplay, gst123, mpg321, mpg123, madplay, splay, ogg123, mikmod, xmp, sox, speex
Other optional components:
- reading metadata (tags): mutagen
- volume control: alsaaudio,
pulseaudio-utils
(specifically thepactl
command), OSS support is part of the standard library. - detect character encodings of playlists: python-magic
$ make install
In Debian/Ubuntu, the following installs a selection of players and optional components:
$ sudo apt-get install mplayer gst123 mpg321 vorbis-tools python-alsaaudio pulseaudio-utils python-magic
$ cplay [-nrRv] [ file | dir | playlist ] ...
When in doubt, press h
for a friendly help page.
If you would like to change the default player or the options passed to the
players just edit the PLAYERS
list at the end of the cplay script.
A playlist can contain URLs, but the playlist itself will have to be
local. For mpeg streaming, splay
is recommended.
It is also possible to pipe a playlist to cplay
, as stdin will be
reopened on startup unless it is attached to a tty.
Remote control via /tmp/cplay-control-$USER
-- refer to the class
FIFOControl
for the list of recognized commands.