Re: [RFC PATCH] media: Virtual camera driver

From: Oleksandr Natalenko

Date: Mon Feb 02 2026 - 06:49:14 EST


On pondělí 2. února 2026 12:40:12, středoevropský standardní čas Laurent Pinchart wrote:
> > If I understand correctly, it would be more forward-thinking to develop
> > virtual camera support in PipeWire rather than in the kernel.
>
> I don't think there's even a need for development in PipeWire
>
> $ gst-launch-1.0 \
> videotestsrc ! \
> video/x-raw,format=YUY2 ! \
> pipewiresink mode=provide stream-properties="properties,media.class=Video/Source,media.role=Camera"
>
> This gives me a virtual camera in Firefox. Extending the GStreamer
> pipeline to get the video stream from the network should be quite
> trivial.

So far, I came up with this:

* sender:

$ gst-launch-1.0 pipewiresrc path=<webcam_id> ! image/jpeg, width=1280, height=720, framerate=24/1 ! rndbuffersize max=1400 ! udpsink host=<receiver_host> port=<receiver_port>

* receiver:

$ gst-launch-1.0 udpsrc address=<receiver_host> port=<receiver_port> ! queue ! image/jpeg, width=1280, height=720, framerate=24/1 ! jpegparse ! jpegdec ! pipewiresink mode=provide stream-properties="properties,media.class=Video/Source,media.role=Camera" client-name=VirtualCam

Please let me know if I do something dumb here. Trial and error to make this work took a couple of hours for me, but it seems to provide what I need.

Thank you.

--
Oleksandr Natalenko, MSE

Attachment: signature.asc
Description: This is a digitally signed message part.