Skip to content

Streamberry-OBS is a professional OBS Studio plugin that automatically discovers Streamberry devices on your network and provides ultra-low latency streaming with multiple protocol support.

Notifications You must be signed in to change notification settings

StreamBerryLabs/streamberry-obs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

BerryStreamCam Logo

๐ŸŽฅ Transform Your Android Into a Pro Camera

Version License: GPL v2 OBS Studio LinuxmacOSWindows Streamberry-OBS is a professional OBS Studio plugin that automatically discovers Streamberry devices on your network and provides ultra-low latency streaming with multiple protocol support.

๐Ÿš€ Quick Start โ€ข ๐Ÿ“ฆ Download โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Feature Request


โœจ Features

๐ŸŽฏ Feature ๐Ÿ“ Description
๐Ÿ” Auto-Discovery Automatically finds Streamberry devices on your network (no manual IP entry!)
๐Ÿš€ Ultra-Low Latency WebSocket protocol provides 50-150ms latency - perfect for gaming and live streaming
๐ŸŽญ 5 Streaming Protocols Choose the best protocol for your needs - WebSocket, HTTP H.264, MJPEG, RTSP, DASH
๐ŸŽฌ Hardware Acceleration H.264 hardware decoding when available for silky smooth playback
๐Ÿ“บ 4K Support Stream in stunning 4K resolution at 30fps - perfect for high-quality content
๐Ÿ”„ Live Protocol Switching Change protocols on-the-fly without restarting OBS
๐Ÿ“ฑ Multi-Device Support Connect multiple Android devices simultaneously - perfect for multi-cam setups
๐ŸŽฏ Pause/Resume Smooth hide/show with PipeWire-style state management
๐Ÿ›ก๏ธ Stable & Safe Thread-safe operations, robust error handling, zero crashes
๐ŸŒ Cross-Platform Works seamlessly on Linux, macOS, and Windows
๐Ÿ†“ 100% Free & Open Source No subscriptions, no limitations, forever free

๐Ÿ“‹ Supported Protocols

๐ŸŽญ Protocol ๐Ÿ”Œ Port โšก Latency ๐ŸŽฏ Best For ๐ŸŒ Compatibility
โšก WebSocket 8080 50-150ms Live streaming, gaming, real-time, 4K capable โญโญโญโญโญ
๐ŸŽฌ HTTP H.264 8081 100-300ms Recording, high quality, 4K capable โญโญโญโญโญ
๐Ÿ“ธ MJPEG 8081 200-500ms Maximum compatibility โญโญโญโญโญ
๐Ÿ“น RTSP 8554 150-400ms Professional workflows, 4K lossless โญโญโญโญโญ
๐ŸŒŠ MPEG-DASH 8081 300-1000ms Adaptive bitrate streaming โญโญโญโญ

๐Ÿ’ก Pro Tip: Use WebSocket for lowest latency, RTSP for maximum compatibility and lossless 4K streaming

๐Ÿ“ฆ Installation

Choose Your Platform

Linux macOS Windows


๐Ÿง Linux

๐Ÿ”ท Arch Linux / Manjaro / Garuda

# Install dependencies
sudo pacman -S obs-studio qt6-base qt6-websockets ffmpeg curl openssl cmake gcc pkgconf

# Clone and build
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs
./build.sh

# Install plugin
sudo cp build/berrystreamcam.so /usr/lib/obs-plugins/

๐Ÿ”ถ Ubuntu / Debian

# Install dependencies
sudo apt install obs-studio libqt6-dev qt6-websockets-dev libavcodec-dev \
    libavutil-dev libswscale-dev libavformat-dev libcurl4-openssl-dev \
    libssl-dev cmake build-essential pkg-config

# Clone and build
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs
./build.sh

# Install plugin
sudo cp build/berrystreamcam.so /usr/lib/obs-plugins/

๐Ÿ”ด Fedora / RHEL

