Dear QEMU Developers,

I would like to propose the development of a video subsystem in QEMU, with
the initial
implementation focusing on UVC video device emulation and support for
multiple
backends, including V4L2, GStreamer, and libcamera.

This work is already in progress at 9elements, and we would like to
upstream it.

== Motivation

Currently, USB pass-through is the only way to make video devices available
to guests, which

    - excludes non-USB cameras (e.g., MIPI)
    - performs poorly with high-resolution cameras
    - does not work with USB 3.0 video devices (Issue #1613)

== Proposal

We aim to introduce a video subsystem in QEMU that allows for the
implementation of various
video devices, similar to how QEMU handles audio. The first device
implementation will be
UVC (USB Video Class) device emulation, with support for multiple backends.
Future extensions
could include virtio-video or other PCI-based video devices.

Supported backends:

    - Video4Linux (V4L2)
    - GStreamer
    - libcamera

== Example: V4L2 Backend

Once implemented, a typical QEMU command line for using a V4L2 backend
would look like this

    ./build/qemu-system-x86_64 \
        -device qemu-xhci \
        -videodev v4l2,id=cam0,device=/dev/video0 \
        -device usb-video,videodev=cam0

This sets up a UVC emulated device in the guest, using /dev/video0 from the
host via the V4L2 backend.

== Next Steps

We welcome feedback on design considerations and integration approaches.
Let us know
if there are existing discussions or preferred directions for this work.

Best regards,

David Milosevic
Firmware Developer
9elements

Reply via email to