JetKVM - Control any computer remotely
kvm
Go to file
Alex P 9d86b02e66 Integrate libspeexdsp for high-quality audio resampling
Replace ALSA plugin layer resampling with libspeexdsp for improved audio
quality and reliability. This implementation uses direct hardware access
(hw:) instead of ALSA plugins (plughw:) and handles sample rate conversion
with SpeexDSP's high-quality sinc-based resampler.

Key changes:
- Add libspeexdsp 1.2.1 with ARM NEON optimizations to build dependencies
- Switch from plughw: to hw: device access for lower latency
- Implement conditional resampling (only when hardware rate ≠ 48kHz)
- Use SPEEX_RESAMPLER_QUALITY_DESKTOP for high-quality interpolation
- Add automatic audio dependency building in dev_deploy.sh

Quality improvements:
- Fix race condition in resampler cleanup with mutex protection
- Fix memory leak on resampler re-initialization
- Add buffer overflow validation (3840 frame limit for 192kHz)
- Improve error logging for resampling, encoding, and ALSA configuration
- Simplify code structure while maintaining all functionality

Technical details:
- Hardware negotiates actual sample rate (e.g., HDMI may vary)
- SpeexDSP converts hardware rate → 48kHz for Opus encoding
- USB Audio Gadget hardcoded to 48kHz (no resampling overhead)
- Static buffer allocation for zero allocation in hot path
- WebRTC requires 48kHz RTP clock rate per RFC 7587
2025-11-21 16:29:02 +02:00
.devcontainer Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
.github Clean up redundant comments for maintainability 2025-11-18 01:48:45 +02:00
.vscode feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
bin Release 202412292127 2024-12-29 21:27:42 +01:00
cmd feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
internal Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
pkg feat: add remote IP address to connection stats sidebar (#944) 2025-11-11 12:00:37 +01:00
resource Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
scripts Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
ui Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
.gitignore Add log files and development artifacts to gitignore 2025-11-18 00:53:15 +02:00
.golangci.yml chore: revert golangci-lint config and remove audio stub 2025-10-24 01:31:06 +03:00
CODE_OF_CONDUCT.md Release 202412292127 2024-12-29 21:27:42 +01:00
DEVELOPMENT.md feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
Dockerfile.build [WIP] Updates: update build flows to work with the CGO jetkvm_native 2025-10-01 10:04:42 +03:00
LICENSE Release 202412292127 2024-12-29 21:27:42 +01:00
Makefile Fix comment inaccuracies and restore lint targets 2025-11-21 01:31:33 +02:00
README.md Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
audio.go Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
block_device.go chore/Deprecate browser mount (#752) 2025-08-28 23:46:55 +02:00
block_device_linux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
block_device_notlinux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
cloud.go feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
config.go Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
dc_metrics.go feat(metrics): adding prometheus metrics for dc power extension (#556) 2025-07-11 17:04:41 +02:00
dev_deploy.sh feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
display.go feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
failsafe.go feat: add failsafe reason for video max restart attempts reached (#991) 2025-11-20 17:32:54 +01:00
go.mod feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
go.sum feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
hidrpc.go feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
hw.go refactor: OTA (#912) 2025-11-19 15:20:59 +01:00
jiggler.go fix/Jiggler settings not saving (#786) 2025-09-09 14:48:49 +02:00
jsonrpc.go Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
log.go feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
main.go Merge branch 'dev' into feat/audio-support 2025-11-20 23:47:44 +02:00
mdns.go feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
native.go feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
network.go feat: add hostname change detection and reboot requirement in network settings (#989) 2025-11-20 16:36:02 +01:00
ota.go refactor: OTA (#912) 2025-11-19 15:20:59 +01:00
prometheus.go Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
publish_source.sh fix: Shell linting (#328) 2025-04-11 00:43:45 +02:00
serial.go [WIP] Cleanup: PR Cleanup 2025-09-20 01:38:16 +03:00
terminal.go [WIP] Updates: reduce PR complexity 2025-10-01 21:20:30 +03:00
timesync.go feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
usb.go Remove additional redundant comments 2025-11-18 02:01:12 +02:00
usb_mass_storage.go chore/Deprecate browser mount (#752) 2025-08-28 23:46:55 +02:00
version.go feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
video.go feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
web.go chore: clean up logger messaging 2025-11-07 13:21:38 +01:00
web_tls.go fix: ensure certStore is initialised when adding custom cert (#639) 2025-06-30 18:58:39 +02:00
webrtc.go Merge branch 'dev' into feat/audio-support 2025-11-20 23:47:44 +02:00
wol.go Add ability to track modifier state on the device (#725) 2025-08-26 17:09:35 +02:00

README.md

JetKVM is a high-performance, open-source KVM over IP (Keyboard, Video, Mouse) solution designed for efficient remote management of computers, servers, and workstations. Whether you're dealing with boot failures, installing a new operating system, adjusting BIOS settings, or simply taking control of a machine from afar, JetKVM provides the tools to get it done effectively.

Features

  • Ultra-low Latency - 1080p@60FPS video with 30-60ms latency using H.264 encoding. Smooth mouse and keyboard interaction for responsive remote control.
  • Free & Optional Remote Access - Remote management via JetKVM Cloud using WebRTC.
  • Open-source software - Written in Golang on Linux. Easily customizable through SSH access to the JetKVM device.

Contributing

We welcome contributions from the community! Whether it's improving the firmware, adding new features, or enhancing documentation, your input is valuable. We also have some rules and taboos here, so please read this page and our Code of Conduct carefully.

I need help

The best place to search for answers is our Documentation. If you can't find the answer there, check our Discord Server.

I want to report an issue

If you've found an issue and want to report it, please check our Issues page. Make sure the description contains information about the firmware version you're using, your platform, and a clear explanation of the steps to reproduce the issue.

Development

JetKVM is written in Go & TypeScript. with some bits and pieces written in C. An intermediate level of Go & TypeScript knowledge is recommended for comfortable programming.

The project contains two main parts, the backend software that runs on the KVM device and the frontend software that is served by the KVM device, and also the cloud.

For comprehensive development information, including setup, testing, debugging, and contribution guidelines, see DEVELOPMENT.md.

For quick device development, use the ./dev_deploy.sh script. It will build the frontend and backend and deploy them to the local KVM device. Run ./dev_deploy.sh --help for more information.

Backend

The backend is written in Go and is responsible for the KVM device management, the cloud API and the cloud web.

Frontend

The frontend is written in React and TypeScript and is served by the KVM device. It has three build targets: device, development and production. Development is used for development of the cloud version on your local machine, device is used for building the frontend for the KVM device and production is used for building the frontend for the cloud.