Back to projects

RPV

Rust FPV system for Raspberry Pi — low-latency H.264 over raw 802.11

Completed2026Robotics
Latency50-100 ms
Bandwidth3-5 Mbps
Range100-500 m
Releasev0.1.0

A low-latency FPV video system for drones, written entirely in Rust. Streams H.264 video, bidirectional MAVLink telemetry, and RC control between a Raspberry Pi camera (air side) and a Raspberry Pi ground station over raw 802.11 monitor mode.

Architecture

The system is split into two binaries. rpv-cam runs on the drone's Pi 5, capturing H.264 via rpicam-vid or ffmpeg, fragmenting NAL units, applying Reed-Solomon 4+2 forward error correction, and transmitting over raw 802.11 broadcast frames. It communicates with the flight controller via MAVLink serial (UART 115200) for telemetry and RC override. rpv-ground runs on the ground station Pi 5, performing FEC reassembly with out-of-order tolerance, H.264 decoding via libavcodec, GPU-accelerated YUV-to-RGB conversion via a custom WGSL shader on wgpu, and rendering a fullscreen OSD with link status, FPS, RSSI, battery, GPS, and attitude.

Protocol

All communication uses an 8-byte L2 header (magic, drone ID, payload type, sequence number) over raw 802.11 QoS Data broadcast frames at 24 Mbps — no IP stack required. Video is sent as Reed-Solomon 4+2 groups (6 shards per block, tolerant of 2 lost shards). RC commands are sent at 50 Hz with 16 channels. Heartbeat at 10 Hz is the sole authority for link state transitions (Searching, Connected, SignalLost, NoCamera). Three transport modes are supported: raw 802.11 (no IP), TCP (recommended, handles reconnection), and UDP (lowest latency).

Deployment

Systemd services with SCHED_FIFO real-time scheduling handle automatic monitor-mode setup and teardown. CPU pinning assigns the RX dispatcher to core 0 and video capture to core 1. Configurable resolution (up to 4096×2160), framerate (24–60 FPS), and bitrate. RC failsafe releases override after 500 ms (MAVLink path) or 2 s (file path).

Tech Stack
fpvraspberry-pih264mavlinkrcfecraw-80211