TinyPilot Turns a Raspberry Pi Into a Low-Cost HDMI IP KVM for Browser-Based Headless Server Access

Deployable via Ansible, TinyPilot turns any Raspberry Pi with a low-cost USB HDMI capture dongle into a low-latency IP KVM.

Gareth Halfacree
4 years agoCommunication / Displays
A cheap HDMI capture dongle, a Raspberry Pi, and some clever software make a high-performance IP KVM. (📷: Michael Lynch)

Developer Michael Lynch has written up a guide to building a networked keyboard, video, and mouse switch capable of operating as a "lights-out" remote access system for under $100 in parts — including the Raspberry Pi which hosts it.

"TinyPilot is my inexpensive, open source device for controlling computers remotely. It works even before the operating system boots, so I use TinyPilot to install new OSes and debug boot failures on my bare metal homelab servers," Lynch explains of the project. "Friends have raved to me about their experience with iDRAC. It’s a chip in Dell servers that provides a virtual console from the moment the system powers on. I briefly considered an iDRAC for my next home server, but its hefty price tag quickly put an end to that. The license alone costs $300, and it requires expensive custom hardware."

"Next, I looked at commercial KVM over IP solutions. They provide similar functionality to Dell’s iDRAC, but they’re external devices that connect to a computer’s keyboard, video, and mouse ports (hence the name KVM). Sadly, they’re even more expensive, ranging in price from $500 to $1,000 per unit."

The solution: A Raspberry Pi single-board computer, available for under $30 depending on model, coupled with a low-cost USB-connected HDMI capture device — an IP-based HDMI "extender" having been previously found to work as a standalone option, but with a near-one-second delay making interaction painful.

Fresh out-of-the-box, the USB HDMI dongle connected to the Raspberry Pi appeared even worse with a latency of up to ten seconds — but a switch to uStreamer fixed that. "uStreamer reduced my latency from 10 seconds down to ~600 milliseconds. That was a huge leap forward but still a noticeable delay. I told Max [Devaev] I was interested in funding uStreamer further if he could find ways to improve performance, so we got to chatting."

"The HDMI dongle was delivering the video stream in Motion JPEG format! uStreamer’s hardware-assisted encoding was fast, but it was totally unnecessary, as modern browsers play Motion JPEG natively. We configured uStreamer to skip re-encoding and just pass through the video stream as-is. Latency went from 600 milliseconds all the way down to 200 ms."

With video capture and streaming sorted, TinyPilot was born by adding a web interface to what was previously known as Key Mime Pi. Now, Lynch — and anybody else willing to invest a small amount of money in the parts and run the open source, MIT-licensed TinyPilot software — can access his headless servers remotely with near-native performance.

The full guide is available on Lynch's blog; a dedicated TinyPilot website offers parts bundles with the Raspberry Pi, HDMI capture device, and optional passively-cooled chassis — though the kits are on a ten-business-day lead time at present. A GitHub repository holds both the TinyPilot software itself and an Ansible role for easy deployment.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles