Skip to content

Commit e3188a0

Browse files
committed
Update docs about config
1 parent 2bab0a0 commit e3188a0

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

internal/app/README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
- By default go2rtc will search config file `go2rtc.yaml` in current work directory
2-
- go2rtc support multiple config files
3-
- go2rtc support inline config as `YAML`, `JSON` or `key=value` format from command line
2+
- go2rtc support multiple config files:
3+
- `go2rtc -c config1.yaml -c config2.yaml -c config3.yaml`
4+
- go2rtc support inline config as multiple formats from command line:
5+
- **YAML**: `go2rtc -c '{log: {format: text}}'`
6+
- **JSON**: `go2rtc -c '{"log":{"format":"text"}}'`
7+
- **key=value**: `go2rtc -c log.format=text`
48
- Every next config will overwrite previous (but only defined params)
59

610
```
@@ -21,15 +25,24 @@ Also go2rtc support templates for using environment variables in any part of con
2125
streams:
2226
camera1: rtsp://rtsp:${CAMERA_PASSWORD}@192.168.1.123/av_stream/ch0
2327

24-
${LOGS:} # empty default value
25-
2628
rtsp:
2729
username: ${RTSP_USER:admin} # "admin" if env "RTSP_USER" not set
2830
password: ${RTSP_PASS:secret} # "secret" if env "RTSP_PASS" not set
2931
```
3032
33+
## JSON Schema
34+
35+
Editors like [GoLand](https://www.jetbrains.com/go/) and [VS Code](https://code.visualstudio.com/) supports autocomplete and syntax validation.
36+
37+
```yaml
38+
# yaml-language-server: $schema=https://raw.githubusercontent.com/AlexxIT/go2rtc/master/website/schema.json
39+
```
40+
3141
## Defaults
3242

43+
- Default values may change in updates
44+
- FFmpeg module has many presets, they are not listed here because they may also change in updates
45+
3346
```yaml
3447
api:
3548
listen: ":1984"
@@ -38,7 +51,10 @@ ffmpeg:
3851
bin: "ffmpeg"
3952

4053
log:
54+
format: "color"
4155
level: "info"
56+
output: "stdout"
57+
time: "UNIXMS"
4258

4359
rtsp:
4460
listen: ":8554"
@@ -51,4 +67,4 @@ webrtc:
5167
listen: ":8555/tcp"
5268
ice_servers:
5369
- urls: [ "stun:stun.l.google.com:19302" ]
54-
```
70+
```

0 commit comments

Comments
 (0)