VCamdroid allows you to seamlessly use your mobile device’s camera as a virtual webcam on your PC. Built using a custom DirectShow filter provided by Softcam library, it ensures compatibility with popular applications like Zoom, OBS, Discord, and Teams. Whether wired (via ADB) or wireless (via Wi-Fi), VCamdroid delivers a low-latency, hardware-accelerated video feed directly to your desktop.
Key Features
Universal Compatibility: Works with any Windows application that supports standard webcams.
VCamdroid utilizes the industry-standard RTSP (Real-Time Streaming Protocol) to ensure robust, low-latency video transmission between the Android device and the Windows client.
Transport Layer:
Wi-Fi Connection: The Windows client connects directly to the RTSP server running on the Android device over the local network.
USB Connection: To enable wired communication, the application uses ADB Port Forwarding. Since ADB only supports TCP forwarding, the RTSP stream is tunneled exclusively over TCP (interleaved RTSP). This creates a stable, high-bandwidth tunnel via localhost that bypasses network interference.
Stream Handling Libraries:
Server Side (Android): Powered by the RootEncoder library. It handles the complex tasks of interfacing with the Android encoder, packetizing the video data into RTP packets, and managing the RTSP server session.
Client Side (Windows): Utilizes FFmpeg, the leading multimedia framework, to robustly demux the RTSP stream and decode the incoming video packets.
Video Pipeline
The pipeline is engineered for performance, offloading image processing to the Android GPU before compression to minimize latency and bandwidth.
Capture, Process & Encode (Android):
Capture: Video frames are captured using the modern Camera2 API.
Pre-Processing: Raw frames are processed on the GPU using OpenGL. Operations like Rotation, Mirroring (Flip), and Color Correction are applied here before encoding, ensuring the stream is "ready-to-display."
Hardware Encoding: The processed frames are passed to the device's hardware MediaCodec (supporting H.264 or H.265/HEVC). This offloads compression from the CPU.
Transmission:RootEncoder encapsulates the encoded stream into RTP packets and transmits them over the active network connection.
Decode & Render (Windows):
Decoding: The Windows client receives the RTSP stream and uses FFmpeg to decode the compressed H.264/H.265 frames into raw image data (YUV/RGB).
Output:
UI Preview: The decoded frame is rendered immediately to the application window for live monitoring.
Virtual Device: The frame is written to a ring buffer managed by the Softcam library. Softcam acts as the bridge between the user application and the system-registered DirectShow filter, allowing third-party apps (Zoom, Teams, OBS) to treat the stream as a physical webcam device.
Contributing
We actively welcome contributions! Whether you're fixing a bug, optimizing performance, or adding a cool new feature, please feel free to fork the repository and submit a Pull Request.
Repository Structure
android/: The Android Studio project (Kotlin). Handles Camera2 API capture, OpenGL processing, and RTSP streaming.
windows/: The Visual Studio solution (C++). Contains the Desktop Client GUI and the DirectShow Filter logic.
Set the configuration to Release / x64 (x86 is not supported).
Build the solution.
Testing the Driver:
The DirectShow filter (softcam.dll) must be registered to be visible to apps like OBS or Zoom.
Run install.bat as Administrator in your output directory, or manually register it via:
cmd
regsvr32 softcam.dll
Submitting a Pull Request
Fork the project.
Create your feature branch (git checkout -b feature/AmazingFeature).
Commit your changes (git commit -m 'Add some AmazingFeature').
Push to the branch (git push origin feature/AmazingFeature).
Open a Pull Request.
Troubleshooting
App Crashes / "VCRUNTIME140.dll was not found"
If the application closes immediately or you see a system popup error regarding missing DLLs (like VCRUNTIME140.dll or MSVCP140.dll), your PC is missing the C++ runtime libraries.