AMUSED(1) General Commands Manual AMUSED(1)

amusedmusic player

amused [-dv] [-s socket] [command [argument ...]]

amused is a music player daemon and command-line utility to play music. The server is started automatically in the background on demand.

The following options are available:

Do not daemonize: amused will run in the foreground and log to standard error. It's ignored if any commands are given on the command line or if the server is already running.
Use socket instead of the default /tmp/amused-UID to communicate with the daemon.
Produce more verbose output.
command [argument ...]
Specify the command to run. If no commands are specified, status is assumed.

The following commands are available:

file ...
Enqueue the given files.
Enable or disable the consume mode. When consume mode is enabled the tracks are removed from the playlist once played until the end. Without arguments toggle the current status.
Erase the playlist.
Play the first song in the playing queue that matches pattern (a basic case-insensitive regexp).
Load a playlist from file or standard input. A playlist is a list of paths to music files given one per line and optionally prefixed by ‘> ’ or two spaces. If the list was generated by amused show -p restore also the position in the playlist. Otherwise, if already playing something, try to match the currently song in the new list. Failing that, the playlist will be played from the first track onwards.
Stop indefinitely and print when an event in the comma-separated list of events happened, or all if not given. The available events are:

Added a song to the playlist.
Jumped to a different song in the playlist.
Loaded a new playlist.
Mode changed (repeat or consume).
Advanced to next song.
Playing or resuming a song.
Gone back to previous song.
Seeked in the current track.
Play the next song.
Pause the playback.
Start or resume the playback.
Play the previous song.
|all [on|off]
Enable or disable the automatic repetition of the current track (one) or of the whole playing queue (all). Without arguments toggle the given repeat mode.
Rewind the current song to the beginning. It's a shorthand for amused seek 0.
[[hours:]minutes:]seconds | percentage%
Seek by the specified amount of time into the current song. If the argument is prefixed by either ‘+’ or ‘-’ then the seek is relative to the current position.
Show the playlist. With -p it prints a “pretty” list with the current playing song prefixed by ‘> ’.
[-f format]
Print playback status and current song. The format is a comma-separated list of words that select the information to print, in order. It defaults to AMUSED_STATUS_FORMAT or to “status,time:oneline,mode:oneline” if not defined. The formats available are:

Path of the current song
Mode status in a single line.
Repeat all, one and consume, one per line.
Playback status by the path to the current song.
Position and duration in a single line.
Percentage of the current position.
Current position and duration in seconds.
Current position and duration in a human-readable format.
Stop the playback.
Play/pause the playback.

Commands can be abbreviated to a unique prefix, for example ‘rep’ can be given instead of ‘repeat’.

amused automatically skips and removes from the playlist non-regular files or ones with a non-recognized audio format.

The default format used by amused status.
Path to the directory where the control socket is created. Defaults to /tmp.

UNIX-domain socket used for communication with the daemon.

Load every file under the current directory recursively:

$ find . | amused load

Enqueue all mp3 files in the current directory:

$ amused add *.mp3

Recursively add all opus files:

$ find . -type f -iname \*.opus -exec amused add {} +

Save the state of the player to the file amused.dump:

$ amused show -p > amused.dump

Load a previous state:

$ amused load < amused.dump

Shuffle the playlist:

$ amused show | sort -R | amused load

Remove duplicates:

$ amused show | sort | uniq | amused load

Select a song with fzf(1)

$ amused jump "$(amused show | fzf +s)"

The amused utility was written by Omar Polo <>.

December 10, 2023 OpenBSD 7.5