Release of ESP-KVM 0.51.0, an open source IP-KVM firmware with screen recording to microSD

ESP-KVM 0.51.2, an open-source firmware that turns an ESP32-P4 microcontroller board into an IP-based KVM with browser-based access to a remote computer's screen, keyboard, and mouse, without installing an agent on the target machine, has been released. The code is written in C and distributed under the Apache 2.0 license. The main change in this release is the ability to record the target's screen activity to the device's microSD card.

Recording is started with a button in the web interface and saved to the VIDEO directory as .ts files with H.264 video. The device records the same stream it delivers to viewers, so re-encoding is not required: on the Espressif ESP32-P4 Function EV board, the frame rate during recording remained at 21-22 fps without loss when playing back on the target machine. The .ts file plays in VLC and mpv, and if interrupted by removing the card or powering off, it continues playing until the end. Long recordings are divided into 10-minute files and stop after an hour; both values ​​are configurable. A separate button saves a screenshot in JPEG format to the SCREENSHOTS folder, even when the H.264 codec is enabled: the idle hardware JPEG encoder is used to capture the screenshot.

Keystrokes and mouse clicks can be recorded in an .srt subtitle file next to the video, as strings such as "Typed: root," "Ctrl+Alt+Delete," and "Left click (812, 440)." By default, typed text is replaced with periods; the full text can be saved if desired. The layout is taken from the target keyboard settings.

A dashcam mode has been added, working on the same principle as a car dashcam: the device continuously monitors the last few minutes of screen time and saves them along with subsequent seconds when something happens—the screen turns solid (typical for an emergency stop screen), a monitored phrase appears, the ATX power indicator goes out, or the operator presses a button. The resulting video is converted to MP4 with chapters for each event, and if notifications are enabled, it is sent to Telegram as a video played in the chat.

There are two ways to store the past: in the PSRAM, where it takes up no space on the card until the event occurs, or on the card itself in short fragments with obsolete ones deleted. The second method also works on boards with a chip revision up to 3.0, where after launching the H.264 encoder, about 3 MB of free PSRAM remains, compared to 11 MB on newer revisions.

A timelapse mode has been added: one frame is saved every specified number of seconds, and playback is at 25 frames per second, so an hour of recording at 10-second intervals can be captured in 14 seconds of video. Recordings and photos are organized in a separate interface panel, where they can be downloaded, deleted, and played without first downloading the entire file. MP4 files are opened with the browser's built-in player, while .ts files are parsed into frames in the console and decoded by the same H.264 decoder as the live video, with rewind and subtitles. HTTP range support is implemented for device-side rewinding.

On-screen text search has been implemented. While recording, the device reads the screen as a character set every three seconds and saves what it reads to a file next to the video. In the recording panel, a phrase search shows when it was on-screen and plays the recording from that point. Only screens generated by the character generator are read—the BIOS, boot menu, setup program, and console.

Recording, time-lapse, and screenshots can be launched from device scenarios ("record 300," "timelapse 60," "screenshot") and from Home Assistant, which has a switch and buttons for this. The device's clock is now synchronized via NTP, and the time zone can be selected from a list of cities in the settings—previously, it was stored in a section hidden from the interface.

Other changes in releases after 0.45.0:

  • 0.46. Builds for the VIEWE ESP32-P4-Pi and Waveshare ESP32-P4-NANO-WIFI6-DB boards have been added. The firmware is now built with -O2 optimization, small memory allocations have been moved to PSRAM, and a frozen task now causes a reboot with a dump.
  • 0.47. Runbooks are now available—macros that can wait for a phrase to appear or disappear on the text screen and are executed on the device itself when the browser is closed. Scripts in DuckyScript format are now accepted. A scheduler with cron syntax and notifications to Telegram (with screenshots) or webhooks have been added.
  • 0.48. The microSD card and WiFi module now work simultaneously—previously, both used the same SDMMC slot.
  • 0.49. The microSD card on the Function EV and Waveshare ESP32-P4-ETH boards now operates at a bus frequency of 40 MHz instead of 4 MHz (reading approximately 9 MB/s, writing approximately 4 MB/s): the slot's power lines were not powered by the integrated regulator. Image loading via the web interface has been accelerated by approximately 50 times, to 3,5 MB/s over Ethernet. Keyboard mode has been added for older BIOSes—the target machine now sees a single device at USB 1.1 speed, excluding a mouse or storage device. The device now reports if HDMI mode exceeds the bandwidth of two MIPI CSI lanes.
  • 0.49.1. Reading speeds from the virtual drive by the target machine have been accelerated from 5,6 to 9 MB/s by reading from the card in 256 KB blocks. Image changes are now visible to the target machine without reconnecting the USB.
  • 0.50. The microSD card can be swapped while the device is running, even if removed mid-copy: the slot is checked every five seconds. Fixed a delay in MJPEG that caused the browser to display the frame preceding the last keystroke on a stationary screen.

Source: opennet.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster