-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
269 lines (253 loc) · 8.57 KB
/
config.yaml
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
---
## [REQUIRED] Path to the file containing the credentials. (default: '')
##
## Example of content:
##
## ```yaml
## # User/Password-based
## username: admin
## password: password
##
## # Token-based
## token: "ey..."
## refreshToken: "abc..."
## ```
##
credentialsFile: 'credentials.yaml'
defaultParams:
## Quality constraint to select the stream to download.
##
## None means the highest quality available. Constraints are inclusive.
## Recommendation is to set nothing.
quality:
## Height is usually: 1080, 720, 480, 360, 160.
minHeight: 0
maxHeight: 0
## Width is usually: 1920, 1280, 854, 640, 284.
minWidth: 0
maxWidth: 0
## FrameRate is usually: 60, 30.
minFrameRate: 0.0
maxFrameRate: 0.0
## Bandwidth is in bits/s.
minBandwidth: 0
maxBandwidth: 0
## Select audio quality.
audioOnly: false
## Output format. Uses Golang templating format.
##
## Available fields: ChannelID, ChannelName, Date, Time, Title, Ext, Labels.Key.
## Available format options:
## ChannelID: sanitized ID of the broadcast
## ChannelName: sanitized broadcaster's profile name
## Date: local date YYYY-MM-DD
## Time: local time HHMMSS
## Ext: file extension
## Title: sanitized title of the live broadcast
## MetaData (object): the full metadata (see withny/api/objects.go for the available field)
## Labels.Key: custom labels
## (default: "{{ .Date }} {{ .Title }} ({{ .ChannelName }}).{{ .Ext }}")
outFormat: '{{ .ChannelID }} {{ .ChannelName }}/{{ .Date }} {{ .Title }}.{{ .Ext }}'
## Allow a maximum of packet loss before aborting stream download. (default: 20)
packetLossMax: 20
## Save live chat into a json file. (default: false)
writeChat: false
## Dump output MetaData into a json file. (default: false)
writeMetaDataJson: false
## Download thumbnail into a file. (default: false)
writeThumbnail: false
## How many seconds between checks to see if broadcast is live. (default: 10s)
waitPollInterval: '10s'
## Remux recordings into mp4/m4a after it is finished. (default: true)
remux: true
## Remux format (default: mp4)
remuxFormat: 'mp4'
## Concatenate and remux with previous recordings after it is finished. (default: false)
##
## WARNING: We recommend to DISABLE remux since concat also remux.
##
## Input files must be named <name>.<n>.<ts/mp4/mkv...>. If n=0, n is optional.
## Output will be named: "<name>.combined.<remuxFormat>".
##
## n is only used to determine the order. If there are missing fragments,
## the concatenation will still be executed.
##
## The extensions do not matter. A name.1.ts and a name.2.mp4 will still be concatenated together.
## TS files will be prioritized over anything else.
##
## If remux is enabled, remux will be executed first, then the concatenation
## will be executed.
##
## If extractAudio is true, the m4a will be concatenated separatly.
##
## TL;DR: This is to concatenate if there is a crash.
concat: false
## Keep the raw .ts recordings after it has been remuxed. (default: false)
##
## If this option is set to false and concat is true, before every "waiting
## for stream to be online", a scan will be executed to detect *.combined.*
## files.
## The scan will be done on the directory of `scanDirectory`.
## If a non-corrupted .combined. file is detected, it will remove .ts older
## than `eligibleForCleaningAge`.
## After the cleaning, the .combined files will be renamed without the
## ".combined" part (if a file already exists due to remux, it won't be renamed).
keepIntermediates: false
## Directory to be scanned for .ts files to be deleted after concatenation. (default: '')
##
## Scan is recursive.
##
## Empty value means no scanning.
scanDirectory: ''
## Minimum age of .combined files to be eligible for cleaning. (default: 48h)
##
## The minimum should be the expected duration of a stream to avoid any race condition.
eligibleForCleaningAge: '48h'
## Delete corrupted .ts recordings. (default: true)
deleteCorrupted: true
## Generate an audio-only copy of the stream. (default: false)
extractAudio: true
## Map of key/value strings.
##
## The value of the label can be invoked in the go template by using {{ .Labels.Key }}.
labels: {}
## List of channels to ignore. Only useful if the empty string is used to download all live channels. (default: [])
ignore: []
rateLimitAvoidance:
## Spread the watchers over time to avoid rate limiting. (default 500ms)
##
## A zero value means all watchers will start at the same time.
pollingPacing: 500ms
## A list of channels.
##
## The keys are the channel IDs/handles without the '@'.
channels:
## Track the "admin" channel.
'admin':
## Override some default parameters. See defaultParams for available options.
labels:
EnglishName: Admin
## Using an empty string will download every live channels.
'':
# Ignore specific channels.
ignore:
- 'admin'
## Notify about the state of the watcher.
##
## See: https://containrrr.dev/shoutrrr/latest
notifier:
enabled: false
includeTitleInMessage: false
## Disable priorities if the transport does not support one.
noPriority: false
urls:
- 'gotify://gotify.example.com/token'
## The notification formats can be customized.
## Title are automatically prefixed with "withny-dl: "
## If the message is empty, the message will be the title.
## Priorities are following those of android:
## Minimum: 0
## Low: 1-3
## Default: 4-7
## High: 8-10
notificationFormats:
## ConfigReloaded is sent when the config is reloaded, i.e. the service restarted.
configReloaded:
enabled: true
# title: "config reloaded"
# message: <empty>
# priority: 10
## LoginFailed happens when the login failed.
## Available fields:
## - Error
loginFailed:
enabled: true
# title: "login failed"
# message: "{{ .Error }}"
# priority: 10
## Panicked is sent when a critical error happens.
## When this happens, it is recommended to contact the developer and open an issue.
## Available fields:
## - Capture
panicked:
enabled: true
# title: "panicked"
# message: "{{ .Capture }}"
# priority: 10
## Idle is the initial state.
## Available fields:
## - ChannelID
## - Labels
idle:
enabled: false
# title: "watching {{ .ChannelID }}"
# message: <empty>
# priority: 0
## Preparing files happens when the stream is online, but not downloading.
## Available fields:
## - ChannelID
## - MetaData
## - Labels
preparingFiles:
enabled: false
# title: 'preparing files for {{ .ChannelID }}'
# message: ''
# priority: 0
## Downloading happens when the stream is online and has emitted a video stream.
## Available fields:
## - ChannelID
## - MetaData
## - Labels
downloading:
enabled: true
# title: "{{ .ChannelID }} is streaming"
# message: "{{ .MetaData.Stream.Title }}"
# priority: 7
## Post-processing happens when the stream has finished streaming.
## Available fields:
## - ChannelID
## - MetaData
## - Labels
postProcessing:
enabled: false
# title: "post-processing {{ .ChannelID }}"
# message: "{{ .MetaData.Stream.Title }}"
# priority: 7
## Finished happens when the stream has finished streaming and post-processing is done.
## Available fields:
## - ChannelID
## - MetaData
## - Labels
finished:
enabled: true
# title: "{{ .ChannelID }} stream ended"
# message: "{{ .MetaData.Stream.Title }}"
# priority: 7
## Error happens when something bad happens with the downloading of the stream.
## Error like this can be user or developper related.
## Available fields:
## - ChannelID
## - Error
## - Labels
error:
enabled: true
# title: 'watcher of {{ .ChannelID }} thrown an error'
# message: '{{ .Error }}'
# priority: 10
## Canceled happens when a stream download is canceled.
## Available fields:
## - ChannelID
## - Labels
canceled:
enabled: true
# title: "stream download of {{ .ChannelID }} canceled"
# message: <empty>
# priority: 7
## UpdateAvailable happens when a new version is available.
## Available fields:
## - Version
updateAvailable:
enabled: true
# title: "update available ({{ .Version }})"
# message: "A new version ({{ .Version }}) of withny-dl is available. Please update."
# priority: 7