A Pioreactor plugin for continuous webcam recording with HLS streaming support. This plugin enables automated video recording of your bioreactor experiments with configurable recording parameters and real-time streaming capabilities.
Install from the Pioreactor plugins web interface or the command line:
pio install-plugin pioreactor-webcam # to install directly on the Pioreactor
# OR, on the leader's command line:
pios install-plugin pioreactor-webcam # to install on all Pioreactors in a cluster
Or install through the web interface (Plugins tab). This will install the plugin on all Pioreactors within the cluster.
To get the camera working on a Raspberry Pi running the Pioreactor image, you may need to:
- Enable camera autodetection by editing
/boot/config.txt(add or uncommentcamera_auto_detect=1) - Update to the latest firmware:
sudo apt update
sudo apt full-upgrade- Reboot the Pi after making these changes
You can customize the webcam recorder settings by adding the following to your Pioreactor configuration:
[webcam_recorder.config]
save_dir=/home/pioreactor/data/camera
hls_dir=/var/www/pioreactorui/data
segment_duration_minutes=15
width=1920
height=1080
framerate=30
vflip=true
pio run webcam_recorder
Under Manage, there will be a new Activities option called Webcam Recorder. You can start/stop recording using the is_recording setting.
- Continuous Recording: Records video in configurable segments (default 15 minutes)
- HLS Streaming: Provides real-time streaming via HTTP Live Streaming
- Configurable Parameters: Adjustable resolution, framerate, and recording duration
- Automatic File Management: Handles file naming with timestamps and cleanup
- Raspberry Pi Camera Support: Uses
rpicam-vidfor efficient video capture - Background Job: Integrates with Pioreactor's job system with dodging support
- Viewing the Stream: If you're connected to the Tailscale network, you can view the live camera stream using VLC or any HLS-compatible player by opening:
http://your-pioreactor-ip/data/webcam.m3u8. No UI changes are required for basic streaming functionality. - Disk Space Warning: Video recording uses significant disk space. Monitor your storage regularly to prevent the disk from filling up. Consider implementing automatic cleanup of old recordings or using external storage for long-term archival
Documentation for plugins can be found on the Pioreactor docs.