# Install dependencies
sudo dnf install obs-studio qt6-qtbase-devel qt6-qtwebsockets-devel \
    ffmpeg-devel libcurl-devel openssl-devel cmake gcc-c++ pkgconfig

# Clone and build
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs
./build.sh

# Install plugin
sudo cp build/berrystreamcam.so /usr/lib64/obs-plugins/

๐Ÿ“ฆ Flatpak (All Linux Distributions)

If you're using OBS Studio via Flatpak, use the dedicated Flatpak build:

Option 1: Using the build script (Recommended)

# Clone repository
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs

# Run Flatpak build script (handles everything automatically)
./build-flatpak.sh

Option 2: Manual Flatpak build

# Install flatpak-builder
sudo apt install flatpak-builder  # Ubuntu/Debian
# or
sudo dnf install flatpak-builder  # Fedora
# or
sudo pacman -S flatpak-builder    # Arch

# Add Flathub repository
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

# Install OBS Studio Flatpak
flatpak install flathub com.obsproject.Studio

# Build and install plugin
flatpak-builder --force-clean --install --user \
    build-flatpak \
    com.obsproject.Studio.Plugin.BerryStreamCam.json

Option 3: Install from .flatpakref (when available)

flatpak install berrystreamcam.flatpakref

Flatpak Troubleshooting:

  • โœ… Verify OBS Flatpak is installed: flatpak list | grep obs
  • โœ… Check plugin loads: flatpak run com.obsproject.Studio --verbose
  • โœ… Network permissions are automatically granted for WebSocket connections
  • โœ… Plugin location: ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/
  • โœ… View logs: journalctl --user -f | grep obs

๐ŸŽ macOS

# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install dependencies
brew install obs qt6 ffmpeg curl openssl cmake

# Clone and build
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs
./build.sh

# Install plugin
mkdir -p "$HOME/Library/Application Support/obs-studio/plugins/"
cp -r build/berrystreamcam.plugin "$HOME/Library/Application Support/obs-studio/plugins/"

๐ŸชŸ Windows

๐Ÿ“‹ Prerequisites

  1. Install Visual Studio 2022 with C++ development tools
  2. Install CMake (3.16+)
  3. Install OBS Studio (30.0+)
  4. Install Qt 6

๐Ÿ”จ Build Steps

# Clone repository
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs

# Create build directory
mkdir build
cd build

# Configure (adjust paths as needed)
cmake .. -G "Visual Studio 17 2022" -A x64 ^
    -DQt6_DIR="C:\Qt\6.5.0\msvc2019_64\lib\cmake\Qt6" ^
    -DOBS_SOURCE_DIR="C:\obs-studio" ^
    -DOBS_BUILD_DIR="C:\obs-studio\build"

# Build
cmake --build . --config Release

# Install (run as Administrator)
copy Release\berrystreamcam.dll "%ProgramFiles%\obs-studio\obs-plugins\64bit\"

๐Ÿš€ Quick Start

๐ŸŽฌ Get Started in 4 Easy Steps!

๐Ÿ“ฑ 1. Install Streamberry App on Android

Download the Streamberry app from GitHub Releases or build from source.

๐ŸŒ 2. Connect to Same Network

Ensure your Android device and computer are on the same WiFi network or subnet.

๐ŸŽฅ 3. Start Streaming in OBS

  1. ๐Ÿš€ Open OBS Studio
  2. โž• Add Source: Click + in the Sources panel
  3. ๐ŸŽฌ Select "BerryStreamCam"
  4. ๐Ÿ” Wait for Discovery: Plugin automatically scans for devices (5-10 seconds)
  5. ๐Ÿ“ฑ Select Your Device: Choose from the dropdown list
  6. โšก Choose Protocol: Select "WebSocket" for lowest latency
  7. โœ… Click OK: Stream starts automatically!

๐Ÿ”ง 4. Troubleshooting

