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.3.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.3-py3-none-any.whl
(3.1 kB
view details)
File details
Details for the file rtcam-0.0.3.tar.gz.
File metadata
- Download URL: rtcam-0.0.3.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 |
e4ba18abf4618d4c2b89f250899870da0d861d290817011bcd89b48bab5a822e
|
|
| MD5 |
fad84fa4f4859915b0c9118b14666041
|
|
| BLAKE2b-256 |
7e9a005c40fd5fbf9d7ba7a4ff79f52133e1ebc69647ca0eb597c35c987a7e1f
|
File details
Details for the file rtcam-0.0.3-py3-none-any.whl.
File metadata
- Download URL: rtcam-0.0.3-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 |
5907a40752f5fb95f110eae3f16cfac34dd9d84c1352cd0da8f14c95169a541f
|
|
| MD5 |
96ba8d382ba2d797303a7fdced7d6545
|
|
| BLAKE2b-256 |
3e890acd84ea1adc28b5214d97acd57ed0d364b6c02229a3acbdf315cce9bdea
|