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.
socket
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.
[on|off]
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.
pattern
Play the first song in the playing queue that matches pattern (a basic case-insensitive regexp).
[file]
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.
[events]
Stop indefinitely and print when an event in the comma-separated list of events happened, or all if not given. The available events are:

add
Added a song to the playlist.
jump
Jumped to a different song in the playlist.
load
Loaded a new playlist.
mode
Mode changed (repeat or consume).
next
Advanced to next song.
pause
Paused.
play
Playing or resuming a song.
prev
Gone back to previous song.
seek
Seeked in the current track.
stop
Stopped.
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.
[-p]
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
Path of the current song
mode:oneline
Mode status in a single line.
mode
Repeat all, one and consume, one per line.
status
Playback status by the path to the current song.
time:oneline
Position and duration in a single line.
time:percentage
Percentage of the current position.
time:raw
Current position and duration in seconds.
time
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.

/tmp/amused-UID
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 <op@omarpolo.com>.

December 10, 2023 OpenBSD 7.5