Tag: Media Foundation

Windows 11 Virtual Camera: Real-Time Video with Minimal Latency

A customer approached us to create a virtual camera subsystem for Windows tailored to their specific use case. Their application required a video feed from either a built-in or externally connected camera. Simultaneously, they wanted to make this camera accessible to other applications.

As previously mentioned https://lnkd.in/dYte5SQ5, this longstanding challenge had been addressed through specific development, with the open-source sample known as “VCam” serving as the starting point. Remarkably, VCam predates even Stack Overflow itself. Yet recently there have still been inquiries related to VCam, as evidenced by discussions on Stack Overflow: https://lnkd.in/dyu_Ypta.

However, with the advent of Windows 11, Microsoft finally provided a solution to the virtual camera conundrum as part of their #MediaFoundation API, codenamed “MFCreateVirtualCamera”. We successfully implemented this solution for our customer. In addition to the proof of concept https://lnkd.in/djy7Uq3w that we shared in 2022, this marked our first production use of this new technology.

In essence, we re-established a #realtime video feed with nearly zero latency, effectively treating it as an independent source of video signal.

Play an MP3 with Media Foundation

An under 100 lines of C++ code sample that plays an MP3 file with Microsoft Media Foundation. https://github.com/roman380/MediaFoundationMinimalAudioPlayback Comes from this StackOverflow question, however unlike Microsoft’s sample it does not spread simple code among multiple source code files, gives a quick way to build & run, shows modern C++ practices (including Microsoft Windows Implementation Library…

Read the full article

Encoding multiple concurrent real time video streams with NVIDIA hardware video encoder

NVIDIA consumer grade hardware provides support nowadays for – mostly – three concurrent sessions. The support matrix is provided here: Video Encode and Decode GPU Support Matrix | NVIDIA Developer. This small tool starts video encoding with given signal parameters (resolution, rate) and provides an easy way to measure load of GPU video encoding engine.…

Read the full article

Windows 11 Virtual Video Camera

Just a quick hookup of my test Media Foundation media source into new Windows 11 MFCreateVirtualCamera API. Software video source is presented by Windows 11 as a video capture device. Finally, there is a nice way to create virtual cameras, even though Windows 11 (Windows Build 22000) is a minimal requirement. Application produced video stream…

Read the full article

Beyond the Possible

I am replaying a pretty much regular MPEG TS recording taken from air, just with a MPEG TS rollover condition inside. Microsoft Media Foundation – ? FAIL Microsoft Movies & TV Application – ? FAIL (obviously because of #1 above, but let me double this down) Media Player Classic MPC-HC – ? FAIL VLC –…

Read the full article