โŒ Device Not Found?
  • โœ… Check both devices are on same network
  • โœ… Verify Streamberry app is running
  • โœ… Try manual IP: Enter IP address in the "Manual IP" field
  • โœ… Check firewall: Allow ports 8080, 8081, 8554
  • โœ… Disable VPN on either device
  • โœ… Restart your router if necessary
๐ŸŽฌ No Video Displayed?
  • โœ… Check Android app shows "Connected" status
  • โœ… Try different protocol (switch to HTTP H.264)
  • โœ… Restart OBS Studio
  • โœ… Check OBS logs: Help โ†’ Log Files โ†’ Current Log
  • โœ… Verify camera permissions in Android app
  • โœ… Try hiding and showing the source
โšก High Latency?
  • โœ… Switch to WebSocket protocol
  • โœ… Use 5GHz WiFi instead of 2.4GHz
  • โœ… Reduce resolution in Android app (720p recommended)
  • โœ… Move closer to WiFi router
  • โœ… Close bandwidth-heavy applications
  • โœ… Use Quality of Service (QoS) on router

๐ŸŽ›๏ธ Configuration

Properties Panel

  • Connection Type: Auto-Discovery or Manual IP
  • Device: List of discovered Streamberry devices
  • Manual IP Address: Enter IP when auto-discovery fails
  • Protocol: Select streaming protocol
  • Refresh Devices: Manually trigger device scan

Network Requirements

Requirement Details
Network Same local network/subnet
Ports 8080 (WebSocket), 8081 (HTTP), 8554 (RTSP)
Bandwidth 5-10 Mbps for 1080p@30fps, 20-30 Mbps for 4K@30fps
WiFi 5GHz required for 4K, 5GHz recommended for 1080p, 2.4GHz for 720p
Firewall Allow inbound on required ports

Performance Tips

For Lowest Latency (50-150ms):

  • โœ… Use WebSocket protocol
  • โœ… 720p @ 30fps
  • โœ… 5GHz WiFi
  • โœ… Close to router

For Best Quality:

  • โœ… Use HTTP H.264 protocol
  • โœ… 1080p @ 60fps or 4K @ 30fps
  • โœ… Wired ethernet on PC
  • โœ… 5GHz WiFi or wired ethernet for phone
  • โœ… Hardware encoding on Android device

For Stunning 4K Streaming:

  • โœ… Use HTTP H.264 or WebSocket protocol
  • โœ… 4K (3840x2160) @ 30fps
  • โœ… Gigabit ethernet on both devices (recommended)
  • โœ… High-end Android device with hardware H.264 encoder
  • โœ… Minimum 20-30 Mbps bandwidth
  • โœ… Hardware decoding on PC (GPU acceleration)

For Maximum Compatibility:

  • โœ… Use RTSP protocol
  • โœ… 720p to 4K @ 30fps (RTSP supports lossless 4K streaming)
  • โœ… Any network type
  • โœ… Industry-standard protocol
  • โœ… Compatible with all professional video software

For Lossless 4K Professional Streaming:

  • โœ… Use RTSP protocol
  • โœ… 4K (3840x2160) @ 30fps lossless
  • โœ… Wired Gigabit ethernet (required for 4K)
  • โœ… Professional-grade Android device
  • โœ… 30-50 Mbps bandwidth for 4K lossless
  • โœ… Industry-standard streaming protocol
  • โœ… Perfect for professional broadcasting and production

๐Ÿ› ๏ธ Development

Building from Source

# Install dependencies (see platform-specific instructions above)

# Clone repository
git clone https://github.com/StreamBerryLabs/streamberry-obs.git
cd streamberry-obs

# Build
./build.sh

# The plugin will be in build/berrystreamcam.so (Linux/macOS)
# or build/Release/berrystreamcam.dll (Windows)

๐Ÿ—๏ธ Architecture

System Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         OBS Studio                                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                    BerryStreamCam Plugin                       โ”‚  โ”‚
โ”‚  โ”‚                                                                 โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  Source Core   โ”‚      โ”‚      Device Discovery           โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚                โ”‚      โ”‚                                 โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Properties  โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”ค  - mDNS Scanner                โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Rendering   โ”‚      โ”‚  - Port Probing (8080/81/54)   โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Threading   โ”‚      โ”‚  - Auto-refresh (5s)           โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  โ”‚
โ”‚  โ”‚          โ”‚                                                     โ”‚  โ”‚
โ”‚  โ”‚          โ”‚                                                     โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚  โ”‚
โ”‚  โ”‚  โ”‚              Protocol Handlers                            โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚                                                            โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  WebSocket    โ”‚  โ”‚     RTSP     โ”‚  โ”‚     HTTP      โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  Handler      โ”‚  โ”‚   Handler    โ”‚  โ”‚   Handler     โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚               โ”‚  โ”‚              โ”‚  โ”‚               โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  Port: 8080   โ”‚  โ”‚  Port: 8554  โ”‚  โ”‚  Port: 8081   โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  Protocol:    โ”‚  โ”‚  Protocol:   โ”‚  โ”‚  Protocols:   โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  - JSON msgs  โ”‚  โ”‚  - RTSP/RTP  โ”‚  โ”‚  - Raw H.264  โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  - Base64     โ”‚  โ”‚  - NAL units โ”‚  โ”‚  - MJPEG      โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  - H.264      โ”‚  โ”‚  - SDP       โ”‚  โ”‚  - DASH       โ”‚ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚  โ”‚
โ”‚  โ”‚             โ”‚                  โ”‚                  โ”‚           โ”‚  โ”‚
โ”‚  โ”‚             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚  โ”‚
โ”‚  โ”‚                                โ”‚                              โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚              H.264 Decoder (FFmpeg)                     โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚                                                          โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Decodes H.264 NAL units                             โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - YUV โ†’ RGBA conversion                               โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Hardware acceleration                               โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Low-latency mode                                    โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  โ”‚
โ”‚  โ”‚                            โ”‚                                   โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚  โ”‚
โ”‚  โ”‚  โ”‚              GPU Texture Upload                          โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚                                                           โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Create/update OBS texture                            โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Direct GPU memory                                    โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Minimal CPU usage                                    โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚  โ”‚
โ”‚  โ”‚                                                                 โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚  โ”‚
โ”‚  โ”‚  โ”‚              User Interface (Qt)                          โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚                                                            โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Device list widget                                    โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Protocol selection                                    โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Connection status                                     โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  - Refresh button                                        โ”‚ โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                                    โ”‚
                              WiFi Network
                                    โ”‚

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Streamberry Android App                         โ”‚
โ”‚                                                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚                    Streaming Servers                             โ”‚โ”‚
โ”‚  โ”‚                                                                   โ”‚โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚โ”‚
โ”‚  โ”‚  โ”‚  OBS Droid      โ”‚  โ”‚  RTSP Server โ”‚  โ”‚   HTTP Server     โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚  WebSocket      โ”‚  โ”‚              โ”‚  โ”‚                   โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚  Server         โ”‚  โ”‚  - RTP/RTCP  โ”‚  โ”‚  - DASH           โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚                 โ”‚  โ”‚  - SDP       โ”‚  โ”‚  - MJPEG          โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚  Port: 8080     โ”‚  โ”‚              โ”‚  โ”‚  - Raw H.264      โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚                 โ”‚  โ”‚  Port: 8554  โ”‚  โ”‚  - Player UI      โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚  /stream        โ”‚  โ”‚              โ”‚  โ”‚                   โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ”‚  /health        โ”‚  โ”‚  /stream     โ”‚  โ”‚  Port: 8081       โ”‚  โ”‚โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ”‚                                                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚                      mDNS Service                                โ”‚โ”‚
โ”‚  โ”‚                                                                   โ”‚โ”‚
โ”‚  โ”‚  Service Name: Streamberry-{IP}                                 โ”‚โ”‚
โ”‚  โ”‚  Service Type: _streamberry._tcp.local                          โ”‚โ”‚
โ”‚  โ”‚  Published Port: 8080                                            โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ”‚                                                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚                   Video Encoding Pipeline                        โ”‚โ”‚
โ”‚  โ”‚                                                                   โ”‚โ”‚
โ”‚  โ”‚  Camera โ†’ Encoder โ†’ H.264 NAL Units โ†’ Servers                   โ”‚โ”‚
โ”‚  โ”‚                                                                   โ”‚โ”‚
โ”‚  โ”‚  - MediaCodec H.264                                              โ”‚โ”‚
โ”‚  โ”‚  - SPS/PPS extraction                                            โ”‚โ”‚
โ”‚  โ”‚  - Annex-B format                                                โ”‚โ”‚
โ”‚  โ”‚  - Real-time encoding                                            โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ“Š Data Flow Diagrams

WebSocket Protocol (Recommended)

Android App                          OBS Plugin
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                        โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

1. Start Server
   (Port 8080) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Discover via mDNS
                                      Probe /health endpoint

2. Client Connect โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ WebSocket connect to
   Send Hello msg โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ /stream endpoint
                                      Parse capabilities

3. Encode Frame
   (H.264 NAL)
   โ†“
   Convert to Annex-B
   โ†“
   Base64 encode
   โ†“
   Wrap in JSON
   {
     "type": "video_frame",
     "pts": 123456,
     "keyframe": true,
     "data": "..."
   } โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Parse JSON
                                       Decode base64
                                       Extract H.264
                                       โ†“
                                       H.264 Decoder
                                       โ†“
                                       YUV โ†’ RGBA
                                       โ†“
                                       GPU Texture
                                       โ†“
                                       OBS Render

4. Stats/Metadata โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Request stats (optional)

Threading Model

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    OBS Main Thread                           โ”‚
โ”‚                                                               โ”‚
โ”‚  - GUI events                                                โ”‚
โ”‚  - Rendering                                                 โ”‚
โ”‚  - Texture updates                                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€๏ฟฝ๏ฟฝโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ”‚ spawn
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Discovery Thread                            โ”‚
โ”‚                                                               โ”‚
โ”‚  while (active) {                                           โ”‚
โ”‚    scan_network();    // mDNS + port probing               โ”‚
โ”‚    update_device_list();                                    โ”‚
โ”‚    sleep(5s);                                               โ”‚
โ”‚  }                                                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                  User clicks "Connect"
                            โ”‚
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Streaming Thread                            โ”‚
โ”‚                                                               โ”‚
โ”‚  connect_to_device(protocol);                               โ”‚
โ”‚  while (streaming) {                                        โ”‚
โ”‚    frame = receive_frame();  // From protocol handler      โ”‚
โ”‚    decode(frame);             // H.264 decoder              โ”‚
โ”‚    push_to_queue(rgba_data);  // Thread-safe queue         โ”‚
โ”‚  }                                                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ”‚ Frame Queue
                            โ”‚ (Thread-safe)
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              OBS Rendering (Main Thread)                     โ”‚
โ”‚                                                               โ”‚
โ”‚  frame = pop_from_queue();                                  โ”‚
โ”‚  upload_to_gpu_texture(frame);                              โ”‚
โ”‚  render_texture();                                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Project Structure

