Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“· vCamService

Platform .NET License Build

Turn any RTSP or MJPEG IP camera into a virtual webcam β€” no drivers, no admin rights required.

vCamService ingests live streams from network cameras and re-exposes them as a standard Windows webcam device. Once running, open Zoom, Teams, OBS, Slack, Google Meet, or any other app and simply select "vCamService Camera" from the camera picker β€” exactly as you would a physical webcam.

Who is this for? Security camera owners, home-lab enthusiasts, streamers, and anyone who wants to route an IP camera feed into video call software without buying dedicated hardware or dealing with kernel drivers.


✨ Features

  • πŸŽ₯ RTSP & MJPEG support β€” H.264, H.265, and MJPEG streams from any IP camera
  • πŸͺŸ Zero-driver virtual camera β€” uses the Windows 11 MFCreateVirtualCamera API; registers per-user under HKCU, no elevation needed
  • πŸ”„ Automatic reconnection β€” exponential backoff with jitter; streams recover silently after network interruption
  • πŸ–ΌοΈ Live preview β€” 10 fps in-app preview of the active stream
  • πŸ—‚οΈ Multiple stream profiles β€” configure as many cameras as you like, switch the active feed in one click
  • πŸ“‘ RTSP transport selection β€” TCP or UDP per stream (TCP default for firewall-friendly operation)
  • πŸ”” System tray β€” minimize to tray; full control from the tray icon
  • πŸ“Š Status bar β€” real-time CPU and memory readout
  • πŸ’Ύ Persistent config β€” streams and preferences saved to %AppData%\vCamService\config.json
  • πŸ“ Structured logging β€” rolling daily logs via Serilog
  • πŸ“¦ MSI installer β€” single self-contained executable, no .NET install required on the target machine

πŸ–ΌοΈ Screenshots

Screenshots coming soon. The UI features a stream list, live preview panel, and status bar β€” all in a clean WPF window with system-tray support.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  vCamService                              _ β–‘ βœ•      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Streams                    β”‚  Preview               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ ● Front Door   [β–Ά]  β”‚    β”‚  β”‚                 β”‚  β”‚
β”‚  β”‚   Back Yard    [β–Ά]  β”‚    β”‚  β”‚   Live preview  β”‚  β”‚
β”‚  β”‚ + Add stream…       β”‚    β”‚  β”‚                 β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  🟒 Camera: vCamService Camera  β”‚ CPU 2%  RAM 38 MB  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ–₯️ Requirements

Requirement Minimum
OS Windows 11 version 22H2 (build 22621) or later
.NET runtime .NET 8 β€” bundled in the MSI (self-contained)
FFmpeg Must be on PATH β€” install with winget install ffmpeg

⚠️ Windows 11 22H2+ is a hard requirement. The MFCreateVirtualCamera API used to create user-mode virtual cameras was introduced in that release and is not available on Windows 10 or earlier Windows 11 builds.


πŸ“₯ Installation

Option A β€” MSI Installer (recommended)

  1. Download vCamService-Setup.msi from the Releases page.
  2. Run the installer β€” no elevation needed, installs per-user.
  3. Install FFmpeg if you haven't already:
    winget install ffmpeg
  4. Launch vCamService from the Start Menu.

Option B β€” Build from Source

See Building from Source below.


πŸš€ Usage

1 β€” Add a stream

Click "+ Add stream…" and fill in:

Field Description
Name Friendly label, e.g. Front Door
URL Full stream URL, e.g. rtsp://192.168.1.100:554/stream1 or http://192.168.1.101/video
Protocol rtsp or mjpeg
Resolution / FPS Target decode resolution (default 1280 Γ— 720 @ 30 fps)
RTSP transport tcp (recommended) or udp

2 β€” Activate a stream

Click the β–Ά button next to any stream to make it the active source feeding the virtual camera. The status bar turns green and shows "vCamService Camera".

3 β€” Select the camera in your app

Open Zoom, Teams, OBS, or any webcam-aware application. In the camera selector, choose:

vCamService Camera

That's it β€” the live feed from your IP camera will appear.

