Camera Streaming¶
Monitor your prints visually with live camera streaming directly from your Bambu Lab printer.
Live Streaming¶
Bambuddy provides MJPEG video streaming from your printer's built-in camera, or from an external network camera.
External Cameras¶
Connect external network cameras to replace the built-in printer camera. Useful for better angles, higher resolution, or printers in enclosures.
Supported Camera Types¶
| Type | Description | Example URL/Path |
|---|---|---|
| MJPEG | Motion JPEG stream | http://192.168.1.50/mjpeg |
| RTSP | Real-Time Streaming Protocol | rtsp://192.168.1.50:554/stream |
| Snapshot | HTTP URL returning JPEG image | http://192.168.1.50/snapshot.jpg |
| USB (V4L2) | USB webcam connected to host | /dev/video0 |
Configuration¶
- Go to Settings > General > Camera
- Find your printer in the External Cameras section
- Toggle the switch to enable
- Enter the camera URL
- Select the camera type
- Click Test to verify connection
RTSP Authentication
Include credentials in the URL: rtsp://user:password@192.168.1.50:554/stream
USB Camera Setup
For USB cameras, enter the device path (e.g., /dev/video0). Bambuddy will auto-detect available V4L2 devices. Install v4l2-utils for enhanced device detection: sudo apt install v4l-utils
Features with External Cameras¶
| Feature | Description |
|---|---|
| Live Streaming | Replaces built-in camera in the viewer |
| Finish Photos | Captures from external camera on print complete |
| Layer Timelapse | Captures a frame on each layer change, stitches to video on completion |
Layer-Based Timelapse¶
When an external camera is enabled, Bambuddy automatically:
- Captures a frame each time the print layer changes
- Stores frames in a temporary directory during printing
- Stitches video using ffmpeg when print completes
- Attaches the timelapse to the print archive
ffmpeg Required
Layer timelapse requires ffmpeg to be installed (included in Docker image).
Opening the Camera¶
- Click the camera icon on any printer card
- Camera opens based on your view mode setting (see below)
- The stream starts automatically
View Mode Setting¶
Configure how camera streams open in Settings > General > Camera:
| Mode | Description |
|---|---|
| New Window | Opens camera in a separate browser window (default) |
| Embedded | Shows camera as a floating overlay on the main screen |
Embedded Viewer Features¶
When using embedded mode, the camera appears as a floating window:
- Draggable: Click and drag the header to reposition
- Resizable: Drag the bottom-right corner to resize
- Persistent: Position and size are remembered per printer across sessions
- Navigation Persistence: Open cameras stay open when navigating away and back to Printers page
- Minimize: Click the minimize button to collapse to title bar
- Close: Click X to close the viewer
- Multi-Viewer: Open cameras for multiple printers simultaneously
Embedded Mode Benefits
Embedded mode keeps you on the main screen while monitoring prints - no need to switch between browser windows. Open multiple viewers to monitor your entire print farm at once.
Stream Controls¶
| Button | Action |
|---|---|
| Live | Real-time MJPEG video stream |
| Snapshot | Single still image (lower bandwidth) |
| Restart the stream | |
| Enter fullscreen mode |
Zoom & Pan¶
Zoom in on your camera feed to inspect print details.
Zoom Controls¶
| Method | Action |
|---|---|
| Mouse wheel | Scroll up to zoom in, down to zoom out |
| ± buttons | Click the zoom buttons in the corner |
| Zoom indicator | Click the percentage to reset to 100% |
| Pinch gesture | Two-finger pinch on touch devices |
Zoom range: 100% - 400%
Pan Controls¶
When zoomed in (>100%), you can pan around the image:
| Platform | How to Pan |
|---|---|
| Desktop | Click and drag the image |
| Mobile | Drag with one finger when zoomed |
| During pinch | Move both fingers while pinching |
The pan range automatically adjusts based on zoom level - at higher zoom, you can pan further to explore the entire image.
Reset Zoom
Click the zoom percentage indicator (e.g., "200%") to instantly reset to 100% view.
Snapshot Mode¶
For lower bandwidth usage, use snapshot mode:
- Captures a single frame on demand
- Click refresh to get a new snapshot
- Ideal for cellular connections or slow networks
Technical Details¶
How Streaming Works¶
graph LR
A[Printer Camera] -->|RTSP| B[ffmpeg]
B -->|MJPEG| C[Bambuddy API]
C -->|HTTP Stream| D[Browser] - Printer exposes camera via RTSP (Real Time Streaming Protocol)
- ffmpeg converts RTSP to MJPEG (Motion JPEG)
- Bambuddy serves the MJPEG stream to your browser
- Browser displays frames in an
<img>tag
Requirements¶
| Requirement | Details |
|---|---|
| ffmpeg | Must be installed on Bambuddy server |
| Camera enabled | Must be enabled in printer settings |
| Developer Mode | Camera access requires Developer Mode |
| Network access | Server must be able to reach printer IP |
Docker Users
Camera streaming works with Docker's default bridge networking in most setups (NAT handles routing automatically).
If you have issues, try network_mode: host - see Docker Installation.
Installing ffmpeg¶
Download from ffmpeg.org and add to PATH.
ffmpeg is included in the Docker image.
Timelapse Editor¶
Edit timelapse videos directly in Bambuddy before downloading or sharing.
Opening the Editor¶
- Go to Archives and select a completed print
- Click on the timelapse video thumbnail
- Click Edit to open the timelapse editor
Editing Features¶
| Feature | Description |
|---|---|
| Trim | Set start and end points to remove unwanted footage |
| Speed | Adjust playback speed from 0.25x to 4x |
| Music | Add background music from built-in tracks |
| Preview | Watch your edits before exporting |
Exporting¶
- Make your edits
- Click Export
- Wait for processing (uses ffmpeg)
- Download the edited video
Original Preserved
Editing creates a new file - your original timelapse is never modified.
Camera Snapshots on Print Complete¶
Bambuddy can automatically capture a camera snapshot when prints complete:
- Go to Settings > General
- Enable Capture snapshot on print complete
- Snapshots are saved to the archive
This creates a visual record of your completed prints!
Build Plate Empty Detection¶
Automatically detect if objects are left on the build plate before a print starts. If detected, the print is immediately paused and you receive a notification.
How It Works¶
- Calibrate - Capture reference images of your empty build plate
- Enable - Toggle plate detection on for the printer
- Auto-Check - When any print starts, Bambuddy compares the current camera view to your references
- Auto-Pause - If objects are detected, the print is immediately paused
Calibration¶
Store up to 5 reference images per printer for different plate types (textured, smooth, high-temp, etc.):
- Click the scan icon on the printer card to open the modal
- Ensure the build plate is completely empty and chamber light is ON
- Click Calibrate Empty Plate
- Optionally add a label (e.g., "Textured PEI", "Cool Plate")
- Repeat for other plate types you use
Multiple References
The system automatically selects the best-matching reference when checking. Calibrate all your commonly used plates for accurate detection.
Enabling Detection¶
Use the split button on the printer card:
| Button Part | Action |
|---|---|
| Main (scan icon) | Toggles detection on/off |
| Chevron (▼) | Opens calibration/management modal |
When enabled, the button shows a green border.
ROI (Region of Interest)¶
Adjust which part of the camera view is analyzed:
- Open the plate detection modal
- Scroll to Detection Area (ROI)
- Click Edit
- Use the sliders to adjust X, Y, Width, and Height
- Click Save
The green box in the preview shows the detection area. Focus it on just the build plate to avoid false positives from the printer frame or background.
Managing References¶
In the plate detection modal:
- View thumbnails of saved references
- Click label to edit (e.g., "High Temp Plate")
- Click X on thumbnail to delete
- See timestamps for when each was calibrated
Notifications¶
When objects are detected:
- Print pauses immediately
- Toast notification appears in Bambuddy
- Push notification sent (if configured)
- WebSocket event broadcast for integrations
Requirements¶
| Requirement | Details |
|---|---|
| OpenCV | opencv-python-headless must be installed |
| Chamber Light | Should be ON for reliable detection |
| Calibration | At least one reference image required |
Docker
OpenCV is included in the Docker image.
How Detection Works¶
- Captures current camera frame (or uses buffered frame if stream is active)
- Applies heavy Gaussian blur to both current and reference images
- Normalizes both images for consistent comparison
- Extracts the ROI region
- Calculates pixel difference percentage
- If difference > 1%, plate is considered "not empty"
Troubleshooting¶
False Positives (detects objects when empty)
- Calibrate with chamber light ON (same as during prints)
- Adjust ROI to exclude printer frame edges
- Add multiple calibrations for different lighting conditions
False Negatives (doesn't detect objects)
- Ensure chamber light is ON
- Recalibrate - plate surface may have changed
- Check that objects are within the ROI area
Stream Settings¶
Frame Rate¶
The default frame rate is 15 FPS. You can adjust this in the URL:
| FPS | Use Case |
|---|---|
| 5 | Low bandwidth / A1/P1 cameras (hardware limit) |
| 10-15 | Balanced (15 is default) |
| 20-25 | Smoother video |
| 30 | Maximum quality (X1/H2/P2 only) |
FPS Limits by Camera Type
- External cameras: Max 15 FPS
- A1/P1 printers: Max 5 FPS (hardware limitation)
- X1/H2/P2 printers: Max 30 FPS
Higher FPS = More Bandwidth
Higher frame rates consume more network bandwidth and server resources.
Stream Cleanup¶
Bambuddy properly cleans up camera streams:
- Window close - Stream stops automatically
- Tab hidden - Stream pauses to save resources
- Page unload - ffmpeg process terminated
- Refresh - Old stream stopped, new one started
This prevents orphaned ffmpeg processes from consuming resources.
Auto-Reconnect¶
Bambuddy automatically detects and recovers from stalled camera streams:
Stall Detection¶
The browser periodically checks if the stream is still receiving frames:
- Check interval: Every 5 seconds
- Detection: Compares last frame timestamp
- Threshold: Stalled if no new frames for >5 seconds
Automatic Recovery¶
When a stall is detected:
- Detects that no frames have been received
- Closes the stalled connection
- Reconnects automatically
- Resumes streaming
Network Interruptions
If your network briefly drops, the stream will automatically recover once the connection is restored.
Troubleshooting¶
Stream Won't Start¶
- Is the printer on? Camera requires power
- Is camera enabled? Check printer settings
- Is ffmpeg installed? Required for streaming
- Is Developer Mode enabled? Required for camera access
- Running in Docker? Try
network_mode: hostif having issues
Docker: Camera Not Working¶
If camera streaming doesn't work in Docker, try host network mode:
# docker-compose.yml
services:
bambuddy:
build: .
network_mode: host
# Remove the ports: section when using host mode
Note: Docker's default bridge networking with NAT works in most setups. Host mode is only needed if your network configuration prevents NAT'd traffic from reaching the printer.
Stream Freezes¶
- Network congestion or WiFi issues
- Try lowering the FPS
- Check printer WiFi signal strength
- Try snapshot mode instead
High Latency¶
MJPEG streaming typically has 1-3 seconds of latency. This is normal and due to:
- RTSP buffering
- ffmpeg processing
- HTTP streaming
Camera Shows Black¶
- Camera may be initializing
- Try refreshing the stream
- Check if camera works in Bambu Studio
API Endpoints¶
For developers and integrations:
| Endpoint | Method | Description |
|---|---|---|
/api/v1/printers/{id}/camera/stream | GET | MJPEG stream |
/api/v1/printers/{id}/camera/snapshot | GET | Single JPEG frame |
/api/v1/printers/{id}/camera/stop | POST | Stop active streams |
/api/v1/printers/{id}/camera/test | GET | Test camera connection |
Example: Embed in OBS¶
Use the stream URL directly:
Add as a Browser Source or Media Source in OBS.
Streaming Overlay for OBS¶
Bambuddy includes a dedicated overlay page designed for live streaming. It combines the camera feed with real-time print status in a single embeddable view.
Accessing the Overlay¶
Navigate to:
For example: http://192.168.1.100:8000/overlay/1
No Login Required
The overlay page is designed for embedding and does not require authentication.
What's Included¶
The overlay displays:
| Element | Description |
|---|---|
| Camera Feed | Full-screen live camera view |
| Bambuddy Logo | Branding in top-right corner (links to GitHub) |
| Filename | Current print file name |
| Status | Printing, Paused, Idle, etc. |
| Progress Bar | Visual progress with percentage |
| Layer Count | Current layer / Total layers |
| Time Remaining | Estimated time left |
| ETA | Estimated completion time |
OBS Setup¶
- In OBS, click + under Sources
- Select Browser
- Enter the overlay URL (e.g.,
http://192.168.1.100:8000/overlay/1) - Set width and height to match your scene (e.g., 1920x1080)
- Click OK
Single Source
The overlay combines camera and status - you only need one browser source, not separate camera and text sources.
Customization¶
Customize the overlay using query parameters:
Size¶
| Size | Text | Logo | Best For |
|---|---|---|---|
small | Compact | Small | Picture-in-picture |
medium | Standard | Medium | Normal streams |
large | Large | Large | Full-screen focus |
Frame Rate (FPS)¶
Control the camera stream frame rate:
| FPS | Description |
|---|---|
1-5 | Low bandwidth, minimal resource usage |
10-15 | Default, balanced quality (15 is default) |
20-25 | Smoother video |
30 | Maximum quality |
FPS is automatically clamped between 1 and 30. The backend may further limit based on camera type (A1/P1 cameras max out at ~5 FPS).
Status-Only Mode (No Camera)¶
Hide the camera feed and show only the status overlay on a black background:
This is useful for:
- Streamers who want status info without camera
- Low-bandwidth scenarios
- Creating a minimal status display
Set camera=false or camera=0 to hide the camera. Default is camera=true.
Show/Hide Elements¶
Control which elements are displayed:
Available elements:
| Element | Description |
|---|---|
progress | Progress bar with percentage |
layers | Layer count (current/total) |
eta | Time remaining and ETA |
filename | Print file name |
status | Status text (Printing, Paused, etc.) |
printer | Printer name |
Examples:
# Show only progress and ETA
/overlay/1?show=progress,eta
# Show everything including printer name
/overlay/1?show=progress,layers,eta,filename,status,printer
# Minimal overlay - just progress
/overlay/1?show=progress
Combined Parameters¶
# Large overlay with max FPS
/overlay/1?size=large&fps=30&show=progress,eta,filename
# Status-only with selected elements
/overlay/1?camera=false&show=progress,eta,status
# Minimal status display
/overlay/1?camera=false&size=small&show=progress
Features¶
- Real-Time Updates - Status updates via WebSocket with polling fallback
- Auto-Reconnect - Camera stream automatically reconnects on errors
- Gradient Overlay - Text appears over a gradient for readability
- Responsive - Adapts to different browser source sizes
- Branding - Bambuddy logo always visible (links to GitHub)
Idle State¶
When no print is running, the overlay shows:
- Camera feed (still active)
- "Printer is idle" or "Printer offline" message
- Bambuddy logo
Troubleshooting¶
Overlay not loading in OBS
- Verify the URL works in a regular browser first
- Check that OBS can reach your Bambuddy server (same network)
- Try refreshing the browser source in OBS
Camera not showing
- Ensure the printer is connected
- Check that camera streaming works in Bambuddy directly
- The overlay uses the same camera stream as the main app
Status not updating
- WebSocket connection may have failed
- Overlay falls back to polling every 2 seconds
- Refresh the browser source to reconnect
Tips¶
Timelapse Videos
The printer creates timelapse videos automatically. Bambuddy detects the new timelapse after each print and attaches it to the archive. If automatic detection fails (e.g., the printer was slow to encode), use the Scan for Timelapse button in the archive to manually trigger a scan. View and edit them using the built-in timelapse editor.
Multiple Cameras
In embedded mode, open multiple camera viewers simultaneously - each remembers its own position and size. Great for monitoring your entire print farm on one screen.
Mobile Viewing
Camera streaming works on mobile devices with full touch support. Pinch to zoom, drag to pan when zoomed. Access from the printer card camera icon.
Bandwidth Conservation
Close camera windows when not actively watching to save server resources and bandwidth.