Skip to content

Commit 2bb3a33

Browse files
committed
docs: update readme with webrtc
1 parent 480f3c1 commit 2bb3a33

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,20 @@ On startup the following arguments are supported:
4646
| `-f`, `--fps` | Framerate in frames per second (fps). | `15` |
4747
| `-st`, `--stream_url` | Sets the URL for the mjpeg stream. | `/stream` |
4848
| `-sn`, `--snapshot_url` | Sets the URL for snapshots (single frame of stream). | `/snapshot` |
49+
| `-w`, `--webrtc_url` | Sets the URL for WebRTC (H264 compressed stream). | `/webrtc` |
4950
| `-af`, `--autofocus` | Autofocus mode. Supported modes: `manual`, `continuous`. | `continuous` |
5051
| `-l`, `--lensposition` | Set focal distance. 0 for infinite focus, 0.5 for approximate 50cm. Only used with Autofocus manual. | `0.0` |
5152
| `-s`, `--autofocusspeed` | Autofocus speed. Supported values: `normal`, `fast`. Only used with Autofocus continuous | `normal` |
52-
| `-ud`, `--upsidedown` | Rotate the image by 180° (see below) | |
53-
| `-fh`, `--flip_horizontal` | Mirror the image horizontally (see below) | |
54-
| `-fv`, `--flip_vertical` | Mirror the image vertically (see below) | |
55-
| `-or`, `--orientation_exif` | Set the image orientation using an EXIF header (see below) | |
53+
| `-ud`, `--upsidedown` | Rotate the image by 180° (see [below](#image-orientation)) | |
54+
| `-fh`, `--flip_horizontal` | Mirror the image horizontally (see [below](#image-orientation)) | |
55+
| `-fv`, `--flip_vertical` | Mirror the image vertically (see [below](#image-orientation)) | |
56+
| `-or`, `--orientation_exif` | Set the image orientation using an EXIF header (see [below](#image-orientation)) | |
5657
| `-c`, `--controls` | Define camera controls to start spyglass with. Can be used multiple times. This argument expects the format \<control\>=\<value\>. | |
57-
| `--list-controls` | List all available libcamera controls onto the console. Those can be used with `--controls` | |
5858
| `-tf`, `--tuning_filter` | Set a tuning filter file name. | |
5959
| `-tfd`, `--tuning_filter_dir` | Set the directory to look for tuning filters. | |
6060
| `-n`, `--camera_num` | Camera number to be used. All cameras with their number can be shown with `libcamera-hello`. | `0` |
61+
| `--disable_webrtc` | Disables WebRTC encoding (recommended on Pi5). | |
62+
| `--list-controls` | List all available libcamera controls onto the console. Those can be used with `--controls` | |
6163

6264
Starting the server without any argument is the same as
6365

@@ -123,6 +125,14 @@ If you want to use Spyglass as a webcam source for [Mainsail]() add a webcam wit
123125
- URL Snapshot: `/webcam/snapshot`
124126
- Service: `V4L-MJPEG`
125127

128+
Alternatively you can use WebRTC. This will take less network bandwidth and might help to fix low fps:
129+
130+
- URL Stream: `/webcam/webrtc`
131+
- URL Snapshot: `/webcam/snapshot`
132+
- Service: `WebRTC (MediaMTX)`
133+
134+
WebRTC needs [aiortc](https://github.com/aiortc/aiortc) installed. This gets automatically installed with `make install` for further instructions, please see the [install](#install) chapter below.
135+
126136
## Install as application
127137

128138
If you want to install Spyglass globally on your machine you can use `python -m pip install .` to do so.

0 commit comments

Comments
 (0)