Moving on with Widows Camera experiments.
This time it is a Windows 11 Virtual Camera, a true one like this and this, and not this which should be totally archived despite people still keep on trying.
So what we got this time? The application derived from old CaptureEngineVideoCapture
sample still features IMFCaptureEngine
API. However, it also intallls temporary a virtual camera based on beautiful Shadertoy shader “Entangled Illumination” (you can still find the HLSL variant in the resources of the executable downloadable from the bottom of the post).
The image is synthesized on GPU (hardcoded as 1920×1080, announced as 30 fps but runs at the pace of frame requester) and is then delivered to Frame Server service for distribution.
Oh my, how poorly this Microsof Windows Media Foundation stuff is documented! In fact, this demo is the proof that despite the quality of the documentation of this technology, an experienced stranger can still take advantage of it.
From the very beginning this video travels through Windows subsystems and processes as GPU (video memory, D3D11 texture) data, from the synthesis to display composition, not a single video/system memory crossing.
You can stop preview in the test application (F4 or menu), and while the application is running the virtual video camera is visible to other applications, e.g. Windows Camera app or Skype:
You wanted Microsoft Teams? You got it covered.
Let’s go straight to the download. The demo is packaged as a single binary to run and since the initialization step requires access to register virtual camera you would have to run it “as administrator”.
PS. Are you thinking about DriectShow? This is now the most up to date method to develop virtual camera software for DirectShow too. Here you go, good old AmCap: