Skip to content
Akatsuki-comPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

MoblCam 📱→💻

Turn your Android phone into a wireless webcam — streamed over SRT directly to your PC as a virtual camera device.

How It Works

Android Phone                        PC
┌──────────────────┐                ┌──────────────────────┐
│  MoblCam App     │                │  receiver.py         │
│  (SRT Caller)    │  ──Wi-Fi/USB─► │  (SRT Listener)      │
│                  │                │  FFmpeg → pyvirtualcam│
└──────────────────┘                └──────────────────────┘
         ↕ mDNS auto-discovery (_moblcam._udp)
  1. The Android app captures video/audio and broadcasts itself via mDNS (Network Service Discovery).
  2. The PC receiver script discovers the phone automatically on the local network using Zeroconf.
  3. Video is streamed over SRT (Secure Reliable Transport) for low-latency, reliable delivery.
  4. The PC script pipes the stream through FFmpeg into a virtual camera device, making it available to any app (OBS, Zoom, Teams, etc.).

Requirements

Android App

  • Android 7.0 (API 24) or higher
  • Camera and microphone permissions
  • On the same Wi-Fi network as the PC (or connected via USB tethering)

PC Receiver


Setup & Usage

1. PC Receiver

Install dependencies:

cd pc_utility
pip install -r requirements.txt

Run the receiver:

python receiver.py

The script will search the local network for MoblCam and connect automatically once the app starts streaming.

2. Android App

Build and install the app via Android Studio, or sideload the APK.

  1. Open MoblCam on your phone.
  2. Grant Camera and Microphone permissions when prompted.
  3. Press Start Streaming.

The app will:

  • Begin broadcasting video over SRT on port 5000
  • Register itself on the local network via mDNS so the PC can find it automatically

Features

Feature Details
Protocol SRT (Secure Reliable Transport) — low-latency, loss-resilient
Auto-discovery mDNS / DNS-SD — no manual IP configuration needed
Adaptive Bitrate Adjusts encoding bitrate based on Wi-Fi signal strength
Wired support Detects USB/Ethernet connection and forces 20 Mbps
Flash toggle Enable/disable the phone torch while streaming
Zoom control In-app slider for 1×–5× zoom
Default resolution 1080p @ 30 fps
Virtual camera output Appears as a webcam in OBS, Zoom, Teams, etc.

Adaptive Bitrate Thresholds

Wi-Fi Signal (RSSI) Target Bitrate
> -50 dBm (Excellent) 15 Mbps
> -60 dBm (Good) 10 Mbps
> -70 dBm (Fair) 5 Mbps
≤ -70 dBm (Poor) 2 Mbps
Wired (USB/Ethernet) 20 Mbps

Project Structure

moblcam/
├── app/                          # Android application
│   └── src/main/
│       ├── AndroidManifest.xml
│       └── java/com/example/moblcam/
│           ├── MainActivity.kt               # App entry point
│           ├── CameraScreen.kt               # Main UI (Jetpack Compose)
│           └── network/
│               ├── StreamManager.kt          # SRT camera stream control
│               ├── NsdHelper.kt              # mDNS service registration
│               └── AdaptiveBitrateController.kt  # Wi-Fi-aware bitrate tuning
│
└── pc_utility/                   # Python PC receiver
    ├── receiver.py               # Auto-discovers phone & outputs virtual camera
    └── requirements.txt          # Python dependencies

Android Dependencies

Library Purpose
Jetpack Compose + Material 3 UI framework
CameraX Camera hardware access
RootEncoder SRT streaming engine
Accompanist Permissions Runtime permission handling

PC Dependencies

Package Purpose
zeroconf mDNS discovery to find the phone
pyvirtualcam Feed frames into a virtual camera device
opencv-python Frame processing utilities
ffmpeg (system) Decode SRT stream to raw frames

Permissions (Android)

Permission Reason
CAMERA Capture video
RECORD_AUDIO Capture audio
INTERNET Stream over the network
ACCESS_NETWORK_STATE Detect network type for ABR
ACCESS_WIFI_STATE Read Wi-Fi RSSI for ABR

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages