-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
277 lines (264 loc) · 9.92 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
270
271
272
273
274
275
276
277
---
defaultParams:
## Quality of the stream to download.
##
## Available latency options: 150Kbps, 400Kbps, 1.2Mbps, 2Mbps, 3Mbps, sound. (default: "3Mbps")
quality: 3Mbps
## Stream latency. Select a higher latency if experiencing stability issues.
##
## Available latency options: low, high, mid. (default: "mid")
latency: mid
## 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 FC2 metadata (see fc2/fc2_api_objects.go for the available field)
## Labels.Key: custom labels
## (default: "{{ .Date }} {{ .Title }} ({{ .ChannelName }}).{{ .Ext }}")
outFormat: '{{ .ChannelName }} {{ .Labels.EnglishName }}/{{ .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 stream information into a json file. (default: false)
writeInfoJson: false
## Download thumbnail into a file. (default: false)
writeThumbnail: false
## Wait until the broadcast goes live, then start recording. (default: true)
waitForLive: true
## If the requested quality is not available, keep retrying before falling
## back to the next best quality. (default: 60)
##
## There is a 1 second delay between each retry. The value must be big enough
## so that the best quality (3Mbps) is available. If your streamer takes more
## than expected to prepare, you should increase this value.
waitForQualityMaxTries: 60
## Allow quality upgrade during download if the requested quality is not
## "yet" available. (default: false)
##
## If the requested quality is not available, the downloader will fallback to
## the best quality available. However, it is possible that the streamer will
## upgrade the quality during the stream. FC2 often "waits" for the stream to
## be stable before upgrading the quality.
##
## If this option is enabled, the downloader will periodically check if the
## quality has been upgraded. If the quality has been upgraded, the downloader
## will switch to the new quality. **A cut off will be present in the recording.**
##
## If this option is enabled, it is recommended to:
##
## - Reduce waitForQualityMaxTries to 10s.
## - Enable Remux or Concat to fix mpegts discontinuities.
allowQualityUpgrade: false
## How many seconds between checks to see if the quality can be upgraded. (default: 10s)
##
## allowQualityUpgrade needs to be enabled for this to work.
pollQualityUpgradeInterval: '10s'
## How many seconds between checks to see if broadcast is live. (default: 5s)
waitPollInterval: '5s'
## Path to a cookies file. Format is a netscape cookies file.
cookiesFile: ''
## Refresh cookies by trying to re-login to FC2. "Keep me logged in" must be
## enabled and id.fc2.com cookies must be present.
cookiesRefreshDuration: '24h'
## 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: {}
## A list of channels.
##
## The keys are the channel IDs.
channels:
'40740626':
labels:
EnglishName: Komae Nadeshiko
'72364867':
labels:
EnglishName: Uno Sakura
'81840800':
labels:
EnglishName: Ronomiya Hinagiku
'91544481':
labels:
EnglishName: Necoma Karin
## 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 "fc2-live-dl-go: "
## 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 cookies refresh 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 {{.Labels.EnglishName }}'
# 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 {{ .Labels.EnglishName }}'
# title: 'preparing files for {{ .MetaData.ProfileData.Name }}'
# 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: '{{ .Labels.EnglishName }} is streaming'
# title: "{{ .MetaData.ProfileData.Name }} is streaming"
# message: "{{ .MetaData.ChannelData.Title }}"
# priority: 7
## Post-processing happens when the stream has finished streaming.
## Available fields:
## - ChannelID
## - MetaData
## - Labels
postProcessing:
enabled: false
title: 'post-processing {{ .Labels.EnglishName }}'
# title: "post-processing {{ .MetaData.ProfileData.Name }}"
# message: "{{ .MetaData.ChannelData.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: '{{ .Labels.EnglishName }} stream ended'
# title: "{{ .MetaData.ProfileData.Name }} stream ended"
# message: "{{ .MetaData.ChannelData.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: 'stream download of {{ .Labels.EnglishName }} failed'
# title: 'stream download of {{ .ChannelID }} failed'
# message: '{{ .Error }}'
# priority: 10
## Canceled happens when a stream download is canceled.
## Available fields:
## - ChannelID
## - Labels
canceled:
enabled: true
title: 'stream download of {{ .Labels.EnglishName }} canceled'
# 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 fc2-live-dl is available. Please update."
# priority: 7