CineMate
CineMate is an open-source boilerplate for building your own digital cinema camera on a Raspberry Pi 4 or 5. It records CinemaDNG raw video using off-the-shelf parts, and provides a minimal starting point you can extend with your own controls and accessories.
It pairs a lightweight Python interface with a custom fork of cinepi-raw, built on the CinePi-RAW recorder by Csaba Nagy.
Features
- 10/12-bit CinemaDNG recording, plus 16-bit ClearHDR on the IMX585
- CineMate Log — log-companded DNGs on the IMX585 and IMX283, 17–37 % smaller, decoded back to linear automatically by any DNG-aware app
- Dual sensors — two libcamera-synchronised sensors, side-by-side / picture-in-picture HDMI preview, per-sensor recording
- Web GUI on the Pi's own hotspot, plus a browser settings editor for
settings.jsonc,config.txtand the RAW drive - Web API — build wireless controllers and tally lights from an ESP32, Pico W or M5Stack (Building control units)
- GPIO buttons, switches, rotary encoders, pots and an OLED, mapped in one settings file (Additional hardware)
- Multi-drive RAW hot-swap with a standby drive; SSD, NVMe or CFE Hat storage
- Recovery console on
:8080that stays reachable when CineMate itself won't start
Required hardware
For a basic CineMate setup you need:
- Raspberry Pi 4 or 5 / CM5 with 4 GB RAM or more. 2 GB boards run the prebuilt image, but are not recommended for UHD/4K: raw frames are buffered in RAM and a watchdog auto-stops recording once total RAM use hits 80 %. 4 GB is also recommended for compiling
cinepi-rawon the Pi. - Official HQ or GS camera module
- SSD drive such as a Samsung T7 formatted as
exFATorext4and labelledRAW - HDMI monitor or a phone/tablet connected to the Pi hotspot for preview
Compatible sensors
- IMX477 (official Raspberry Pi HQ camera)
- IMX296 (official Raspberry Pi GS camera)
- IMX283 (OneInchEye by Will Whang)
- IMX585 (Starlight Eye by Will Whang)
Additional hardware
All of it optional — add what you need, when you need it. Drivers and mappings come preinstalled.
| Hardware | Connects to | Typical use | | |---|---|---|---| | Push buttons | any free GPIO pin + GND | start/stop recording, change resolution | !Tactile push button | | Two- and three-way switches | GPIO pins + GND | zoom, shutter sync mode, fps presets | !SPDT toggle switch | | Rotary encoders | two GPIO pins (+ button pin) + GND | stepping ISO, shutter angle, fps, WB | !Rotary encoder | | Potentiometers | a Grove Base HAT analog port | dials for ISO, shutter angle, fps, WB | !Panel-mount potentiometer | | Grove Base HAT | GPIO header | analog inputs for potentiometers | !Grove Base HAT | | Adafruit quad rotary encoder | I²C (STEMMA QT or SDA/SCL pins) | four dials and push buttons in one module | !Adafruit quad rotary encoder | | CFE Hat | PCIe (Raspberry Pi 5 only) | fast storage (CFexpress Type B) | !CFE Hat | | LEDs | a GPIO out pin + GND, via a resistor | rec tally lamp | !5mm LED | | Resistor | in series with an LED | limits the LED's current; 220 Ω is a good value | !220 Ω resistor | | I²C OLED display | I²C (SDA/SCL pins) | status screen: ISO, timecode, space left | !SSD1306 OLED display | | Real-time clock | I²C (SDA/SCL pins) | keeps the clock across a power cycle, Pi 4 only | !DS3231 real-time clock module |
Physical controls are mapped in settings.jsonc. CineMate uses BCM pin numbering — the GPIO n labels, not the physical pin positions. Full reference: Additional hardware.
Camera stack