4 β€” Minimize to tray

Close the window to minimize to the system tray. The virtual camera keeps running. Right-click the tray icon to restore, switch streams, or exit.


πŸ—οΈ Architecture

vCamService is structured as three projects with a clear layering boundary:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     vCamService.App                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  WPF UI     β”‚  β”‚ AppOrchestratorβ”‚  β”‚  TrayIcon   β”‚  β”‚
β”‚  β”‚  (MVVM)     β”‚  β”‚  + DI Host     β”‚  β”‚  Service    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚                 β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  vCamService.Core                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚StreamReaderβ”‚  β”‚FrameBufferβ”‚  β”‚ ReconnectManager   β”‚  β”‚
β”‚  β”‚(FFmpeg sub)β”‚  β”‚(overwrite)β”‚  β”‚ (exp. backoff)     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  vCamService.VCam                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚VirtualCameraSourceβ”‚  β”‚ VirtualCameraManager   β”‚   β”‚
β”‚  β”‚(IMFMediaSource)   β”‚  β”‚ (MFCreateVirtualCamera)β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Layer responsibilities

Project Role
vCamService.Core Protocol-agnostic stream decoding (FFmpeg subprocess β†’ raw BGRA frames), config persistence, and reconnection logic. No UI, no Windows-specific APIs.
vCamService.VCam Wraps the Windows Media Foundation MFCreateVirtualCamera COM API. Exposes VirtualCameraManager (start/stop/send-frame) and VirtualCameraSource (the IMFMediaSource implementation). Contains 18 hand-written COM interface definitions and P/Invoke declarations.
vCamService.App WPF + MVVM shell. Hosts the DI container (Microsoft.Extensions.Hosting), AppOrchestrator, tray icon, and resource monitor.

Threading model

Thread Role
Main thread WPF dispatcher β€” all UI mutations
Thread R1…RN One StreamReader per configured stream; reads FFmpeg stdout and writes BGRA frames to its FrameBuffer
Thread F Frame feeder β€” reads the active FrameBuffer and pushes frames to VirtualCameraManager at the configured FPS
Timer T Preview refresh β€” DispatcherTimer at 10 fps on the UI thread
Timer S Status bar β€” CPU/RAM refresh every 2 seconds

Frame pipeline

IP Camera
  β”‚  (RTSP / MJPEG / TCP / UDP)
  β–Ό
FFmpeg subprocess
  β”‚  stdout: raw BGRA bytes  (width Γ— height Γ— 4)
  β–Ό
FrameBuffer  (lock-free overwrite β€” always newest frame)
  β–Ό
Frame feeder thread  (@ VCamFps)
  β–Ό
VirtualCameraManager.SendFrame()
  β–Ό
IMFVirtualCamera  (Windows Media Foundation session camera)
  β–Ό
Zoom / Teams / OBS / any webcam consumer

BGRA is used throughout: FFmpeg outputs it directly (-pix_fmt bgra), Media Foundation consumes it natively, and WPF renders it without conversion.


πŸ”§ Building from Source

Prerequisites

  • .NET 8 SDK
  • Windows 11 22H2+ for running/testing (compilation works on macOS/Linux)
  • WiX Toolset v4 for building the MSI (Windows only)

Build & test

# Clone
git clone https://github.com/your-username/vCamService.git
cd vCamService

# Build all projects
dotnet build

# Run tests  (25 tests: 18 Core + 7 VCam)
dotnet test

Build the MSI installer

Run on Windows. The script publishes a self-contained win-x64 single-file executable, then invokes WiX to produce the MSI.

.\build-installer.ps1 -Version "1.2.0"

Output: src/vCamService.Installer/bin/Release/vCamService-Setup.msi

Parameter Default Description
-Version 1.0.0 Product version embedded in the MSI
-Configuration Release Build configuration

The published app is --self-contained true -r win-x64 -p:PublishSingleFile=true, so no separate .NET runtime installation is required on the target machine.


βš™οΈ Configuration

Config is stored at %AppData%\vCamService\config.json and written on every change. The file is created automatically on first run.

