AMUSED(1) General Commands Manual AMUSED(1)

amusedmusic player

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

amused is a simple music player. It manages a single queue of music files. At the end of every track, amused proceeds to the next one in the queue, or with the first one if it was the last one or if the track wasn't part of the queue.

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

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. Commands may be abbreviated to a unique prefix, for example ‘rep’ can be given instead of repeat.

The following commands are available:

file ...
Enqueue the given files at the end of the playing queue.
[on|off]
Enable or disable the consume mode. When consume mode is enabled the tracks are removed from the playing queue once played completely. Without arguments toggle the current status.
Erase the playlist.
substring
Play the first song in the playing queue that contains the given case-insensitive substring.
[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 playing queue. Otherwise, if already playing something, try to match the currently played song in the new queue.
[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.
previous
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.
Play the current song from the beginning. It's a shorthand for amused seek 0.
[+-]time[%]
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, otherwise is absolute. With a trailing ‘%’, the time is interpreted as a percentage of the length of the track.

The time can also be expressed as [[hours:]minutes:]seconds, but in this case no trailing ‘%’ is allowed.

[-p]
Show the playlist. With -p it prints a “pretty” list with the current playing song prefixed by ‘> ’.
[-a]
Shuffle the playing queue after the currently playing track until the end. If -a is given, all the tracks in the playing queue are shuffled, with the currently playing one moved at the top.
[-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.

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

Remove duplicates:

$ amused show | sort | uniq | amused load

Select a song with fzf(1)

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

amused-mpris2(1), amused-web(1)

The amused utility was written by Omar Polo <op@omarpolo.com>.

February 23, 2025 OpenBSD 7.7