Version 1.5
A desktop application for streaming RTSP video from 3D printer cameras and monitoring printer status in real-time.
Contact: [email protected]
GitHub: https://github.com/OverjoyedFrankenstein/Streamy
tl;dr: Python based RTSP video streaming app, with the conversion to a macOS app.
To run: python main.py
To convert: python build_app.py, wait for it to complete, then run Streamy.app
- Overview
- Features
- Project Structure
- Requirements
- Installation
- Usage
- Configuration
- File Descriptions
- Technical Specifications
- Data Structures
- Network Protocol
- Troubleshooting
Streamy is a comprehensive PyQt5-based desktop application designed to monitor Elegoo 3D resin printers. It combines real-time video streaming with advanced printer status monitoring, providing a complete solution for remote 3D printer management.
- Live RTSP video streaming from printer's built-in camera at ~30 FPS
- Real-time print monitoring including progress, layers, and time remaining
- Snapshot capture with optional timestamps
- Automatic printer discovery on local network via UDP broadcast
- Custom printer naming for managing multiple printers
- Configurable RTSP settings (transport, path, port)
- Auto-connect on startup for seamless monitoring
- Elegoo resin 3D printers with network connectivity (Mars, Saturn series)
- Any RTSP-compatible camera (port 554)
- Uses SDCP (Smart Device Communication Protocol) for Elegoo printer communication
- RTSP video streaming at ~30 FPS with frame buffering
- UDP and TCP transport protocols (configurable)
- Customizable RTSP settings (path, port)
- Video enable/disable toggle (monitoring continues when video is paused)
- Real-time timestamp overlay on video feed
- Live FPS counter (toggleable)
- Frame buffering for stability
- Print progress percentage (calculated from layers)
- Layer information: Current layer / Total layers / Remaining layers
- Time tracking: Total print time and remaining time
- Print job status: Idle, Preparing, Printing, Finishing
- Task/file name display
- UV temperature monitoring
- 1-second status update interval for real-time feedback
- Large progress percentage display (toggleable)
- Save current frame as JPG to custom location
- Optional timestamp overlay on snapshots
- Custom save path configuration
- Filename format:
printer_snapshot_YYYYMMDD_HHMMSS.jpg
- Automatic UDP broadcast discovery on port 3000
- Discovery message protocol:
M99999 - Fallback to direct IP connection if discovery fails
- WebSocket communication on port 3030 for status updates
- Custom printer naming for managing multiple printers
- Recent printers dropdown (up to 5)
- Transport protocol selector (UDP/TCP)
- RTSP path and port customization
- Connect/Disconnect controls
- Settings dialog with comprehensive configuration options
- Color-coded status indicator:
- Red: Error/Disconnected
- Yellow: Connecting/Warning
- Green: Connected
- Gray: Idle
- Responsive layout with minimum window size: 800x600
- Video display: minimum 640x480, scales to fit
- Enter in IP field: Connect to printer
- Auto-connect on startup option
- Custom printer display names
- Screenshot save path configuration
- Toggle timestamp on screenshots
- Toggle large progress display
- Toggle FPS counter
- Persistent settings saved in JSON config file
Streamy/
├── main.py # Main PyQt5 application (primary interface)
├── vidstream.py # RTSP video streaming module
├── stats.py # Printer monitoring module (also standalone Tkinter GUI)
├── build_app.py # PyInstaller build script for macOS app
├── streamy_config.json # User configuration file (auto-generated)
├── icon.png # Application icon (optional)
├── README.md # This file
└── build_app/ # Build directory (created by build_app.py)
└── dist/ # Distribution directory
└── Streamy-v1.5.app # macOS application bundle
- Python: 3.7 or higher
- Operating System: macOS, Windows, or Linux
- Network: Local network access to printer
- Disk Space: ~500 MB for app build (optional)
All dependencies are automatically installed on first run:
| Package | Version | Purpose |
|---|---|---|
opencv-python |
Latest | Video capture and image processing |
numpy |
Latest | Image manipulation |
PyQt5 |
Latest | GUI framework |
websocket-client |
Latest | WebSocket communication with printer |
requests |
Latest | HTTP requests |
For building the standalone macOS app:
| Package | Purpose |
|---|---|
pyinstaller |
Create standalone application bundles |
-
Clone or download the repository:
git clone https://github.com/OverjoyedFrankenstein/Streamy.git cd Streamy -
Run the application:
python main.py
Dependencies will be automatically installed on first run.
-
Manual dependency installation (if needed):
pip install opencv-python numpy PyQt5 websocket-client requests
-
Launch the application:
python main.py
-
First-time setup:
- Click the Settings ⚙ button (bottom right)
- Enter your printer's IP address
- Configure RTSP settings if needed (defaults work for most Elegoo printers)
- Optionally set a custom printer name
- Click Save Settings
-
Connect to printer:
- Click Connect button
- Application will automatically:
- Connect to RTSP video stream
- Discover printer via UDP broadcast
- Establish WebSocket connection for status updates
- Begin streaming video and monitoring print status
-
Monitor your print:
- View live video stream from printer camera
- Monitor progress, layers, and time remaining
- Take snapshots with the Snapshot button
- Toggle video on/off with Disable Video button (monitoring continues)
-
Disconnect:
- Click Disconnect when finished
For a simpler, text-based interface with logging capabilities:
python stats.pyFeatures of the alternative GUI:
- Tabbed layout (Status/Logs)
- Progress bar visualization
- Log file management with rotation
- Text-based status display
To create a standalone macOS application bundle that can run without Python installed:
-
Install PyInstaller (if not already installed):
pip install pyinstaller
-
Run the build script:
python build_app.py
-
Locate the built application:
- The app will be created at:
build_app/dist/Streamy-v1.5.app - Build process includes:
- Code signing (removes quarantine attributes)
- Icon embedding
- Dependency bundling
- macOS compatibility fixes
- The app will be created at:
-
Run the application:
- Double-click
Streamy-v1.5.appin Finder - Or from terminal:
open build_app/dist/Streamy-v1.5.app
- Double-click
-
Install the application (optional):
- Drag
Streamy-v1.5.appto your Applications folder - Launch from Spotlight or Applications folder
- Drag
The build_app.py script performs the following:
- Creates PyInstaller spec file with all dependencies
- Bundles Python interpreter and all libraries
- Includes icon (if
icon.pngexists) - Removes quarantine attributes for macOS
- Code signs the application
- Creates one-folder bundle in
build_app/dist/
Note: The built application is ~200-500 MB due to bundled Python environment and dependencies.
python main.py [OPTIONS]| Argument | Description | Example |
|---|---|---|
--ip <ADDRESS> |
IP address of printer (overrides auto-connect) | --ip 192.168.1.100 |
Examples:
# Connect to specific printer on startup
python main.py --ip 192.168.1.100
# Launch with default settings
python main.pySettings are automatically saved in streamy_config.json in the application directory:
{
"recent_printers": ["192.168.1.100", "192.168.1.101"],
"last_used_printer": "192.168.1.100",
"include_timestamp": true,
"video_enabled": true,
"auto_connect": true,
"transport": "udp",
"rtsp_path": "/video",
"rtsp_port": 554,
"printer_display_name": "My Mars 3",
"screenshot_path": "/Users/username/Desktop",
"show_big_progress": true,
"show_fps": true
}| Option | Type | Default | Description |
|---|---|---|---|
recent_printers |
array | [] |
List of up to 5 recent printer IPs |
last_used_printer |
string | "" |
Last connected printer IP |
include_timestamp |
boolean | true |
Add timestamp to snapshots |
video_enabled |
boolean | true |
Enable video streaming |
auto_connect |
boolean | true |
Auto-connect on startup |
transport |
string | "udp" |
RTSP transport: "udp" or "tcp" |
rtsp_path |
string | "/video" |
RTSP stream path |
rtsp_port |
number | 554 |
RTSP port number |
printer_display_name |
string | "" |
Custom name for printer |
screenshot_path |
string | "~/Desktop" |
Directory for saving snapshots |
show_big_progress |
boolean | true |
Show large progress percentage |
show_fps |
boolean | true |
Show FPS counter |
All settings can be configured through the Settings ⚙ dialog in the application.
The main entry point and GUI application built with PyQt5.
Key Components:
StreamyApp: Main application window class- Integrates video streaming and printer monitoring
- Manages UI updates and user interactions
- Handles connection/disconnection logic
- Updates status indicators and labels
Config: Configuration management class- Loads/saves settings from/to JSON file
- Manages recent printers list
- Handles all user preferences
StatusIndicator: Custom colored status dot widgetSettingsDialog: Settings and About dialog
Features:
- Real-time video display with OpenCV → Qt conversion
- Asynchronous printer connection
- FPS calculation and display
- Snapshot capture functionality
- Auto-connect on startup
- Comprehensive settings management
Usage:
python main.py [--ip IP_ADDRESS]Handles all RTSP video streaming functionality.
Key Components:
VideoStreamer: Main video streaming class- Connects to RTSP streams using OpenCV
- Manages frame capture and buffering
- Handles transport protocol (UDP/TCP)
- Creates placeholder images
Features:
- RTSP connection with configurable transport
- Frame capture with error handling
- Timestamp overlay on frames
- Snapshot capture with custom save paths
- "No Connection" and "Paused" image generation
- OpenCV error suppression
Methods:
connect(): Establish RTSP connectiondisconnect(): Close RTSP connectionget_frame(): Retrieve current frametake_snapshot(): Save current frame to fileadd_timestamp_to_frame(): Overlay timestampset_transport(),set_path(),set_port(): Configure RTSP
Printer monitoring via WebSocket and UDP discovery. Also includes a standalone Tkinter GUI.
Key Components:
PrinterMonitor: WebSocket client for printer status- Discovers printers via UDP broadcast
- Connects to WebSocket on port 3030
- Sends status requests (Cmd: 255)
- Parses printer responses
- Extracts print information
PrintInfo: Dataclass for print job informationPrinter: Dataclass for printer device informationPrinterStatus: Dataclass for overall printer statusTemperature: Dataclass for temperature readings
Features:
- Automatic printer discovery
- WebSocket communication using SDCP protocol
- Flexible field mapping for different printer models
- Time formatting utilities
- Status code interpretation
- Standalone Tkinter GUI (when run directly)
Usage:
# As standalone Tkinter GUI
python stats.py
# As module (imported by main.py)
from stats import PrinterMonitorPyInstaller build script for creating standalone macOS application.
Features:
- Generates PyInstaller spec file
- Configures one-folder bundle
- Includes all dependencies
- Adds application icon
- Removes macOS quarantine attributes
- Code signs the application
- Handles missing modules gracefully
Usage:
python build_app.pyOutput:
- Creates
build_app/dist/Streamy-v1.5.app - Application bundle includes:
- Python interpreter
- All dependencies
- Application resources
- Code signature
Auto-generated configuration file storing user preferences.
- Created on first run
- Updated when settings change
- Contains all configuration options (see Configuration)
Application icon file.
- Used for window icon in Python script
- Embedded in macOS app bundle
- Recommended size: 512x512 pixels
- Format: PNG with transparency
| Port | Protocol | Purpose |
|---|---|---|
| 3000 | UDP | Printer discovery (broadcast) |
| 54780 | UDP | Discovery response binding |
| 3030 | WebSocket | Printer status communication (SDCP) |
| 554 | RTSP | Video streaming |
| Parameter | Value | Description |
|---|---|---|
| Discovery timeout | 1 second | UDP broadcast timeout |
| WebSocket timeout | 5 seconds | Connection timeout |
| Video frame interval | 33 ms | ~30 FPS update rate |
| Status update interval | 1 second | Printer status polling |
| FPS calculation interval | 1 second | FPS counter update |
| Auto-connect delay | 1 second | Startup delay before auto-connect |
| RTSP initialization | 1.5 seconds | Stream setup delay |
| Parameter | Value |
|---|---|
| UDP receive buffer | 8192 bytes |
| OpenCV frame buffer | 3 frames |
| Recent printers list | 5 entries max |
| Parameter | Value |
|---|---|
| Placeholder image | 853x480 (16:9) |
| Minimum video frame | 640x480 |
| Minimum window size | 800x600 |
| Default window size | 1000x700 |
| Status indicator size | 16x16 pixels |
| Snapshot format | JPG |
- Protocol: RTSP (Real-Time Streaming Protocol)
- Codec: H.264 (typical for Elegoo printers)
- Backend: OpenCV with FFMPEG
- Transport: UDP (default, faster) or TCP (more reliable)
- Output format: RGB888 or Grayscale8
- Frame rate: ~30 FPS
- Resolution: Depends on printer camera (typically 640x480 or 1280x720)
Print job information received from printer:
| Field | Type | Description |
|---|---|---|
is_printing |
bool | Whether currently printing |
progress |
float | Print progress percentage (0-100) |
current_layer |
int | Current layer number |
total_layer |
int | Total layers in print |
remain_time |
int | Remaining time in seconds |
total_time |
int | Total print time in seconds |
task_id |
str | Print job ID |
task_name |
str | File/task name |
status_code |
int | Raw status code from printer |
| Code | Status |
|---|---|
| 0 | Idle |
| 1 | Preparing to print |
| 2, 3, 4 | Printing |
| 7 | Finishing |
| 8 | Idle |
Discovery returns printer info in pipe-delimited format:
id|name|ip_address|model|firmware|connection
Example:
12345|My Mars|192.168.1.100|Mars 3 Pro|V4.5.3|ElegooPrinterAPI
- Application sends UDP broadcast to
255.255.255.255:3000 - Discovery message:
M99999 - Printer responds with info string (pipe-delimited)
- Application parses response and extracts printer details
- If discovery fails, direct IP connection is used
Connection URL:
ws://{printer_ip}:3030
Message Topics:
sdcp/request/{printer_id}- Commands to printersdcp/response/{printer_id}- Responses from printersdcp/status/{printer_id}- Status updatessdcp/notice/{printer_id}- Notificationssdcp/error/{printer_id}- Error messages
Status Request Message:
{
"Topic": "sdcp/request/{printer_id}",
"Data": {
"Cmd": 255,
"RequestID": "streamy_12345",
"Data": {},
"MainboardID": "{printer_id}",
"From": 0
}
}Status Response Format:
{
"Topic": "sdcp/status/{printer_id}",
"Data": {
"Attributes": {
"Name": "printer_name"
},
"Data": {
"Status": 2,
"CurrentLayer": 150,
"TotalLayer": 1000,
"Progress": 15.0,
"RemainTime": 3600,
"TotalTime": 4200,
"FileName": "model.ctb"
}
}
}The parser supports multiple field name variations for different Elegoo printer models:
| Data | Supported Field Names |
|---|---|
| Is Printing | IsPrinting, Printing, isPrinting, is_printing, Status |
| Progress | Progress, progress, PrintProgress, print_progress, Percent |
| Current Layer | CurrentLayer, Layer, current_layer, CurrentLine, LineNum, Layers |
| Total Layers | TotalLayer, TotalLayers, MaxLayer, Lines, total_layers, Slices |
| Remaining Time | RemainTime, TimeLeft, remain_time, RemainingTime |
| Total Time | TotalTime, total_time, TotalPrintTime, PrintTime |
| Task Name | FileName, File, TaskName, task_name, file_name |
| UV Temperature | UVTemp, UV, uv_temp, UVTemperature, LightTemp |
Problem: Cannot discover printer
- Ensure printer is on the same local network
- Check if printer IP is reachable:
ping <printer_ip> - Verify printer is powered on and connected to WiFi
- Try direct IP connection instead of discovery
- Check firewall settings (allow UDP port 3000)
Problem: WebSocket connection fails
- Verify port 3030 is not blocked by firewall
- Check printer is running latest firmware
- Restart the printer and try again
- Verify printer's WebSocket service is enabled
Problem: Video stream not working
- Try switching transport from UDP to TCP in settings
- Verify RTSP path is correct (default:
/video) - Check port 554 is accessible
- Ensure camera is enabled on printer
- Some printers may use different RTSP paths (try
/or/stream)
Problem: Auto-connect not working
- Verify Auto-connect on startup is enabled in Settings
- Check that last_used_printer is set in config file
- Ensure printer is powered on before launching Streamy
- Try manual connection first to verify settings
Problem: Choppy or laggy video
- Switch to TCP transport for more reliable delivery
- Reduce network congestion (close other bandwidth-heavy apps)
- Check WiFi signal strength on printer
- Restart your router
- Try connecting via Ethernet (if supported by printer)
Problem: Black or frozen video
- Click Disconnect then Connect again
- Restart the application
- Verify camera is not disabled on printer
- Check RTSP path and port in settings
- Try the alternative transport protocol
Problem: Video shows "No Connection"
- Verify you've clicked Connect button
- Check IP address is correct
- Ensure printer camera is enabled
- Try disabling and re-enabling video with Disable Video button
Problem: High CPU usage
- Disable video streaming when not needed (Disable Video button)
- Close other resource-intensive applications
- Reduce window size
- Consider using the lightweight Tkinter GUI (
stats.py)
Problem: Application not responding
- Check network connectivity
- Click Disconnect and wait 5 seconds
- Reconnect to printer
- Restart the application
- Check system resources (RAM, CPU)
Problem: Snapshot not saving
- Check screenshot folder permissions in Settings
- Ensure disk space is available
- Verify video stream is active (not paused)
- Try changing screenshot save path in Settings
- Check folder path is valid and exists
Problem: Snapshot has no timestamp
- Enable Include timestamp on screenshots in Settings
- Verify system clock is correct
Problem: Status not updating
- Verify WebSocket connection is established (status shows "Connected")
- Check printer firmware version (update if available)
- Restart printer
- Check network stability
- Look for errors in application logs
Problem: Incorrect layer/time information
- Some printer models report data differently
- Progress calculation is based on layers (current/total × 100)
- Times are estimated and may vary
- Verify print is actually running
Problem: Status shows "Not Connected" but video works
- WebSocket connection may have failed
- Video (RTSP) and status (WebSocket) use different protocols
- Check printer's WebSocket service
- Try reconnecting
Problem: App won't open (security warning)
- macOS may block unsigned apps
- Right-click app → Open → Confirm
- Or: System Preferences → Security → Allow app
- Build script includes code signing, but may need developer certificate
Problem: App crashes on launch
- Verify macOS version compatibility (10.13+)
- Check build process completed successfully
- Try running from terminal to see error messages:
/Applications/Streamy-v1.5.app/Contents/MacOS/Streamy-v1.5
- Rebuild application with
python build_app.py
Problem: App size is very large (~500 MB)
- This is normal - includes Python and all dependencies
- PyInstaller bundles entire Python environment
- Can't be reduced without excluding dependencies
-
Check Printer:
- Is it powered on?
- Is it connected to WiFi?
- Is camera enabled?
- Is firmware up to date?
-
Check Network:
- Is computer on same network as printer?
- Can you ping printer IP?
- Is firewall blocking connections?
- Try connecting to printer via Elegoo app first
-
Check Application:
- Are settings correct?
- Try deleting
streamy_config.jsonand reconfiguring - Restart application
- Check for Python errors in terminal
-
Check Dependencies:
- Reinstall dependencies:
pip install --upgrade opencv-python numpy PyQt5 websocket-client requests - Verify Python version:
python --version(should be 3.7+)
- Reinstall dependencies:
-
Get Help:
- Open an issue on GitHub with:
- Error messages
- Printer model and firmware version
- Operating system and Python version
- Steps to reproduce the problem
- Open an issue on GitHub with:
Enable detailed logging for troubleshooting:
# Edit main.py, line 92-95
logging.basicConfig(
level=logging.DEBUG, # Change ERROR to DEBUG
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)| Variable | Description |
|---|---|
OPENCV_LOG_LEVEL |
Set to ERROR to suppress OpenCV messages |
OPENCV_FFMPEG_CAPTURE_OPTIONS |
RTSP transport options (set by app) |
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is provided as-is for personal use.
- PyQt5 GUI with video streaming
- Real-time printer monitoring via WebSocket
- Snapshot capability with timestamps
- Auto-connect feature
- Recent printers list (up to 5)
- Configurable RTSP transport and path
- Custom printer naming
- Settings dialog with all options
- Large progress percentage display
- FPS counter (toggleable)
- Custom screenshot save path
- macOS app build script with PyInstaller
- Comprehensive error handling
- Status indicator with color coding
- Video pause/resume functionality
- Alternative Tkinter GUI in stats.py
- Multiple printer monitoring
- Print queue management
- Time-lapse recording
- Email/push notifications
- Temperature graphing
- Print history tracking
Created and maintained by [email protected]
Special thanks to:
- The Elegoo community for protocol documentation
- OpenCV and PyQt5 teams for excellent libraries
- Beta testers and contributors
For issues, questions, or suggestions:
- GitHub Issues: https://github.com/OverjoyedFrankenstein/Streamy/issues
- Email: [email protected]
When reporting issues, please include:
- Streamy version
- Printer model and firmware
- Operating system
- Python version
- Error messages or screenshots
- Steps to reproduce
Enjoy monitoring your 3D prints with Streamy! 🖨️