Turn a Kinect V2 sensor into a small RTSP camera. This tool reads color, infrared and audio from a Kinect V2 and publishes them as RTSP streams using GStreamer.
This project is part of a larger effort to build a baby-monitoring system using the Kinect V2 sensor.
Platform: Windows x64 only.
- Kinect RTSP (Kinect V2 → RTSP) 🎥📡
- Table of contents
- Prerequisites
- CLI options
- Quick start
- RTSP URLs 📡
- Troubleshooting 🧰
- Development notes 🛠️
- Contributing
- License
- Acknowledgements
- Kinect for Windows SDK 2.0.
- GStreamer MSVC x86_64 runtime — ensure the
bindirectory of the runtime is onPATH.
--username <username>Optional RTSP Basic Auth username.--password <password>Optional RTSP Basic Auth password.--port <port>RTSP server port (default:8554).
- Install prerequisites.
- Build the release binary:
cargo build --release- Run the server:
# start without auth on default port 8554
.\target\release\kinect-rtsp.exe
# start with Basic Auth and custom port
.\target\release\kinect-rtsp.exe --username alice --password s3cret --port 8554- Open a client (VLC, ffplay, etc.) and open one of the RTSP URLs listed below.
When the server starts it will log RTSP URLs. Typical examples:
- rtsp://localhost:8554/color
- rtsp://localhost:8554/infrared
If Basic Auth is enabled the client will be prompted for credentials (or you can use an authenticated URL):
- rtsp://alice:***@localhost:8554/color
-
Kinect device is not available:
- Ensure the Kinect sensor is connected and powered.
- Verify Kinect SDK 2.0 is installed and device appears in Windows Device Manager.
- Try rebooting after SDK installation.
-
GStreamer errors or missing plugins:
- Confirm you installed the MSVC x86_64 GStreamer runtime, not the MinGW variant.
- Make sure the runtime
binfolder is onPATH(see installation tip above). - Run the binary from an elevated PowerShell if you face permission issues.
-
Client can't open the stream:
- Try
ffplayto rule out client issues:ffplay rtsp://localhost:8554/color - Check application logs — the program prints pipeline and RTSP server status on startup.
- Try
-
The program spawns three GStreamer pipelines (color, infrared and audio) and publishes them with
appsrcto a local RTSP server. -
See
src/main.rsfor startup flow and CLI flags. Other key files:src/color.rs— color pipeline handlingsrc/infrared.rs— infrared pipeline handlingsrc/audio.rs/src/audio_frame_buffer.rs— audio capture and bufferingsrc/rtsp_publisher.rs— GStreamer RTSP server wiring
-
To increase GStreamer logging during development:
# set verbose GStreamer debug output for current session
$env:GST_DEBUG = "*:3"
cargo runContributions, bug reports and PRs are welcome. Please:
- Open an issue describing the problem or feature.
- Create a small, focused PR with tests or reproduction steps when possible.
- Keep changes Windows-friendly and document any new external requirements.
MIT — see LICENSE.
- Microsoft Kinect for Windows SDK 2.0
- GStreamer project