1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
.TH HTTP-MUSIC-PLAY 1
.SH NAME
http-music-play - plays audio from a playlist file
.SH SYNOPSIS
.B http-music play
[opts...]
.SH DESCRIPTION
Plays audio referenced from a playlist file.
Tracks selected using a "picker" (see \fB--picker\fR) and retrieved using a "downloader" (see \fB--downloader\fR).
Downloaded tracks are played with either the \fBmpv\fR (default) or \fBplay\fR (from SoX) command.
.SH KEYBOARD CONTROLS
.TP
.BR <left-arrow>
Skips backwards 5 seconds in the currently playing track; hold shift to skip by 30 seconds.
(Requires MPV player.)
.TP
.BR <right-arrow>
Skips forwards 5 seconds in the currently playing track; hold shift to skip by 30 seconds.
(Requires MPV player.)
.TP
.BR <up-arrow>
Skips to the track that just previously played.
(\fBp\fR (for "Previous") also works.)
.TP
.BR <down-arrow>
Skips past the track that's currently playing.
(\fBs\fR (for "Skip") also works.)
.TP
.BR <shift>-<up-arrow>
Turns the volume up a 10%-notch.
Unfortunately, at present, the volume setting is NOT kept across tracks.
You'll need to adjust your audio volume whenever a new song starts.
(If possible, it might be better just to opt for changing the system volume.)
(Requires MPV player.)
.TP
.BR <shift>-<down-arrow>
Turns the volume down 10%.
(Requires MPV player.)
.TP
.BR <space>
Pauses (or resumes) playback.
(Requires MPV player.)
.TP
.BR i
Shows information (title, URL/path) on the currently playing track.
(\fBt\fR also works.)
.TP
.BR p
Skips to the track that just previously played.
(\fB<up-arrow>\fR also works.)
.TP
.BR q
Quits the http-music process and stops music currently being played.
(\fB^C\fR and \fB^D\fR also work.)
.TP
.BR s
Skips past the track that's currently playing.
(\fB<down-arrow>\fR also works.)
.SH OPTIONS
.TP
.BR \-c ", " \-\-clear
Clears the active playlist.
This does not effect the source playlist, so specific groups can be selected using \fB\-\-keep\fR.
.TP
.BR \-\-collapse\-groups ", " \-\-collapse
Collapses groups in the active playlist so that there is only one level of sub-groups.
Handy for shuffling the order groups play in; try \fB\-\-collapse-groups \-\-sort shuffle\-groups\fR.
.TP
.BR \-\-converter
Sets the program used for converting tracks.
By default the program is either \fBffmpeg\fR or \fBavconv\fR.
Playlists which use track-specific converter options should use this option through the \fB"options"\fR playlist property to set an intended converter program.
If the program specified through \-\-converter does not exist, converter options will not be used (see \fB\-\-enable\-converter\-options\fR).
.TP
.BR \-\-disable\-converter\-options ", " \-\-no\-use\-converter\-options
Forces track-specific converter options to not be used.
See also \fB\-\-enable\-converter\-options\fR.
.TP
.BR \-\-disable\-playback\-status ", " \-\-hide\-playback\-status
Hides playback status (timestamps, etc).
.TP
.BR \-\-enable\-converter\-options ", " \-\-use\-converter\-options
Forces usage of track-specific converter options.
By default, they are enabled.
See also \fB\-\-disable\-converter\-options\fR.
.TP
.BR \-f ", " \-\-filter " \fIproperty\fR \fIvalue\fR"
Filters the playlist so that only tracks with the given property-value pair are kept.
If the property is an array, it checks if the given value is contained within that array.
For example, this is useful for adding "tags" to songs.
Try adding \fB"tag": ["cool"]\fR to a track in a playlist file, then use \fB\-\-filter tag cool\fR to only play that track (and other tracks whose \fB"tag"\fR property contains \fB"cool"\fR).
.TP
.BR \-h ", " \-? ", " \-\-help
Presents a help message, directing the user to the \fBman\fR page.
If this is the last option used, nothing plays (see \fB\-\-play\fR).
.TP
.BR \-k ", " \-\-keep " \fIgroupPath\fR"
Keeps a group by adding it from the source playlist.
This is usually useful after clearing the active playlist (\fB\-\-clear\fR); it can also be used to keep a sub-group after removing an entire parent group, e.g. \fB-r foo -k foo/baz\fR.
.TP
.BR \-l ", " \-\-list\-groups ", " \-\-list
Lists all groups (but not tracks) in the (active) playlist.
If this is the last option used, nothing plays (see \fB\-\-play\fR).
.TP
.BR \-L ", " \-\-list\-all ", " \-\-list\-tracks
Lists all groups and tracks in the (active) playlist.
If this is the last option used, nothing plays (see \fB\-\-play\fR).
.TP
.BR \-\-loop\-mode ", " \-\-loop
Sets the mode by which the playback order list is looped (typically, what happens when the picker's index counter gets to the end of the list).
Valid options include \fBno-loop\fR (or \fBno\fR), \fBloop-same-order\fR (or \fBloop\fR), and \fBloop-regenerate\fR (the default).
See also \fB\-\-sort\-mode\fR.
.TP
.BR \-np ", " \-\-no\-play
Forces the playlist not to play.
See also \fB\-\-play\fR.
.TP
.BR \-o ", " \-\-open\-playlist ", " \-\-open " \fIplaylistFile\fR"
Opens a specific file to be used as the playlist file.
(This sets the source playlist.)
The default playlist file used upon loading is \fBplaylist.json\fR (in the same directory as \fBhttp-music\fR is being run in).
.TP
.BR \-p ", " \-\-play
Forces the playlist to actually play, regardless of options such as \fB\-\-list\fR. See also \fB\-\-no\-play\fR.
.TP
.BR \-\-player " \fIplayer"
Selects the mode by which audio is played.
Valid options include "mpv" and "sox" (or "play").
Most playback controls only work with the "mpv" player, but the "sox"/"play" player is typically much more easy to (and commonly) install than "mpv".
The default is \fBmpv\fR, but \fBsox\fR will be used if mpv is not installed.
.TP
.BR \-\-print\-playlist ", " \-\-log-playlist ", " \-\-json
Prints the JSON representation of the active playlist to the console.
.TP
.BR \-r ", " \-\-remove ", " \-x " \fIgroupPath\fR"
Removes a group from the (active) playlist.
.TP
.BR \-\-sort\-mode ", " \-\-sort
Sets the mode by which the playback order list is sorted.
Valid options include \fBorder\fR, \fBshuffle\fR (the default), and \fBshuffle-groups\fR.
See also \fB\-\-loop\-mode\fR.
.TP
.BR \-s ", " \-\-start ", " \-\-start(ing)-(on|at|track)
Sets the track to begin playback from.
Especially useful when using an ordered sort; for example, this option could be used to start a long album part way through.
(See also \fB\-\-sort\fR.)
.TP
.BR \-w ", " \-\-write\-playlist ", " \-\-write ", " \-\-save " \fIfilePath\fR"
Writes the active playlist to a file.
This file can later be used with \fB\-\-open\fR; you won't need to stick in all the filtering options again.
.SH EXAMPLES
Basic usage:
.PP
.nf
.RS
$ http-music play
.RE
.fi
.PP
Generate a playlist from an HTTP server:
.PP
.nf
.RS
$ http-music crawl-http http://example.com/path > playlist.json
.RE
.fi
.PP
Generate a playlist from the local file system:
.PP
.nf
.RS
$ http-music crawl-local /example/path > playlist.json
.RE
.fi
.PP
Open a specific playlist file:
.PP
.nf
.RS
$ http-music play --open playlist2.json
$ http-music play -o playlist2.json
.RE
.fi
.PP
Only play music under a specific group:
.PP
.nf
.RS
$ http-music play --clear --keep 'Cool Author 72'
$ http-music play -c -k 'Cool Author 72'
$ http-music play -c -k 'Cool Author 72/Good Album'
.RE
.fi
.PP
Don't play music under a specific group:
.PP
.nf
.RS
$ http-music play --remove 'Bad News'
$ http-music play -r 'Bad News'
$ http-music play -x 'Bad News'
.RE
.fi
.PP
Don't play music under a specific group, except for a sub-group:
.PP
.nf
.RS
$ http-music play --remove 'Bad News' --keep 'Bad News/Irony'
$ http-music play -x 'Cool Author 72' -k 'Cool Author 72/Good Album'
.RE
.fi
.PP
Play every group in a random order, playing each group in its own original order:
.PP
.nf
.RS
$ http-music play --sort shuffle-groups
.RE
.fi
.PP
Play every group in a random order, after collapsing the playlist, so that parent groups aren't considered
(using \fB--sort shuffle-groups\fR alone would play all of one artist's albums before moving onto the next; using \fB--collapse\fR lets the groups be shuffled without regarding the artists' groups):
.PP
.nf
.RS
$ http-music play --collapse --sort shuffle-groups
.RE
.fi
|