Receiving frames from camera in subnet browsers via WebRTC
Project description
Receive WebRTC Camera Stream with aiortc
See also BrowserCam
Signaling
WebSocket with JSON, message format below:
SDP Exchange (Offer/Answer): same as RTCSessionDescriptionInit, { type: "offer/anwser", sdp: "<SDP>" }
ICE Candidate: { type: "candidate", candidate: RTCLocalIceCandidateInit | undefined }
Example
import cv2
from rtcam import CameraThread
camera = CameraThread(f'wss://{signaling_server_addr}/signal')
camera.start()
while True:
if camera.frame is None: continue
cv2.imshow("Browser Camera", camera.frame.to_ndarray(format='bgr24'))
if cv2.waitKey(1) == 27: break
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rtcam-0.0.4.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
rtcam-0.0.4-py3-none-any.whl
(3.1 kB
view details)
File details
Details for the file rtcam-0.0.4.tar.gz.
File metadata
- Download URL: rtcam-0.0.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e377d145aece501de24a4c3faf9effb439277760858936b098a0342a6f2b8f3c
|
|
| MD5 |
704b527ae4f16dc0ee6408b367b5c8f8
|
|
| BLAKE2b-256 |
81119419db494f250b656da8393148a89e0b4904842a7b5e4d647a00cce1e383
|
File details
Details for the file rtcam-0.0.4-py3-none-any.whl.
File metadata
- Download URL: rtcam-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e54ba04304d248b40dd71201348acd58dced757e94ee8ddbbbebd4bfffbea7c
|
|
| MD5 |
f7b805bf2fa68d5803bca6007f9039e1
|
|
| BLAKE2b-256 |
e137e08a4892df97709cd3049609486d2e00157d833a3587621f44d6f88bfce3
|