A comprehensive educational live streaming platform designed for remote and hybrid learning environments, featuring real-time video streaming, interactive dashboards, and extensive monitoring capabilities.
- FastAPI Backend: RESTful API for authentication, classroom management, and stream coordination
- NGINX RTMP Server: Handles incoming RTMP streams and HLS conversion
- FFmpeg Workers: Process video streams and handle format conversion
- React Dashboard: Modern web interface for stream management and monitoring
- Monitoring Stack: Comprehensive system monitoring with Prometheus and Grafana
- Classroom Agent: Manages video capture and streaming
- FFmpeg Client: Handles local video encoding and RTMP streaming
# Single command setup
sudo ./setup_server.sh# Single command setup
sudo ./setup_classroom.sh- Ubuntu 20.04 or later
- Minimum 4GB RAM
- 50GB storage
- Open ports:
- 1935 (RTMP Ingest)
- 8080 (HLS Streaming)
- 5000 (FastAPI)
- 3000 (Dashboard)
- 9090 (Prometheus)
- 3001 (Grafana)
- Ubuntu 20.04 or later
- USB webcam or capture device
- Stable network connection
- FFmpeg and Python 3.8+
- Clone the repository:
git clone https://github.com/yourusername/streaming-platform.git
cd streaming-platform- Run the setup script:
sudo ./setup_server.shThe setup script will:
- Install and configure UFW firewall
- Install Docker and Docker Compose
- Set up all required services
- Configure network interfaces
- Start the monitoring stack
- Clone the repository:
git clone https://github.com/yourusername/streaming-platform.git
cd streaming-platform- Run the setup script:
sudo ./setup_classroom.shThe setup script will:
- Validate server connectivity
- Install required dependencies
- Configure video devices
- Set up the streaming agent
- Verify the connection
-
.env: Environment variablesPOSTGRES_USER=streaming_user POSTGRES_PASSWORD=secure_password POSTGRES_DB=streaming_platform REDIS_HOST=redis SECRET_KEY=your_secret_key
-
docker-compose.yml: Service configuration# Configure service resources api: deploy: resources: limits: cpus: "1" memory: 1G
-
nginx.conf: NGINX settings# Configure HLS segment duration hls_fragment 4s; hls_playlist_length 60s;
.env: Device settingsVIDEO_DEVICE=/dev/video0 AUDIO_DEVICE=hw:0,0 STREAM_QUALITY=high
-
RTMP Connection Fails
# Check NGINX RTMP port netstat -an | grep 1935 # Check NGINX logs docker-compose logs nginx
-
Video Device Issues
# List video devices v4l2-ctl --list-devices # Test video capture ffmpeg -f v4l2 -i /dev/video0 -t 5 test.mp4
-
Docker Issues
# Restart services docker-compose down docker-compose up -d # Check logs docker-compose logs --tail=100
-
Dashboard Access
# Check if service is running docker-compose ps dashboard # Check logs docker-compose logs dashboard
-
Access Points
- Dashboard:
http://server-ip:3000 - API Docs:
http://server-ip:5000/docs - Grafana:
http://server-ip:3001 - Prometheus:
http://server-ip:9090
- Dashboard:
-
Key Metrics
- Stream Health
- Network Bandwidth
- System Resources
- Error Rates
-
Log Access
# API logs docker-compose logs api # NGINX logs docker-compose logs nginx # Classroom agent logs journalctl -u classroom-agent
-
Network Security
- Keep firewall rules minimal
- Use SSL/TLS in production
- Regularly update passwords
-
System Security
- Regular security updates
- Monitor system logs
- Implement authentication
-
Data Security
- Regular backups
- Encrypted storage
- Access control
MIT License - see LICENSE file for details
For issues and support:
- Check the troubleshooting guide
- Search existing issues
- Create a new issue with:
- System details
- Error logs
- Steps to reproduce