Installation
There are three options for installing CineMate:
1. Use the prebuilt image file
See the releases section for the preinstalled image and Quick Start Guide.
2. Clone the repo and run the one-click installer
Start from a fresh Raspberry Pi OS Lite Bookworm image. SSH to the Pi (Terminal on macOS, PowerShell on Windows):
ssh [email protected]
Replace pi with the username configured in Raspberry Pi Imager if you used a different user. If raspberrypi.local does not resolve, use the Pi's IP address instead:
ssh pi@<pi-ip-address>
sudo apt update
sudo apt install -y git
git clone https://github.com/Tiramisioux/cinemate.git
cd cinemate
chmod +x cinemate-install.sh
./cinemate-install.sh
The installer defaults to an imx477 on camera port cam0 and writes a stock-style managed /boot/firmware/config.txt section with camera options for IMX477, IMX296, IMX283, IMX585 color, and IMX585 mono (sensors and frame rates). The IMX283 and IMX585 drivers are installed either way, so you can install with the defaults and then pick your sensor in the browser, on the settings editor's config.txt tab.
Naming the sensor up front still matters in two cases: imx585_mono also applies the rp1-cfe kernel patch that mono 16-bit ClearHDR needs, and imx585 also installs the IR filter helper. Neither happens when you switch sensor in the browser later.
After installing, reboot the system and CineMate should start automatically.
3. Manual install
For the full manual install, configuration steps, and CLI reference, please see the documentation/manual installation steps.
First run

The live preview at
cinepi.local:5000, full size. Frame rate, shutter, exposure, EI, white balance and the sensor mode across the top; media space, write speed, buffer fill, CPU and temperature across the bottom. Tap the picture to start and stop recording.
After boot, the HDMI monitor shows the live preview with the camera GUI. To use a phone or laptop instead:
- Join the Pi's Wi-Fi hotspot CinePi (password
11111111). - Open
cinepi.local:5000— live preview and controls. Tap the preview to start and stop recording. A clean feed without the GUI is atcinepi.local:8000/stream, and the settings editor atcinepi.local:5000/settings-editor. - Attach a drive formatted
exFAT(orext4) and labelledRAW. - For a physical record button, wire a momentary button between GPIO7 and GND.

The live view and experimenting drawer for camera functions, at
cinepi.local:5000/settings-editor/#live. Frame rate, shutter, exposure, EI, white balance and the sensor mode across the top; media space, write speed, buffer fill, CPU and temperature across the bottom. Tap the preview to start and stop recording. The drawer underneath puts ISO, shutter, frame rate and white balance on sliders, with the ClearHDR knobs below them.
See the Quick start for the full walkthrough.
Customization
GPIO buttons and switches, rotary encoders and oled display for controlling camera settings such as recording, iso etc. are configured in the~/cinemate/settings.jsonc file. On the Pi, type editsettings in the terminal to open this file, or use the settings editor at cinepi.local:5000/settings-editor from a browser.

The settings editor's GPIO in pane, at
cinepi.local:5000/settings-editor/#gpio-in. One row per wired pin: the gesture on the left — press, single, double or triple click, hold, or a switch's on and off — and the command it runs on the right. Buttons, two- and three-way switches and rotary encoders are added from the buttons underneath; an I²C quad rotary board appears as its own four encoders.
The settings editor
The same browser page carries the rest of the camera, at cinepi.local:5000/settings-editor. Its panes, in the order the tab bar shows them:
Documentation
Full manual installation instructions, configuration guides in the documentation.Community
Join the CinePi Discord for discussions and sharing builds.
Acknowledgements
The CineMate stack is built on top of several open-source projects. Special thanks to all authors!
- CinePi-raw – Csaba Nagy
- IMX585 and IMX283 drivers – Will Whang
- libcamera – Ideas on board
- cpp-mjpeg-streamer – Nadjieb Mohammadi
- lgpio – Joan
- PiShrink - Drew Bonasera
Get your sensors and CFE Hats here: https://www.tindie.com/stores/will123321/