Full schema

{
  "configVersion": 1,

  // ID of the stream currently feeding the virtual camera (null = none active)
  "activeStreamId": "a1b2c3d4-...",

  // Virtual camera output resolution and frame rate
  "vCamWidth":  1280,
  "vCamHeight": 720,
  "vCamFps":    30,

  // Minimize to system tray on window close
  "minimizeToTray": true,

  "streams": [
    {
      // Auto-generated UUID β€” do not edit
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",

      "name": "Front Door",
      "url":  "rtsp://192.168.1.100:554/stream1",

      // "rtsp" or "mjpeg"
      "protocol": "rtsp",

      // Requested decode resolution (FFmpeg will scale if needed)
      "width":  1280,
      "height": 720,
      "fps":    30,

      // RTSP only: "tcp" (recommended) or "udp"
      "rtspTransport": "tcp",

      // Set false to keep the stream configured but prevent it from starting
      "enabled": true
    }
  ]
}

Key settings

Setting Default Notes
vCamWidth / vCamHeight 1280 / 720 Output resolution of the virtual camera device
vCamFps 30 Frame rate fed to Media Foundation
minimizeToTray true Window close sends to tray instead of exiting
rtspTransport "tcp" Use "udp" only if TCP causes issues; UDP is faster but drops frames behind NAT
enabled true Disabled streams are skipped at startup

πŸ“‹ Logging

Logs are written to:

%AppData%\vCamService\logs\vcamservice-YYYYMMDD.log
  • Rolling daily files β€” one file per calendar day
  • Old log files are retained according to Serilog's default retention policy
  • Log level: Information in Release builds; increase to Debug or Verbose by modifying the Serilog configuration in App.xaml.cs

Typical log entries:

[12:01:05 INF] AppOrchestrator started. Active stream: Front Door
[12:01:05 INF] StreamReader started: rtsp://192.168.1.100:554/stream1
[12:01:05 INF] VirtualCameraManager started (1280x720 @ 30fps)
[12:03:42 WRN] StreamReader lost connection; reconnecting in 2.1s (attempt 1)
[12:03:44 INF] StreamReader reconnected successfully

⚠️ Known Limitations

Limitation Detail
Windows 11 22H2+ only MFCreateVirtualCamera is not available on Windows 10 or earlier Windows 11 builds (pre-22621). There is no planned workaround.
FFmpeg required FFmpeg must be installed separately and available on PATH. The app checks for it at startup via ffmpeg -version and shows instructions if not found.
No audio The virtual camera is video-only. Audio from IP cameras is not captured or forwarded.
Single virtual camera Only one virtual device is created (vCamService Camera). Multiple simultaneous outputs are not supported.
Session lifetime The virtual camera device exists only while the app is running. It is registered fresh on each launch under HKCU (no permanent driver installation).
x64 only Published as win-x64. ARM64 Windows is untested.

🀝 Contributing

Contributions are welcome! A few guidelines:

  • Bug reports β€” open an issue with the log file attached (%AppData%\vCamService\logs\)
  • Pull requests β€” keep changes focused; one concern per PR
  • New stream protocols β€” implement IStreamReader in vCamService.Core and wire up in AppOrchestrator
  • Tests β€” add tests under tests/ for any new Core or VCam logic
vCamService.sln
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ vCamService.Core/       ← stream logic, models, config (testable, no UI)
β”‚   β”œβ”€β”€ vCamService.VCam/       ← Media Foundation COM layer
β”‚   β”œβ”€β”€ vCamService.App/        ← WPF UI shell
β”‚   └── vCamService.Installer/  ← WiX v4 MSI
└── tests/
    β”œβ”€β”€ vCamService.Core.Tests/  ← 18 unit tests
    └── vCamService.VCam.Tests/  ← 7 unit tests

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with ❀️ using .NET 8, Windows Media Foundation, and FFmpeg.

About

Convert RTSP/MJPEG IP camera streams into a virtual webcam on Windows 11 (.NET 8 / WPF / Media Foundation)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages