Eaglearn now supports professional live capture and streaming capabilities for:
- Live streaming to platforms (YouTube, Twitch, etc.)
- WebRTC applications for web browsers
- RTMP streaming to media servers
- High-performance capture with multiple backend support
Add to your config.yaml:
camera:
use_live_capture: true # Enable live capture service
backend: auto # Auto-detect best backendOr use directly in code:
from live_capture_service import LiveCaptureService
# Initialize live capture
live = LiveCaptureService()
# Start with auto backend detection
live.start_capture('auto')| Backend | Description | Use Case |
|---|---|---|
rtmp |
RTMP streaming to media servers (requires FFmpeg) | Professional streaming |
webrtc |
WebRTC for web browsers (requires aiortc) | Web applications |
directshow |
DirectShow for Windows (low latency) | Windows desktop |
v4l2 |
Video4Linux2 for Linux (good performance) | Linux desktop |
dshow |
Default OpenCV fallback | Cross-platform |
# Configure RTMP in live_capture_service.py
# Then start with:
live.start_capture('rtmp')# WebRTC implementation included
live.start_capture('webrtc')# Auto-detects optimal backend
live.start_capture('auto')- Multi-backend support: Automatic fallback if backend fails
- Low latency: Optimized for real-time applications
- High resolution: Support up to 4K streaming
- Frame buffering: Configurable buffer size (default: 30 frames)
- Client management: Multiple concurrent streaming clients
- Stream info: Real-time backend, resolution, FPS, client count
The live capture service integrates seamlessly with existing Eaglearn features:
- VLM analysis works with live capture frames
- Focus tracking and emotion detection
- All existing metrics and analytics
- Enhanced UI shows live capture status
# For RTMP streaming
pip install ffmpeg-python
# For WebRTC streaming
pip install aiortc
# Core requirements (already in requirements.txt)
opencv-python, numpy, transformers, torchAll live capture settings are configurable in config.yaml:
- Backend selection
- Resolution and FPS
- Frame buffering
- Auto-detection preferences
Optimized for:
- Low CPU usage (selective frame processing)
- Memory efficiency (smart buffering)
- Network performance (adaptive quality)
- Real-time responsiveness (< 50ms latency)
Use live capture for professional streaming, remote monitoring, or web-based applications!