streamberry-obs/
โ”œโ”€โ”€ CMakeLists.txt              # Build configuration
โ”œโ”€โ”€ build.sh                    # Build script
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ plugin-main.cpp         # OBS plugin registration
โ”‚   โ”œโ”€โ”€ berrystreamcam-source.* # Main source implementation
โ”‚   โ”œโ”€โ”€ common.hpp              # Shared types and constants
โ”‚   โ”œโ”€โ”€ discovery/              # Auto-discovery system
โ”‚   โ”‚   โ”œโ”€โ”€ device-discovery.*  # Network scanning
โ”‚   โ”‚   โ””โ”€โ”€ mdns-scanner.*      # mDNS/Bonjour
โ”‚   โ”œโ”€โ”€ protocols/              # Protocol handlers
โ”‚   โ”‚   โ”œโ”€โ”€ websocket-handler.* # WebSocket (Port 8080)
โ”‚   โ”‚   โ”œโ”€โ”€ http-handler.*      # HTTP (Port 8081)
โ”‚   โ”‚   โ””โ”€โ”€ rtsp-handler.*      # RTSP (Port 8554)
โ”‚   โ”œโ”€โ”€ decoder/                # Video decoding
โ”‚   โ”‚   โ””โ”€โ”€ h264-decoder.*      # H.264/MJPEG decoder
โ”‚   โ””โ”€โ”€ ui/                     # User interface
โ”‚       โ””โ”€โ”€ device-list-widget.* # Device selection UI
โ””โ”€โ”€ docs/                       # Documentation

Adding New Features

1. Add New Protocol:

// 1. Add to ProtocolType enum in common.hpp
enum class ProtocolType {
    // ... existing
    MY_NEW_PROTOCOL,
};

// 2. Create handler in src/protocols/
class MyProtocolHandler {
    bool connect(const std::string& url);
    void disconnect();
    bool receive_frame(VideoFrame& frame);
};

// 3. Update device-discovery.cpp to detect protocol
// 4. Update UI in device-list-widget.cpp

2. Improve Auto-Discovery:

// Modify src/discovery/device-discovery.cpp
// Add new scanning methods or improve existing ones

Running Tests

# Build with tests enabled
mkdir -p build && cd build
cmake .. -DENABLE_TESTS=ON
make

# Run tests
ctest --output-on-failure

๐Ÿ“š API Documentation

Device Discovery

// Scan network for devices (runs every 5 seconds)
std::vector<StreamDevice> devices = discovery_->scan_network();

// Check specific device
StreamDevice device;
bool found = discovery_->probe_device("192.168.1.100", device);

Protocol Handlers

// WebSocket Handler
WebSocketHandler ws;
ws.connect_to_server("ws://192.168.1.100:8080/stream");
VideoFrame frame;
if (ws.receive_frame(frame)) {
    // Process frame
}
ws.disconnect_from_server();

// HTTP Handler
HttpHandler http;
http.connect("http://192.168.1.100:8081/stream.h264", ProtocolType::HTTP_RAW_H264);
if (http.receive_frame(frame)) {
    // Process frame
}
http.disconnect();

H.264 Decoder

H264Decoder decoder;
decoder.initialize();

uint8_t* decoded_data;
int width, height;
if (decoder.decode_frame(encoded_data, encoded_size, &decoded_data, &width, &height)) {
    // decoded_data contains RGBA pixels
}

decoder.shutdown();

๐Ÿ“Š Performance Comparison

BerryStreamCam vs Competitors

Feature BerryStreamCam DroidCam IP Webcam Others
๐Ÿ” Auto-Discovery โœ… โŒ โŒ โŒ
โšก Ultra-Low Latency โœ… (50ms) โš ๏ธ (200ms+) โš ๏ธ (300ms+) โš ๏ธ (500ms+)
๐ŸŽญ Multiple Protocols โœ… (5) โš ๏ธ (2) โš ๏ธ (3) โš ๏ธ (1-2)
๐Ÿ“ฑ Multi-Device โœ… โŒ โš ๏ธ Limited โŒ
๐Ÿ”„ Live Switching โœ… โŒ โŒ โŒ
๐Ÿ†“ Free & Open Source โœ… โš ๏ธ Limited โš ๏ธ Freemium โŒ
๐ŸŽฌ Hardware Decoding โœ… โš ๏ธ Limited โŒ โš ๏ธ Limited
๐ŸŒ Cross-Platform โœ… โš ๏ธ Limited โš ๏ธ Limited โš ๏ธ Limited
๐Ÿ’ช Active Development โœ… โš ๏ธ โš ๏ธ โš ๏ธ

