Webcam
August 8, 2026 ยท View on GitHub
For usage related information, see webcam feature.
The prefix for all packets and capabilities is webcam.
| Component | Link |
|---|---|
| client | xpra.client.subsystem.webcam |
| client connection | xpra.server.source.webcam |
| server | xpra.server.subsystem.webcam |
The client exposes a single webcam boolean capability.
The server exposes the following attributes using the webcam capability prefix:
enabledbooleanencodingslist of strings - encodings supported: onlypngorjpegare guaranteed to be supporteddevicesinteger - the number of virtual video devices available
| Packet Type | Arguments | Direction |
|---|---|---|
webcam-start | device_id, width, height | client to server |
webcam-ack | unused, frame_no, width, height | server to client |
webcam-frame | device_id, frame_no, encoding, width, height, data | client to server |
webcam-stop | device_no |
device_id, frame_no, width and height are always integers, encoding is a string.
The device_id must be smaller than the number of virtual video devices.
Flow
- client requests
webcam-start - the server responds with a
webcam-ackforframe_no0, thewidthandheightmay be different from the one requested - the client can then send a
webcam-frameforframe_no1 - the server responds with a
webcam-ackfor each frame it receives - the client must wait for the
webcam-ackbefore sending the next frame - whenever the client decides to stop forwarding the webcam, it must send a
webcam-stoppacket
If any of these steps fail, a webcam-stop packet must be sent to the peer.