Skip to content

Commit be4b6c3

Browse files
committed
Update docs
1 parent f3ad4ad commit be4b6c3

6 files changed

Lines changed: 123 additions & 63 deletions

File tree

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Ultimate camera streaming application with support for dozens formats and protoc
3333
- [streaming audio](#stream-to-camera) to all cameras with [two-way audio](#two-way-audio) support
3434
- mixing tracks from different sources to single stream
3535
- [auto-match](www/README.md#javascript-api) client-supported streaming formats and codecs
36+
- [streaming stats](#streaming-stats) for all active connections
3637
- can be [integrated to any project](#projects-using-go2rtc) or be used as [standalone app](#go2rtc-binary)
3738

3839
#### Inspired by
@@ -64,6 +65,7 @@ Ultimate camera streaming application with support for dozens formats and protoc
6465
- [Stream to camera](#stream-to-camera)
6566
- [Publish stream](#publish-stream)
6667
- [Preload stream](#preload-stream)
68+
- [Streaming stats](#streaming-stats)
6769
- [Codecs](#codecs)
6870
- [Codecs filters](#codecs-filters)
6971
- [Codecs madness](#codecs-madness)
@@ -82,9 +84,7 @@ Ultimate camera streaming application with support for dozens formats and protoc
8284
2. Open web interface: `http://localhost:1984/`
8385
3. Add [streams](#streaming-input) to [config](#configuration)
8486

85-
**Developers:**
86-
87-
- integrate [HTTP API](internal/api/README.md) into your smart home platform
87+
**Developers:** integrate [HTTP API](internal/api/README.md) into your smart home platform.
8888

8989
### go2rtc: Binary
9090

@@ -141,14 +141,16 @@ Latest, but maybe unstable version:
141141
## Configuration
142142

143143
This is the `go2rtc.yaml` file in [YAML-format](https://en.wikipedia.org/wiki/YAML).
144-
The configuration can be changed in the [web interface](www/README.md) at `http://localhost:1984`.
144+
The configuration can be changed in the [WebUI](www/README.md) at `http://localhost:1984`.
145145
The editor provides syntax highlighting and checking.
146146

147+
![go2rtc webui config](website/images/webui-config.png)
148+
147149
The simplest config looks like this:
148150

149151
```yaml
150152
streams:
151-
hall_camera: rtsp://admin:password@192.168.1.123/cam/realmonitor?channel=1&subtype=0
153+
hall-camera: rtsp://admin:password@192.168.1.123/cam/realmonitor?channel=1&subtype=0
152154
```
153155
154156
- by default go2rtc will search `go2rtc.yaml` in the current work directory
@@ -162,6 +164,12 @@ More information can be [found here](internal/app/README.md).
162164

163165
A summary table of all modules and features can be found [here](internal/README.md).
164166

167+
**Core modules**
168+
169+
- [`app`](internal/app/README.md) - Reading [configs](internal/app/README.md) and setting up [logs](internal/app/README.md#log).
170+
- [`api`](internal/api/README.md) - Handle [HTTP](internal/api/README.md) and [WebSocket](internal/api/ws/README.md) API.
171+
- [`streams`](internal/streams/README.md) - Handle a list of streams.
172+
165173
### Streaming input
166174

167175
#### public protocols
@@ -298,6 +306,13 @@ You can preload any stream on go2rtc start. This is useful for cameras that take
298306

299307
[read more](internal/streams/README.md#preload-stream)
300308

309+
### Streaming stats
310+
311+
[WebUI](www/README.md) provides detailed information about all active connections, including IP-addresses, formats, protocols, number of packets and bytes transferred.
312+
Via the [HTTP API](internal/api/README.md) in [`json`](https://en.wikipedia.org/wiki/JSON) or [`dot`](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) format on an interactive connection map.
313+
314+
![go2rtc webui net](website/images/webui-net.png)
315+
301316
## Codecs
302317

303318
If you have questions about why video or audio is not displayed, you need to read the following sections.

internal/README.md

Lines changed: 99 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,109 @@
33
go2rtc tries to name formats, protocols and codecs the same way they are named in FFmpeg.
44
Some formats and protocols go2rtc supports exclusively. They have no equivalent in FFmpeg.
55

6-
- The `echo`, `expr`, `hass` and `onvif` modules receive a link to a stream. They don't know the protocol in advance.
7-
- The `exec` and `ffmpeg` modules support many formats. They are identical to the `http` module.
8-
- The `api`, `app`, `debug`, `ngrok`, `pinggy`, `srtp`, `streams` are supporting modules.
6+
- The [`echo`], [`expr`], [`hass`] and [`onvif`] modules receive a link to a stream. They don't know the protocol in advance.
7+
- The [`exec`] and [`ffmpeg`] modules support many formats. They are identical to the [`http`] module.
8+
- The [`api`], [`app`], [`debug`], [`ngrok`], [`pinggy`], [`srtp`], [`streams`] are supporting modules.
99

1010
**Modules** implement communication APIs: authorization, encryption, command set, structure of media packets.
1111

1212
**Formats** describe the structure of the data being transmitted.
1313

1414
**Protocols** implement transport for data transmission.
1515

16-
| module | formats | protocols | input | output | ingest | two-way |
17-
|--------------|-----------------|------------------|-------|--------|--------|---------|
18-
| `alsa` | `pcm` | `ioctl` | yes | | | |
19-
| `bubble` | - | `http` | yes | | | |
20-
| `doorbird` | `mulaw` | `http` | yes | | | yes |
21-
| `dvrip` | - | `tcp` | yes | | | yes |
22-
| `echo` | * | * | yes | | | |
23-
| `eseecloud` | `rtp` | `http` | yes | | | |
24-
| `exec` | * | `pipe`, `rtsp` | yes | | | yes |
25-
| `expr` | * | * | yes | | | |
26-
| `ffmpeg` | * | `pipe`, `rtsp` | yes | | | |
27-
| `flussonic` | `mp4` | `ws` | yes | | | |
28-
| `gopro` | `mpegts` | `udp` | yes | | | |
29-
| `hass` | * | * | yes | | | |
30-
| `hls` | `mpegts`, `mp4` | `http` | | yes | | |
31-
| `homekit` | `rtp` | `hap` | yes | yes | | no |
32-
| `http` | `adts` | `http`, `tcp` | yes | | | |
33-
| `http` | `flv` | `http`, `tcp` | yes | | | |
34-
| `http` | `h264` | `http`, `tcp` | yes | | | |
35-
| `http` | `hevc` | `http`, `tcp` | yes | | | |
36-
| `http` | `hls` | `http`, `tcp` | yes | | | |
37-
| `http` | `mjpeg` | `http`, `tcp` | yes | | | |
38-
| `http` | `mpjpeg` | `http` | yes | | | |
39-
| `http` | `mpegts` | `http`, `tcp` | yes | | | |
40-
| `http` | `wav` | `http`, `tcp` | yes | | | |
41-
| `http` | `yuv4mpegpipe` | `http`, `tcp` | yes | | | |
42-
| `isapi` | `alaw`, `mulaw` | `http` | | | | yes |
43-
| `ivideon` | `mp4` | `ws` | yes | | | |
44-
| `mjpeg` | `ascii` | `http` | | yes | | |
45-
| `mjpeg` | `jpeg` | `http` | | yes | | |
46-
| `mjpeg` | `mpjpeg` | `http` | | yes | yes | |
47-
| `mjpeg` | `yuv4mpegpipe` | `http` | | yes | | |
48-
| `mp4` | `mp4` | `http`, `ws` | | yes | | |
49-
| `mpegts` | `adts` | `http` | | yes | | |
50-
| `mpegts` | `mpegts` | `http` | | yes | yes | |
51-
| `multitrans` | `rtp` | `tcp` | | | | yes |
52-
| `nest` | `srtp` | `rtsp`, `webrtc` | yes | | | no |
53-
| `onvif` | `rtp` | * | yes | yes | | |
54-
| `ring` | `srtp` | `webrtc` | yes | | | yes |
55-
| `roborock` | `srtp` | `webrtc` | yes | | | yes |
56-
| `rtmp` | `rtmp` | `rtmp` | yes | yes | yes | |
57-
| `rtmp` | `flv` | `http` | | yes | yes | |
58-
| `rtsp` | `rtsp` | `rtsp` | yes | yes | yes | yes |
59-
| `tapo` | `mpegts` | `http` | yes | | | yes |
60-
| `tuya` | `srtp` | `webrtc` | yes | | | yes |
61-
| `v4l2` | `rawvideo` | `ioctl` | yes | | | |
62-
| `webrtc` | `srtp` | `webrtc` | yes | yes | yes | yes |
63-
| `webtorrent` | `srtp` | `webrtc` | yes | yes | | |
64-
| `wyoming` | `pcm` | `tcp` | | yes | | |
65-
| `wyze` | - | `tutk` | yes | | | yes |
66-
| `xiaomi` | - | `cs2`, `tutk` | yes | | | yes |
67-
| `yandex` | `srtp` | `webrtc` | yes | | | |
16+
| module | formats | protocols | input | output | ingest | two-way |
17+
|----------------|-----------------|------------------|-------|--------|--------|---------|
18+
| [`alsa`] | `pcm` | `ioctl` | yes | | | |
19+
| [`bubble`] | - | `http` | yes | | | |
20+
| [`doorbird`] | `mulaw` | `http` | yes | | | yes |
21+
| [`dvrip`] | - | `tcp` | yes | | | yes |
22+
| [`echo`] | * | * | yes | | | |
23+
| [`eseecloud`] | `rtp` | `http` | yes | | | |
24+
| [`exec`] | * | `pipe`, `rtsp` | yes | | | yes |
25+
| [`expr`] | * | * | yes | | | |
26+
| [`ffmpeg`] | * | `pipe`, `rtsp` | yes | | | |
27+
| [`flussonic`] | `mp4` | `ws` | yes | | | |
28+
| [`gopro`] | `mpegts` | `udp` | yes | | | |
29+
| [`hass`] | * | * | yes | | | |
30+
| [`hls`] | `mpegts`, `mp4` | `http` | | yes | | |
31+
| [`homekit`] | `srtp` | `hap` | yes | yes | | no |
32+
| [`http`] | `adts` | `http`, `tcp` | yes | | | |
33+
| [`http`] | `flv` | `http`, `tcp` | yes | | | |
34+
| [`http`] | `h264` | `http`, `tcp` | yes | | | |
35+
| [`http`] | `hevc` | `http`, `tcp` | yes | | | |
36+
| [`http`] | `hls` | `http`, `tcp` | yes | | | |
37+
| [`http`] | `mjpeg` | `http`, `tcp` | yes | | | |
38+
| [`http`] | `mpjpeg` | `http` | yes | | | |
39+
| [`http`] | `mpegts` | `http`, `tcp` | yes | | | |
40+
| [`http`] | `wav` | `http`, `tcp` | yes | | | |
41+
| [`http`] | `yuv4mpegpipe` | `http`, `tcp` | yes | | | |
42+
| [`isapi`] | `alaw`, `mulaw` | `http` | | | | yes |
43+
| [`ivideon`] | `mp4` | `ws` | yes | | | |
44+
| [`mjpeg`] | `ascii` | `http` | | yes | | |
45+
| [`mjpeg`] | `jpeg` | `http` | | yes | | |
46+
| [`mjpeg`] | `mpjpeg` | `http` | | yes | yes | |
47+
| [`mjpeg`] | `yuv4mpegpipe` | `http` | | yes | | |
48+
| [`mp4`] | `mp4` | `http`, `ws` | | yes | | |
49+
| [`mpegts`] | `adts` | `http` | | yes | | |
50+
| [`mpegts`] | `mpegts` | `http` | | yes | yes | |
51+
| [`multitrans`] | `rtp` | `tcp` | | | | yes |
52+
| [`nest`] | `srtp` | `rtsp`, `webrtc` | yes | | | no |
53+
| [`onvif`] | `rtp` | * | yes | yes | | |
54+
| [`ring`] | `srtp` | `webrtc` | yes | | | yes |
55+
| [`roborock`] | `srtp` | `webrtc` | yes | | | yes |
56+
| [`rtmp`] | `flv` | `rtmp` | yes | yes | yes | |
57+
| [`rtmp`] | `flv` | `http` | | yes | yes | |
58+
| [`rtsp`] | `rtsp` | `rtsp` | yes | yes | yes | yes |
59+
| [`tapo`] | `mpegts` | `http` | yes | | | yes |
60+
| [`tuya`] | `srtp` | `webrtc` | yes | | | yes |
61+
| [`v4l2`] | `rawvideo` | `ioctl` | yes | | | |
62+
| [`webrtc`] | `srtp` | `webrtc` | yes | yes | yes | yes |
63+
| [`webtorrent`] | `srtp` | `webrtc` | yes | yes | | |
64+
| [`wyoming`] | `pcm` | `tcp` | | yes | | |
65+
| [`wyze`] | - | `tutk` | yes | | | yes |
66+
| [`xiaomi`] | - | `cs2`, `tutk` | yes | | | yes |
67+
| [`yandex`] | `srtp` | `webrtc` | yes | | | |
68+
69+
[`alsa`]: alsa/README.md
70+
[`api`]: api/README.md
71+
[`app`]: app/README.md
72+
[`bubble`]: bubble/README.md
73+
[`debug`]: debug/README.md
74+
[`doorbird`]: doorbird/README.md
75+
[`dvrip`]: dvrip/README.md
76+
[`echo`]: echo/README.md
77+
[`eseecloud`]: eseecloud/README.md
78+
[`exec`]: exec/README.md
79+
[`expr`]: expr/README.md
80+
[`ffmpeg`]: ffmpeg/README.md
81+
[`flussonic`]: flussonic/README.md
82+
[`gopro`]: gopro/README.md
83+
[`hass`]: hass/README.md
84+
[`hls`]: hls/README.md
85+
[`homekit`]: homekit/README.md
86+
[`http`]: http/README.md
87+
[`isapi`]: isapi/README.md
88+
[`ivideon`]: ivideon/README.md
89+
[`mjpeg`]: mjpeg/README.md
90+
[`mp4`]: mp4/README.md
91+
[`mpegts`]: mpegts/README.md
92+
[`multitrans`]: multitrans/README.md
93+
[`nest`]: nest/README.md
94+
[`ngrok`]: ngrok/README.md
95+
[`onvif`]: onvif/README.md
96+
[`pinggy`]: pinggy/README.md
97+
[`ring`]: ring/README.md
98+
[`roborock`]: roborock/README.md
99+
[`rtmp`]: rtmp/README.md
100+
[`rtsp`]: rtsp/README.md
101+
[`srtp`]: srtp/README.md
102+
[`streams`]: streams/README.md
103+
[`tapo`]: tapo/README.md
104+
[`tuya`]: tuya/README.md
105+
[`v4l2`]: v4l2/README.md
106+
[`webrtc`]: webrtc/README.md
107+
[`webtorrent`]: webtorrent/README.md
108+
[`wyoming`]: wyze/README.md
109+
[`wyze`]: wyze/README.md
110+
[`xiaomi`]: xiaomi/README.md
111+
[`yandex`]: yandex/README.md

internal/app/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# App
22

3-
The application module is responsible for reading configuration files and running other modules.
3+
The application module is responsible for reading configuration files, running other modules and setting up [logs](#log).
44

55
The configuration can be edited through the application's WebUI with code highlighting, syntax and specification checking.
66

@@ -60,10 +60,10 @@ api:
6060
listen: ":1984" # default public port for WebUI and HTTP API
6161

6262
ffmpeg:
63-
bin: "ffmpeg" # default binary path for FFmpeg
63+
bin: "ffmpeg" # default binary path for FFmpeg
6464

6565
log:
66-
level: "info" # default log level
66+
level: "info" # default log level
6767
output: "stdout"
6868
time: "UNIXMS"
6969

website/.vitepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export default defineConfig({
4141
{text: 'Stream to camera', link: '/#stream-to-camera'},
4242
{text: 'Publish stream', link: '/#publish-stream'},
4343
{text: 'Preload stream', link: '/#preload-stream'},
44+
{text: 'Streaming stats', link: '/#streaming-stats'},
4445
],
4546
collapsed: false,
4647
},

website/images/webui-config.png

219 KB
Loading

website/images/webui-net.png

124 KB
Loading

0 commit comments

Comments
 (0)