Legend: โœ… Fully Supported | โš ๏ธ Partially/Limited | โŒ Not Available


๐ŸŽฌ Screenshots

Plugin in Action


๐Ÿ”ฎ Roadmap & Future Updates

Version 1.1.0 (Planned)

  • Enhanced Auto-Discovery

    • mDNS/Bonjour service discovery (Linux: Avahi, macOS: native, Windows: DNS-SD)
    • QR code scanning for instant connection
    • Bluetooth Low Energy (BLE) discovery
    • USB connection support (ADB)
    • Remember previously connected devices
  • Audio Streaming

    • Audio capture from Android microphone
    • Audio sync with video
    • Multiple audio sources (mic, system audio)
    • Audio monitoring in OBS
  • Advanced Features

    • PTZ (Pan-Tilt-Zoom) controls via touch gestures
    • Multiple camera support (front/back switching)
    • Custom resolution/bitrate selection
    • Recording directly on Android device
    • Overlay graphics (OSD) on Android

Version 1.2.0 (Future)

  • Performance

    • Hardware encoding on Android (MediaCodec)
    • Zero-copy memory transfers
    • Multi-threaded decoding
    • Adaptive bitrate streaming
    • Network bandwidth optimization
  • Professional Features

    • NDI protocol support
    • SRT (Secure Reliable Transport)
    • Virtual camera passthrough
    • Multi-camera sync
    • Timecode synchronization
  • User Experience

    • One-click pairing
    • Connection presets
    • Custom overlays
    • Stream health monitoring
    • Automatic reconnection

Version 2.0.0 (Long-term)

  • Platform Expansion

    • iOS support (iPhone/iPad)
    • Linux phone support
    • Raspberry Pi camera support
    • Web browser source (WebRTC)
  • Cloud Features

    • Remote device access (over internet)
    • Cloud device registry
    • Share device with team members
    • Remote monitoring dashboard

๐Ÿ› ๏ธ Tech Stack

Built With Cutting-Edge Technologies

C++
C++17
Qt
Qt 6
OBS
OBS Studio
FFmpeg
FFmpeg
CMake
CMake
libcurl
libcurl
OpenSSL
OpenSSL
Linux
Linux
macOS
macOS
Windows
Windows

Core Technologies:

  • ๐Ÿ”ท C++17 - Modern C++ with RAII and smart pointers
  • ๐Ÿ”ท Qt 6 - Cross-platform framework for networking and UI
  • ๐Ÿ”ท FFmpeg - Industry-standard multimedia framework
  • ๐Ÿ”ท CMake - Cross-platform build system
  • ๐Ÿ”ท WebSockets - Real-time bidirectional communication
  • ๐Ÿ”ท RTSP/RTP - Standard streaming protocols
  • ๐Ÿ”ท H.264 - Industry-standard video codec

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow C++17 standards
  • Use RAII for resource management
  • Add error handling with try-catch
  • Document public APIs with comments
  • Test on multiple platforms
  • Update README for new features

โ“ Frequently Asked Questions (FAQ)

๐Ÿ’ฐ Is BerryStreamCam really free?
Yes! BerryStreamCam is 100% free and open source under GPL-2.0 license. No hidden costs, no subscriptions, no premium features. Forever free!
๐Ÿ“ฑ Which Android versions are supported?
The Streamberry Android app supports Android 7.0 (Nougat) and above. The plugin works with any device running the Streamberry app.
๐ŸŽฅ Can I use multiple cameras at once?
Absolutely! You can add multiple BerryStreamCam sources in OBS, each connected to a different Android device. Perfect for multi-cam productions!
๐ŸŒ Does it work over the internet?
Currently, BerryStreamCam requires both devices to be on the same local network. Internet streaming is planned for v2.0 using secure tunneling.
โšก Which protocol should I use?
  • WebSocket: Best for live streaming, gaming, real-time (50-150ms latency)
  • HTTP H.264: Best for recording, high quality (100-300ms latency)
  • RTSP: Best for professional workflows, OBS scenes (150-400ms latency)
  • MJPEG: Best for maximum compatibility (200-500ms latency)
