-
Notifications
You must be signed in to change notification settings - Fork 300
/
convert.conf
403 lines (319 loc) · 12.1 KB
/
convert.conf
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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# Configuration file for transcoding
#
# If you wish to create custom transcoding entries that won't be overwritten
# by a new release of Lyrion Music Server, create a custom-convert.conf file in the
# Lyrion Music Server root directory, or the root of the Plugins directory.
#
# On Debian, you can also create this file in # /etc/slimserver/custom-convert.conf
#
# first line is the source format, destination format and the destination device. Asterisk matches all
# second line is the command line for the conversion
#
# First line format:
# <source_format> <dest_format> <destination_device_type> <destination_device_id>
#
# <source_format>: Source music format: mp3, mp4, ogg, wav, etc...
# <dest_format> : Destination music format: Generally mp3, or
# possibly aif or others depending on the types
# your player supports. SliMP3 supports only
# MP3. Squeezebox currently supports mp3, aif
# and pcm. Squeezebox2 adds support for Flac and WMA.
# <destination_device_type>: currently slimp3, squeezebox, or *.
# The * is a wildcard that matches all device
# types.
# <destination_device_id>: The ID of the destination device. The
# ID of the destination device is the MAC address
# of a SliMP3 or Squeezebox device, or the IP of
# an HTTP client (such as your computer running
# WinAmp). The '*' wildcard matches all hosts
#
# either or both of <destination_device_type> and
# <destination_device_id> may be the '*' wildcard
#
#
# $FILE$ is the absolute path to the local source file
# $URL$ is the full URL for remote streams
# [bin] is the executable binary for the encoder or decoder
# - is a special command line that implies passthrough of data
#
# Capabilities
# I - can transcode from stdin
# F - can transcode from a named file
# R - can transcode from a remote URL (URL types unspecified)
#
# E - extensions syntax E:{<key>=<value>,<key>=<value>}
# NOSTART=I/F/R : no $START$ field when transcoding from I/F/R
# NOHEADER=I/F/R : strip out header when transcoding from I/F/R (waf/aif only)
#
# O - can seek to a byte offset in the source stream (not yet implemented)
# T - can seek to a start time offset
# U - can seek to start time offset and finish at end time offset
#
# D - can downsample
# B - can limit bitrate
#
# default is "IF"
#
# Substitution strings for variable capabilities
# %f, $FILE$ - file path (local files)
# %F, $URL$ - full URL (remote streams)
#
# %o - stream start byte offset
#
# %S - stream samples start offset (not yet implemented)
# %s - stream seconds start offset
# %t - stream time (m:ss) start offset
# %U - stream samples end offset (not yet implemented)
# %u - stream seconds end offset
# %v - stream time (m:ss) end offset
# %w - stream seconds duration
#
# %b - limit bitrate: b/s
# %B - limit bitrate: kb/s
# %d - samplerate: samples/s
# %D - samplerate: ksamples/s
# %C, $CHANNELS$ - source channel count
# %c, $OCHANNELS$ - output channel count
# $SAMPLESIZE$ - source sample size (in bits)
# $SAMPLERATE$ - source sample rate (in Hz)
# %i - clientid
# %I, $CLIENTID$ - clientid ( : or . replaced by - )
# %p - player model
# %P, $PLAYER$ - player model ( SPACE or QOUTE replaced by _ )
# %n - player name
# %N, $NAME$ - player name ( SPACE or QOUTE replaced by _ )
# %q, $QUALITY$ - quality
# %Q, - quality ( fractal notation: if = '0' return '01' )
# ${FILENAME}$ - contents of {FILENAME} (may contain other $*$ substitutions )
#
# It's also possible to define "proxies" who tell rules matcher what format(s) a
# helper spits out. This is useful to stick to player's native format whenever
# possible. Use comma-separated list for multiple output formats, from least
# favorite to most favorite
# proxy <helper_format> <output_format>[,<output_format>]
# For example if a plugin has created a new format named 'spt' whose helper's output
# is 'ogg' or 'pcm', and you want 'ogg' to be most desired, then add
# proxy spt pcm,ogg
# specific combinations match before wildcards
mp4 mp3 * *
# FB:{BITRATE=--abr %B}T:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [lame] --silent -q $QUALITY$ $BITRATE$ - -
mp4x mp3 * *
# FB:{BITRATE=--abr %B}T:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [lame] --silent -q $QUALITY$ $BITRATE$ - -
aac mp3 * *
# IFB:{BITRATE=--abr %B}
[faad] -q -w -f 1 $FILE$ | [lame] --silent -q $QUALITY$ $BITRATE$ - -
sls mp3 * *
# FB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[sls] $FILE$ - -s | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
alc mp3 * *
# FB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}T:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
alcx mp3 * *
# FB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}T:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
ogg mp3 * *
# IFB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[sox] -q -t ogg $FILE$ -t wav - | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
wav mp3 * *
# IFB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ $FILE$ -
aif mp3 * *
# IFB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ $FILE$ -
flc mp3 * *
# IFB:{BITRATE=--abr %B}T:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=--resample %D}
[flac] -dcs $START$ $END$ -- $FILE$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
wma mp3 * *
# F:{PATH=%f}R:{PATH=%F}B:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[wmadec] -w $PATH$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
wmal mp3 * *
# F:{PATH=%f}R:{PATH=%F}B:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[wmadec] -w $PATH$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
wmap mp3 * *
# F:{PATH=%f}R:{PATH=%F}B:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[wmadec] -w $PATH$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
mpc mp3 * *
# IRB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[mppdec] --silent --prev --gain 3 - - | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
ape mp3 * *
# FB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[mac] $FILE$ - -d | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
wvp mp3 * *
# FB:{BITRATE=--abr %B}T:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=--resample %D}
[wvunpack] $FILE$ -wq $START$ $END$ -o - | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
mp3 mp3 * *
-
# Non-mp3 starts here
aif aif * *
-
aif pcm * *
-
wav wav * *
-
wav pcm * *
-
flc pcm * *
# IFT:{START=--skip=%t}U:{END=--until=%v}
[flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$
flc aif * *
# IFT:{START=--skip=%t}U:{END=--until=%v}
[flac] -dcs --force-raw-format --endian=big --sign=signed $START$ $END$ -- $FILE$
ogf ogf * *
-
ogf flc * *
# IFRD:{RESAMPLE=-r %d}
[flac] --ogg -dcs -- $FILE$ | [sox] -q --ignore-length -t wav - -t flac -C 0 $RESAMPLE$ -
ogg ogg * *
-
ogg aif * *
[sox] -q -t ogg $FILE$ -t raw -r 44100 -c 2 -2 -s $-x$ -
ogg pcm * *
[sox] -q -t ogg $FILE$ -t raw -r 44100 -c 2 -2 -s -
ops ops * *
-
ops mp3 * *
# IFB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[sox] -q -t opus $FILE$ -t wav - | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
ops aif * *
[sox] -q -t opus $FILE$ -t raw -r 44100 -c 2 -2 -s $-x$ -
ops pcm * *
[sox] -q -t opus $FILE$ -t raw -r 44100 -c 2 -2 -s -
ops flc * *
# IFRD:{RESAMPLE=-r %d}T:{START=trim %s}
[sox] -t opus $FILE$ -t flac -C 0 $RESAMPLE$ - $START$
wma pcm * *
# F:{PATH=%f}R:{PATH=%F}
[wmadec] -r 44100 -b 16 -n 2 $PATH$
wmal pcm * *
# F:{PATH=%f}R:{PATH=%F}
[wmadec] -r 44100 -b 16 -n 2 $PATH$
wmap pcm * *
# F:{PATH=%f}R:{PATH=%F}
[wmadec] -r 44100 -b 16 -n 2 $PATH$
mpc pcm * *
# IR
[mppdec] --raw-le --silent --prev --gain 2 - -
ape pcm * *
# F
[mac] $FILE$ - -d
mpc aif * *
# IR
[mppdec] --raw-be --silent --prev --gain 2 - -
alc pcm * *
# FT:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 2 $START$ $END$ $FILE$
alcx pcm * *
# FT:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 2 $START$ $END$ $FILE$
wvp pcm * *
# FT:{START=--skip=%t}U:{END=--until=%v}
[wvunpack] $FILE$ -rq $START$ $END$ -o -
mp4 pcm * *
# FT:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 2 -b 1 $START$ $END$ $FILE$
mp4x pcm * *
# FT:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 2 -b 1 $START$ $END$ $FILE$
aac pcm * *
# IF
[faad] -q -w -f 2 -b 1 $FILE$
sls pcm * *
# F
[sls] $FILE$ - -r -s
wma wma * *
-
wmal wmal * *
-
wmap wmap * *
-
# FLAC output starts here
#mp3 flc * *
# [lame] --mp3input --decode -t --silent $FILE$ - | [flac] -cs --totally-silent --compression-level-0 -
flc flc * *
-
aif flc * *
# IFT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}E:{NOSTART=I}
[flac] -cs --totally-silent --compression-level-0 $START$ $END$ -- $FILE$ | [sox] -q -t flac - -t flac -C 0 $RESAMPLE$ -
wav flc * *
# IFT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}E:{NOSTART=I}
[flac] -cs --totally-silent --compression-level-0 $START$ $END$ -- $FILE$ | [sox] -q -t flac - -t flac -C 0 $RESAMPLE$ -
ogg flc * *
# IFRD:{RESAMPLE=-r %d}
[sox] -t ogg $FILE$ -t flac -C 0 $RESAMPLE$ -
wma flc * *
# F:{PATH=%f}R:{PATH=%F}
[wmadec] -w $PATH$ | [flac] -cs --totally-silent --compression-level-0 -
wmal flc * *
# F:{PATH=%f}R:{PATH=%F}
[wmadec] -w $PATH$ | [flac] -cs --totally-silent --compression-level-0 -
wmap flc * *
# F:{PATH=%f}R:{PATH=%F}
[wmadec] -w $PATH$ | [flac] -cs --totally-silent --compression-level-0 -
mpc flc * *
# IR
[mppdec] --silent --prev --gain 2 - - | [flac] -cs --totally-silent --compression-level-0 -
ape flc * *
# F
[mac] $FILE$ - -d | [flac] -cs --totally-silent --compression-level-0 -
mp4 flc * *
# FT:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [flac] -cs --totally-silent --compression-level-0 --ignore-chunk-sizes -
mp4x flc * *
# FT:{START=-j %s}U:{END=-e %u}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [flac] -cs --totally-silent --compression-level-0 --ignore-chunk-sizes -
aac flc * *
# IF
[faad] -q -w -f 1 $FILE$ | [flac] -cs --totally-silent --compression-level-0 --ignore-chunk-sizes -
sls flc * *
# FD:{RESAMPLE=-r %d}
[sls] $FILE$ - -s | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
alc flc * *
# FT:{START=-j %s}U:{END=-e %u}D:{RESAMPLE=-r %d}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
alcx flc * *
# FT:{START=-j %s}U:{END=-e %u}D:{RESAMPLE=-r %d}
[faad] -q -w -f 1 $START$ $END$ $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
wvp flc * *
# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
[wvunpack] $FILE$ -wq $START$ $END$ -o - | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
wvpx flc * *
# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
[wvunpack] $FILE$ -wq $START$ $END$ -o - | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
# AAC & ALAC output start here
aac aac * *
-
mp4 aac * *
-
sls aac * *
-
alc alc * *
-
# special case for smart bitrates on mp3 input
mp3 mp3 transcode *
# IFB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ $BITRATE$ $RESAMPLE$ --mp3input $FILE$ -
flc flc transcode *
# IFT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}E:{NOSTART=I}
[flac] -dcs $START$ $END$ --force-raw-format --sign=signed --endian=little -- $FILE$ | [sox] -q -t raw --encoding signed-integer -b $SAMPLESIZE$ -r $SAMPLERATE$ -c $CHANNELS$ -L - -t flac $RESAMPLE$ -C 0 -
# This example transcodes MP3s to MP3s, if the target machine has the
# given MAC address. This rule will take precedence over the
# previous rule because it's more specific.
#mp3 mp3 squeezebox 00:02:dd:34:e9:62
# ./brute_filter $FILE$ -
spdr spdr * *
-
# DSF & DFF output start here
dsf dsf * *
# IFD
-
dff dff * *
# IFD
-
wvpx dsf * *
# FT:{START=--skip=%t}U:{END=--until=%v}D
[wvunpack] $FILE$ -q --dsf $START$ $END$ -o -
wvpx dff * *
# FT:{START=--skip=%t}U:{END=--until=%v}D
[wvunpack] $FILE$ -q --dff $START$ $END$ -o -