Skip to content

About

Bambu Lab camera stream integration for OctoPrint

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

87 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

OctoPrint BambuCam Logo

OctoPrint‑BambuCam

License Python OctoPrint Latest Release Latest Prerelease Downloads Made with Love

Live camera stream from Bambu Lab printers β€” inside OctoPrint

29% Vibe_Coded

Note

About this project. I built this for my own printer setup with AI, and if it helps others, even better. I have tested it to the best of my knowledge and ability, and every change is backed by an automated test suite, CI, and security scans (Bandit, CodeQL). Disclosed here per the OctoPrint plugin guidelines. Issues and PRs are welcome.

Highlights

  • πŸ“· Live MJPEG Stream β€” Camera of P1P / P1S / A1 / A1 mini in OctoPrint's Control tab
  • 🎞️ SD-card Timelapse Manager β€” List, copy, move and delete the printer's own timelapse videos over FTPS from a dedicated tab, with thumbnails, multi-select, progress/ETA, and automatic .avi β†’ .mp4 conversion (see Manage SD-card timelapses)
  • πŸ€– Auto-sync after a print β€” Optionally pull the new timelapse automatically once the print finishes and the system is idle (printer done, OctoPrint's own render finished) β€” copy or move, your choice
  • 🎬 Raw Files render pipeline β€” Harvest the printer's raw high-res /ipcam footage per print (automatically or on demand), then concat and render it into a finished .mp4 with selectable quality presets β€” the clip lands in OctoPrint's native Timelapse tab (see Render raw /ipcam footage)
  • πŸ“Έ Snapshot & Timelapse β€” Full WebcamProviderPlugin integration for OctoPrint's built-in timelapse engine
  • πŸ’‘ Light toggle β€” Switch the printer's light on/off from a button over the live stream (requires Bambu Connector β€” see Compatibility)
  • πŸ”† Automatic light β€” Optionally switch the chamber light on when a print starts and off again when it ends, each with a free delay in seconds. A manual toggle during the print keeps the automation off the light until the next one starts (see Configuration)
  • πŸ”Œ Offline-resilient β€” When the printer is powered off the stream shows a "Printer Offline" frame and reconnects automatically once it is back, without tripping the crash limit
  • πŸ”— Auto-config from Bambu Connector β€” If OctoPrint-BambuConnector is set up, reuse its printer IP and access code instead of entering them twice
  • πŸ”„ Auto-managed Daemon β€” Starts, restarts on crash, and reconfigures without any manual setup
  • πŸ”ƒ Rotation & Overlays β€” Image rotation, FPS watermark, and activity dot
  • πŸ§ͺ Connection Test β€” Verify IP and access code before saving settings
  • πŸ”’ Security Hardened β€” Access code never exposed via daemon HTTP; unauthenticated shutdown endpoint disabled
  • 🌐 Reverse-Proxy Ready β€” Stream URL override for setups behind nginx / Caddy
  • πŸ–₯️ Bind Address Control β€” 127.0.0.1 (safe default) or 0.0.0.0 for browser live view

Supported printers

Series Camera stream Timelapse manager (FTPS) Light toggle (MQTT) Tested
A1 mini βœ… βœ… βœ… βœ…
A1 βœ… βœ… ⚠️ β€”
P1P / P1S βœ… βœ… ⚠️ β€”
X1 / X1C ❌ ⚠️ ⚠️ β€”

Legend: βœ… works Β· ⚠️ should work but untested on that model Β· ❌ not supported. All printers need LAN mode with the access code from the printer's Network settings.

Note: The printer camera delivers roughly 0.5–2 FPS by design β€” that is a limitation of the printer firmware, not the plugin. If Bambu Studio or the Bambu Handy app is watching the camera simultaneously, the connection may fail.

Compatibility

BambuCam requires OctoPrint β‰₯ 1.10.0.

OctoPrint 1.x vs. 2.0 β€” feature breakdown

Almost everything works on the OctoPrint 1.x series in manual mode (you type the printer IP and access code yourself). Two convenience features build on OctoPrint-BambuConnector, which is part of OctoPrint's 2.0 connector architecture, so they are only available on OctoPrint 2.0+ with Bambu Connector set up.

Feature OctoPrint 1.x OctoPrint 2.0 + Bambu Connector
Live MJPEG stream & snapshot βœ… βœ…
Auto-managed daemon (restart / offline-resilient) βœ… βœ…
WebcamProvider (multicam) integration βœ… βœ…
Manual configuration (IP + access code) βœ… βœ…
Connection test βœ… βœ…
SD-card timelapse list / thumbnails βœ… βœ…
Copy / move / delete timelapses (FTPS) βœ… βœ…
.avi β†’ .mp4 transcode + ffmpeg indicator βœ… βœ…
Convert local .avi files βœ… βœ…
Auto-sync after a print (MovieDone) βœ… βœ…
Rotation, FPS watermark, activity dot βœ… βœ…
Auto-config (reuse Connector IP / access code) ❌ βœ…
Light toggle (needs the printer serial via MQTT) ❌ βœ…

On OctoPrint 1.x the two unavailable features degrade gracefully: the Configuration dropdown stays on Manual (the Auto option is disabled), and the light button is hidden. Nothing errors β€” you just configure the printer manually and lose the LED control.

Installation

Via Plugin Manager (Recommended)

  1. Open the OctoPrint web interface

  2. Navigate to Settings β†’ Plugin Manager

  3. Click Get More...

  4. Click Install from URL and enter:

    https://github.com/Ajimaru/OctoPrint-BambuCam/releases/latest/download/OctoPrint-BambuCam-latest.zip
    
  5. Click Install

  6. Restart OctoPrint

Manual Installation

Manual pip install
pip install https://github.com/Ajimaru/OctoPrint-BambuCam/releases/latest/download/OctoPrint-BambuCam-latest.zip

The releases/latest URL always points to the newest stable release.

Configuration

Open Settings β†’ Plugins β†’ BambuCam, enter the printer IP and access code (or pick Auto when Bambu Connector is set up), and hit Test connection. Everything else has sensible defaults and is optional.

Required & optional settings
Setting Description
Configuration Manual (type the values) or Auto.
Printer IP / hostname LAN address, e.g. 192.168.1.100.
Access code Shown on printer display under Network config.

Use Test connection to verify both values before saving.

πŸ’‘ If OctoPrint-BambuConnector is installed and configured, choose Configuration β†’ Auto to reuse its printer IP and access code instead of entering them twice. The fields then show those values read-only. If it is not available, BambuCam stays on manual entry.

⚠️ The bundled MJPEG server has no authentication. With bind_address = 0.0.0.0, anyone on your network can watch the camera stream. Use 127.0.0.1 (default) unless you need browser live view and have a reverse proxy in place.

Optional settings

Setting Default Description
HTTP port 8181 Local port of the MJPEG server.
Bind address 127.0.0.1 127.0.0.1 = safe. 0.0.0.0 = browser live view.
Stream URL override (empty) Use with a reverse proxy.
Override resolution off Off = printer sets the frame size (recommended).
Width / Height 1920x1080 Only applied when Override resolution is enabled.
Rotation -1 (none) Rotate 90 / 180 / 270 degrees.
Activity dot off Overlay a pulsing dot when the stream is active.
FPS watermark off Overlay the measured FPS on the image.
Auto-restart on Automatically restart the daemon on crash.
Max restarts 5 Max restarts within the restart window.
Restart window 300 s Time window for counting restarts.
Filename suffix (empty) Appended to downloaded timelapse names.
Convert to .mp4 on Re-encode copied .avi to playable .mp4.
Auto-sync off Pull new timelapses automatically after a print.
Auto-pull action copy copy (keep on SD) or move (delete from SD).
Delay after print 420 s Wait before checking the SD card for the new file.
Automatic light off Light on at print start, off when it ends.
Light on delay 0 s Wait after the print starts before switching on.
Light off delay 0 s Wait after the print ends before switching off.

Automatic printer light

Found under Webcam Image β†’ Printer light. With it on, the chamber light goes on when a print starts and off when it ends β€” finished, failed or cancelled. A pause does not switch it off, since you often pause specifically to look inside. Both delays are free in seconds (0 = immediately): raise the on-delay to skip bed levelling and purging, raise the off-delay to keep the finished part lit for a while.

A manual toggle wins: switching the light by hand on the live stream while a print is running keeps the automation off it until the next print starts. Switching it off at the printer's own display also counts β€” before the automation switches off, it checks the real state and leaves an already-off light alone. The light is switched off rather than restored to whatever it was before the print, because that state is often unknown. A pending switch is lost if OctoPrint restarts.

Manage SD-card timelapses

P1/A1 printers record timelapses onto their (micro-)SD card. The BambuCam Timelapse tab browses and manages them over FTPS β€” no need to pull the card or open Bambu Studio. Each row shows size, date, a clickable preview thumbnail and a βœ“ Copied badge; checkboxes allow multi-select with per-file progress.

  • Copy downloads into OctoPrint's timelapse folder (SD original kept).
  • Move copies, then deletes the original only after a byte-for-byte verify. Delete removes from the card after a confirmation.
  • Copied/converted videos appear in OctoPrint's native Timelapse tab.

Notes and safety:

  • Automatic .avi β†’ .mp4 conversion (on by default). Bambu records Motion-JPEG .avi, which many players can't open, so copies are re-encoded to H.264 .mp4 via OctoPrint's own ffmpeg. If ffmpeg isn't configured, the .avi is kept. Leftover .avi (off/skipped/failed) can be converted later from the "Local .avi files" section at the bottom of the tab.
  • Auto-sync (opt-in). Pull a print's new timelapse automatically once the system is idle β€” printer stopped AND OctoPrint done rendering β€” so two ffmpeg encodes never overlap. A tunable delay covers the SD-card write.
  • Move, delete and conversion are blocked while a print is running; copy is always allowed (read-only). All SD writes are admin-only, the access code never appears in any log, and re-copying asks first then saves a numbered copy (…-1.mp4).

Render raw /ipcam footage

Besides the finished SD-card timelapse, the A1 mini continuously records raw high-resolution MJPEG chunks (1680Γ—1080) into its /ipcam ring buffer β€” even when the on-screen timelapse is off. The Raw Files tab turns that footage into finished clips:

  • Harvest per print. With Auto-download /ipcam chunks enabled, the plugin snapshots /ipcam at print start and pulls this print's new chunks after the print ends (after the SD-card auto-sync, one FTPS session at a time). A manual Fetch from printer button covers prints the plugin didn't see. The live stream is paused during the pull β€” the printer serves FTPS at roughly 180 KB/s and the stream would compete for the same link. A running harvest shows a progress bar with live download speed and can be stopped at any time; chunks already downloaded are kept for a re-harvest.
  • Concat + render. Pick a quality preset (fast 720p up to full-resolution archive) and render a group; ffmpeg concatenates the chunks losslessly and re-encodes them to H.264 .mp4. The clip lands in OctoPrint's native Timelapse tab, thumbnail included. Rendering waits for printer idle by default, and an optional auto-render queues the job right after a complete download.
  • Manage the library. Groups show duration, resolution, size and a preview; expand a group to include/exclude or delete individual chunks. Rendered groups stay listed for re-rendering with another preset and can be aged out automatically (chunks_retention_days).

Everything is admin-gated like the SD-card operations; fetching and rendering are blocked while a print runs. See the Raw Files render pipeline docs for the full architecture.

Security notes

The access code is never logged or exposed to the browser, printer connections run over TLS, and privileged SD-card/light actions are permission-gated. See the Security model in SECURITY.md for the full posture and how to report a vulnerability.

How it works

For the live stream, the plugin bundles and supervises webcamd-bambu (bambu branch), a small MJPEG HTTP server that connects to the printer's camera port (TCP 6000, TLS) using the LAN access code. BambuCam starts the daemon automatically after OctoPrint boots, monitors it, restarts it after crashes, and reconfigures it when you change settings.

The other features talk to the printer directly from the plugin, no daemon involved: timelapse management over FTPS (TCP 990) and the light toggle over the printer's local MQTT broker (TCP 8883) β€” both using the same LAN access code.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines and instructions.

Please also follow our Code of Conduct.

License

AGPL-3.0-or-later β€” see LICENSE for details.

This plugin bundles webcam.py from webcamd-bambu (bambu branch), licensed under GPL-3.0. See AUTHORS.md for the full upstream author list and CHANGELOG.md for release history.

Support

For troubleshooting, check the BambuCam log at Settings β†’ Logging β†’ octoprint.plugins.bambucam and attach the OctoPrint systeminfo bundle when opening a bug report.

Credits

100% Badge Coverage

Show all badges

πŸ—οΈ 1. Build & Test Status

CI Docs workflow i18n Lint Bandit SARIF

πŸ§ͺ 2. Code Quality & Formatting

Code style: black Imports: isort Prettier pre-commit Codacy Coverage Pylint Score Bandit Security Depfu Known Vulnerabilities

πŸ”„ 3. CI/CD & Release

SemVer Release Date Latest Release Downloads Pre‑Release Python OctoPrint Maintenance

πŸ“Š 4. Repository Activity

Open Issues Closed Issues Open PRs Closed PRs Last Commit Commit Activity Contributors

🧾 5. Metadata

Code Size Security Snyk Languages Count Top Language License PRs Welcome


Stars Forks Watchers

Like this plugin? ⭐ Star the repo and share it with the OctoPrint community!

About

Bambu Lab camera stream integration for OctoPrint

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages