diff --git a/_plugins/bitbang.md b/_plugins/bitbang.md new file mode 100644 index 000000000000..a9d08e82cfdd --- /dev/null +++ b/_plugins/bitbang.md @@ -0,0 +1,113 @@ +--- +layout: plugin + +id: bitbang +title: BitBang +description: Remote OctoPrint access with live H.264 video via BitBang WebRTC. No account, no port forwarding, one shareable link. +authors: +- Rich LeGrand +license: MIT +date: 2026-07-01 + +homepage: https://github.com/richlegrand/OctoPrint-BitBang +source: https://github.com/richlegrand/OctoPrint-BitBang +archive: https://github.com/richlegrand/OctoPrint-BitBang/releases/latest/download/release.zip + +privacypolicy: https://github.com/richlegrand/OctoPrint-BitBang/blob/main/PRIVACY.md + +tags: +- remote access +- webrtc +- webcam +- video +- h264 +- raspberry pi +- timelapse + +screenshots: +- url: /assets/img/plugins/bitbang/bitbang_config.png + alt: BitBang settings panel + caption: Settings → BitBang configuration +- url: /assets/img/plugins/bitbang/camera_select.png + alt: Camera selection dropdown + caption: Auto-detected cameras +- url: /assets/img/plugins/bitbang/resolution_select.png + alt: Resolution dropdown + caption: Pick resolution up to 720p +- url: /assets/img/plugins/bitbang/bitbang_url.png + alt: Shareable BitBang URL + caption: Click the BitBang menu item to get the URL +- url: /assets/img/plugins/bitbang/bitbang_video.png + alt: Live video in the Control tab + caption: Hardware-encoded H.264 in the Control tab + +featuredimage: /assets/img/plugins/bitbang/bitbang_default.png + +attributes: +- cloud +- ai-developed + +compatibility: + octoprint: + - 1.9.0 + os: + - linux + python: ">=3.10,<4" + +--- + +OctoPrint-BitBang gives you full remote access to your OctoPrint instance — including live H.264 video — over a single secure HTTPS shareable link. It uses [BitBang](https://github.com/richlegrand/bitbang) to create a peer-to-peer connection that requires no account, no subscription, no port forwarding, no tunnel, and no VPN. + +## What you get + +- **Full remote access:** Configure, upload G-code, start jobs, see live video — from anywhere, through a secure HTTPS URL. +- **One link, no account set-up:** Share the URL, share your printer. +- **Live H.264 video:** Hardware-encoded on Pi 4 (`/dev/video11` V4L2 M2M), software-encoded on Pi 5 or any other Linux host. Packetized by aiortc and delivered as a WebRTC media stream. CPU footprint is around 40% (single core) on Pi 4. +- **BitBang URL access is optional:** Video streaming also works with local-network URL access. +- **Pi CSI camera or USB webcam:** Auto-detected (IMX477, IMX219, IMX708, or any V4L2-capable USB webcam). +- **Camera controls:** Camera selection, live brightness slider, fullscreen button, image flip H/V buttons, and resolution selection (VGA up to 720p). +- **Snapshots and timelapse:** Integrates with OctoPrint's `WebcamProviderPlugin` API — snapshots are grabbed from the live stream, so no second camera pipeline to configure. +- **Mobile friendly:** BitBang URL works on phones and tablets. +- **PIN protection:** Optional PIN required to access the remote URL. + +## Prerequisites + +A few OS-level steps before installing (full details in the [README](https://github.com/richlegrand/OctoPrint-BitBang#installation)): + +**Free the camera** from OctoPi's default streamer: + +``` +sudo systemctl disable --now webcamd ffmpeg_hls camera-streamer +``` + +**32-bit Raspberry Pi OS** (`armv7l`, the standard OctoPi image) also needs `aiortc` and `pylibsrtp` rebuilt once against the system libraries, since its piwheels builds link newer libraries than Bookworm ships: + +``` +sudo apt install -y libvpx-dev libopus-dev libsrtp2-dev +~/oprint/bin/pip install --no-binary aiortc,pylibsrtp --force-reinstall --no-deps aiortc==1.10.1 pylibsrtp==1.0.0 +``` + +64-bit and x86_64 need nothing further. + +## How it works + +- The `bitbang-python` package handles WebRTC signaling, identity, and the ASGI interface. +- This plugin wraps it with OctoPrint integration: settings UI, `WebcamProviderPlugin` hooks, camera auto-detect, CSRF-safe cookie handling, and a webcam-provider template that renders the H.264 `