[Spice-devel] Discuss about camera redirection in SPICE

zhenwei pi pizhenwei at bytedance.com
Fri Jan 14 09:32:41 UTC 2022


Hi,

Recently I sent patch set(still in pending state) to QEMU community to 
introduce camera subsystem and USB video class emulation. The framework 
looks like following:

    +---------+       +------------+     +---------------+
    |UVC(done)|       |virtio(TODO)|     |other HW device|
    +---------+       +------------+     +---------------+
          |                 |                     |
          |            +------------+             |
	 +------------+camera(done)+-------------+
                       +----+-------+
                            |
          +-----------------+---------------------+
          |                 |                     |
   +------+------+     +----+-----+        +------+------+
   |builtin(done)|     |v4l2(done)|        |other drivers|
   +-------------+     +----------+        +-------------+

With these changes, we can emulate a UVC webcam for guest, it works 
without additional guest driver. And use local v4l2 video capture device 
or draw something into UVC device on host side.

And I have a plan to develop a new channel and relevant API for camera 
redirection in SPICE, then a desktop instance could use remote webcam.

Although USB redirection has already provided a solution to use a remote 
webcam, I notice that it uses a heavy network(1280*720 at 30FPS in MJPEG 
uses 5MB/s+). I have tested several webcam, and all of them don't 
support h264. So I'd like to develop camera redirection in SPICE with 
h264 support, and expect to reduce the network bandwidth(300K/s may be 
enough).

Could you please give me any suggestion about this?

Patch link:
https://patchwork.kernel.org/project/qemu-devel/cover/20211227142734.691900-1-pizhenwei@bytedance.com/

-- 
zhenwei pi


More information about the Spice-devel mailing list