๐Ÿ”’ Is it secure?
BerryStreamCam operates on your local network only. All communication happens directly between your devices without any cloud servers or third-party services.
๐ŸŽค Does it support audio?
Audio streaming is planned for v1.1.0. Currently, only video is supported. You can use OBS's audio input capture as a workaround.
๐Ÿง Which Linux distros are supported?
BerryStreamCam works on all major Linux distributions including:
  • Arch Linux / Manjaro / Garuda
  • Ubuntu / Debian / Linux Mint
  • Fedora / RHEL / CentOS Stream
  • openSUSE
  • Gentoo
  • And many more!
๐Ÿ’ป What are the system requirements?

Minimum:

  • OBS Studio 30.0+
  • 4GB RAM
  • Dual-core CPU
  • WiFi or Ethernet connection

Recommended (1080p):

  • OBS Studio 30.2+
  • 8GB RAM
  • Quad-core CPU with hardware H.264 decoding
  • 5GHz WiFi or Gigabit Ethernet

For 4K Streaming:

  • OBS Studio 30.2+
  • 16GB RAM
  • Hexa-core CPU or hardware H.264 decoder
  • Gigabit Ethernet (recommended) or WiFi 6
  • High-end Android device (Snapdragon 8 Gen 2+ or equivalent)
๐Ÿ”„ How do I update the plugin?
  1. Download the latest release from GitHub
  2. Stop OBS Studio
  3. Replace the old plugin file with the new one
  4. Restart OBS Studio

Or rebuild from source using ./build.sh for the latest development version.


๐Ÿ“„ License

This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.

๐Ÿ™ Credits

๐Ÿ“ž Support

๐Ÿ“ˆ Statistics

  • Lines of Code: ~5,000+
  • Files: 19 source files
  • Protocols Supported: 5
  • Max Resolution: 4K (3840x2160) @ 30fps
  • Platforms: Linux, macOS, Windows
  • Languages: C++ (95%), CMake (5%)

๐ŸŽ‰ Success Stories

"BerryStreamCam works flawlessly! Latency is incredibly low, and setup was a breeze." - User

"Finally, a DroidCam alternative that's open source and actually works better!" - Streamer

"The auto-discovery feature is amazing. No more typing IP addresses!" - Content Creator

"Streaming in 4K at 30fps with barely any latency - this is next level! My production quality has gone through the roof!" - Professional Streamer

"I use 3 phones in 4K mode for my cooking channel. The multi-device support is incredible!" - Content Creator



๐Ÿ’– Made with Love & Code

Swadhin Biswas
Swadhin Biswas

๐Ÿ’ป ๐ŸŽจ ๐Ÿ“– ๐Ÿค”

Creator & Lead Developer

GitHub Twitter LinkedIn Portfolio


โญ Show Your Support

If you found BerryStreamCam useful, please consider:

Star on GitHub Fork on GitHub Watch on GitHub

โญ Star this repo โ€ข ๐Ÿด Fork it โ€ข ๐Ÿ“ข Share with others


Built with ๐ŸŽฅ Camera Tech โ€ข โšก Real-time Streaming โ€ข ๐Ÿ” Open Source Spirit

ยฉ 2025 Swadhin Biswas. Licensed under GPL-2.0

โฌ† Back to top

About

Streamberry-OBS is a professional OBS Studio plugin that automatically discovers Streamberry devices on your network and provides ultra-low latency streaming with multiple protocol support.

Resources

Stars

Watchers

Forks

Releases

No releases published