forked from giongto35/cloud-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
288 lines (276 loc) · 8.43 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
278
279
280
281
282
283
284
285
286
287
288
#
# Application configuration file
#
coordinator:
# debugging switch
# - allows selecting worker instances
debug: false
# games library
library:
# some directory which is gonna be the root folder for the library
# where games are stored
basePath: assets/games
# an explicit list of supported file extensions
# which overrides Libretro emulator ROMs configs
supported:
# a list of ignored words in the ROM filenames
ignored:
- neogeo
- pgm
# print some additional info
verbose: true
# enable library directory live reload
# (experimental)
watchMode: false
monitoring:
port: 6601
# enable Go profiler HTTP server
profilingEnabled: false
metricEnabled: false
urlPrefix: /coordinator
# a custom Origins for incoming Websocket connections:
# "" -- checks same origin policy
# "*" -- allows all
# "your address" -- checks for that address
origin:
userWs:
workerWs:
# HTTP(S) server config
server:
address: :8000
https: false
# Letsencrypt or self cert config
tls:
address: :443
# allowed host name
domain:
# if both are set then will use certs
# and Letsencryt instead
httpsCert:
httpsKey:
analytics:
inject: false
gtag:
worker:
network:
# a coordinator address to connect to
coordinatorAddress: localhost:8000
# where to connect
endpoint: /wso
# ping endpoint
pingEndpoint: /echo
# set public ping address (IP or hostname)
publicAddress:
# make coordinator connection secure (wss)
secure: false
# ISO Alpha-2 country code to group workers by zones
zone:
#preferred ICE-server for multicluster setups
iceserver: stun:stun.l.google.com:19302
monitoring:
# monitoring server port
port: 6602
profilingEnabled: false
# monitoring server URL prefix
metricEnabled: false
urlPrefix: /worker
server:
address: :9000
https: false
tls:
address: :444
# LetsEncrypt config
# allowed host name
domain:
# Own certs config
httpsCert:
httpsKey:
# optional server tag
tag:
emulator:
# set output viewport scale factor
scale: 1
aspectRatio:
# enable aspect ratio changing
# (experimental)
keep: false
# recalculate emulator game frame size to the given WxH
width: 320
height: 240
# enable autosave for emulator states if set to a non-zero value of seconds
autosaveSec: 0
# save directory for emulator states
# special tag {user} will be replaced with current user's home dir
storage: "{user}/.cr/save"
libretro:
# use zip compression for emulator save states
saveCompression: false
cores:
paths:
libs: assets/cores
configs: assets/cores
# Config params for Libretro cores repository,
# available types are:
# - buildbot (the default Libretro nightly repository)
# - github (GitHub raw repository with a similar structure to buildbot)
# - raw (just a link to a zip file extracted as is)
repo:
# enable auto-download for the list of cores (list->lib)
sync: true
# external cross-process mutex lock
extLock: "{user}/.cr/cloud-game.lock"
main:
type: buildbot
url: https://buildbot.libretro.com/nightly
# if repo has file compression
compression: zip
# a secondary repo to use i.e. for not found in the main cores
secondary:
type: github
url: https://github.com/sergystepanov/libretro-spiegel/blob/main
compression: zip
# Libretro core configuration
#
# The emulator selection will happen in this order:
# - based on the folder name in the folder param
# - based on the folder name (core name) in the list (i.e. nes, snes)
# - based on the rom names in the roms param
#
# Available config params:
# - altRepo (bool) prioritize secondary repo as the download source
# - lib (string)
# - config (string)
# - roms ([]string)
# - folder (string)
# By default emulator selection is based on the folder named as cores
# in the list (i.e. nes, snes) but if you specify folder param,
# then it will try to load the ROM file from that folder first.
# - width (int) -- broken
# - height (int) -- broken
# - ratio (float)
# - isGlAllowed (bool)
# - usesLibCo (bool)
# - hasMultitap (bool)
list:
gba:
lib: mgba_libretro
roms: [ "gba", "gbc" ]
pcsx:
lib: pcsx_rearmed_libretro
roms: [ "cue" ]
# example of folder override
folder: psx
# MAME core requires additional manual setup, please read:
# https://docs.libretro.com/library/fbneo/
mame:
lib: fbneo_libretro
roms: [ "zip" ]
nes:
lib: nestopia_libretro
roms: [ "nes" ]
snes:
lib: snes9x_libretro
roms: [ "smc", "sfc", "swc", "fig", "bs" ]
hasMultitap: true
n64:
lib: mupen64plus_next_libretro
altRepo: true
config: mupen64plus_next_libretro.cfg
roms: [ "n64", "v64", "z64" ]
isGlAllowed: true
usesLibCo: true
encoder:
audio:
channels: 2
# audio frame duration needed for WebRTC (Opus)
frame: 20
frequency: 48000
video:
# h264, vpx (VP8)
codec: h264
# see: https://trac.ffmpeg.org/wiki/Encode/H.264
h264:
# Constant Rate Factor (CRF) 0-51 (default: 23)
crf: 17
# ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
preset: veryfast
# baseline, main, high, high10, high422, high444
profile: main
# film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency
tune: zerolatency
# 0-3
logLevel: 0
# see: https://www.webmproject.org/docs/encoder-parameters
vpx:
# target bitrate (KBit/s)
bitrate: 1200
# force keyframe interval
keyframeInterval: 5
# run without a game
# (experimental)
withoutGame: false
# game recording
# (experimental)
# recording allows export RAW a/v streams of games
# by default, it will export audio as WAV files,
# video as a list of PNG-encoded images, and
# one additional FFMPEG concat demux file
recording:
enabled: false
# image compression level:
# 0 - default compression
# -1 - no compression
# -2 - best speed
# -3 - best compression
compressLevel: 0
# name contains the name of the recording dir (or zip)
# format:
# %date:go_time_format% -- refer: https://go.dev/src/time/format.go
# %user% -- user name who started the recording
# %game% -- game name (game ROM name)
# %rand:len% -- a random string of given length
# as example: 20210101101010_yeE_user1_badApple
name: "%date:20060102150405%_%rand:3%_%user%_%game%"
# zip and remove recording dir on completion
zip: true
# save directory
folder: ./recording
storage:
# cloud storage provider:
# - empty (No op storage stub)
# - oracle [Oracle Object Storage](https://www.oracle.com/cloud/storage/object-storage.html)
provider:
# this value contains arbitrary key attribute:
# - oracle: pre-authenticated URL (see: https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm)
key:
webrtc:
# turn off default Pion interceptors (see: https://github.com/pion/interceptor)
# (performance)
disableDefaultInterceptors: true
# indicates the role of the DTLS transport (see: https://github.com/pion/webrtc/blob/master/dtlsrole.go)
# (debug)
# - (default)
# - 1 (auto)
# - 2 (client)
# - 3 (server)
dtlsRole:
# a list of STUN/TURN servers to use
iceServers:
- url: stun:stun.l.google.com:19302
# configures whether the ice agent should be a lite agent (true/false)
# (performance)
# don't use iceServers when enabled
iceLite: false
# ICE configuration
# by default, ICE ports are random and unlimited
# alternatives:
# 1. instead of random unlimited port range for
# WebRTC connections, these params limit port range of ICE connections
icePorts:
min:
max:
# 2. select a single port to forward all ICE connections there
singlePort:
# override ICE candidate IP, see: https://github.com/pion/webrtc/issues/835,
# can be used for Docker bridged network internal IP override
iceIpMap: