Release of ESP-KVM 0.51.0, the open firmware for IP-KVM, with screen recording to microSD

The release of ESP-KVM 0.51.2 has been published, an open firmware that turns the ESP32-P4 microcontroller board into an IP-KVM providing access to the screen, keyboard, and mouse of a remote computer through a browser, without the need to install an agent on the managed machine. The code is written in C and distributed under the Apache 2.0 license. The main change in this release is the recording of the target screen's content onto the device's microSD card.

Recording is activated by a button in the web interface and saved in the VIDEO directory as .ts files with H.264 video. The device records the same stream it delivers to viewers, so re-encoding is unnecessary: on the Espressif ESP32-P4 Function EV board, when playing video on the target machine, the frame rate during recording remained at 21-22 frames per second without loss. The .ts file can be played in VLC and mpv, and if interrupted by removing the card or power loss, it opens up to the moment of the interruption. Long recordings are split into 10-minute files and stop after an hour; both values are adjustable. A separate button allows saving a screenshot in JPEG format in the SCREENSHOTS folder, including when using the H.264 codec: a dormant hardware JPEG encoder is utilized for the screenshot.

Keystrokes and mouse clicks can be recorded in a .srt subtitle file alongside the video — formatted as lines like 'Typed: root', 'Ctrl+Alt+Delete', 'Left click (812, 440)'. By default, the typed text is replaced with dots; it can be fully preserved if necessary. The layout is taken from the settings of the target keyboard.

A DVR mode has been added, functioning similarly to a car DVR: the device continuously keeps the last minutes of the screen and saves them along with subsequent seconds when something occurs — the screen goes solid (characteristic of a crash stop screen), a monitored phrase appears, the ATX power indicator dims, or the operator presses a button. The resulting video is converted to MP4 with chapters for each event, and when notifications are enabled, it is sent to Telegram as a playable video in chat.

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

A timelapse mode has been introduced: one frame is saved every specified number of seconds, replaying at a speed of 25 frames per second, so an hour of work with a 10-second interval fits into 14 seconds of video. Recordings and snapshots are gathered in a separate panel of the interface, from which they can be downloaded, deleted, and played back without initially loading the entire file: MP4 opens in the browser's default player, while .ts is parsed into frames in the console itself and decoded by the same H.264 decoder used for the live image, with rewind and subtitle display. For rewinding on the device side, HTTP range support has been implemented.

Text search on the screen has been implemented. During recording, the device reads the screen as a set of characters every three seconds and saves the read content to a file next to the video; in the recordings panel, searching by phrase shows when it was on the screen and replays from that moment. Only screens drawn by the character generator are read — BIOS, boot menu, installation program, console.

Recording, fast capture, and screenshot can be triggered from device scripts ("record 300", "timelapse 60", "screenshot") and from Home Assistant, where there is a switch and buttons for this. The device's clock is now synchronized via NTP, and the time zone is selected from a list of cities in the settings — previously it was stored in a section that the interface did not display.

Other changes in releases that came after 0.45.0:

  • 0.46. Builds have been added for VIEWE ESP32-P4-Pi and Waveshare ESP32-P4-NANO-WIFI6-DB boards. The firmware is now being compiled with optimization -O2, minor memory allocations have been moved to PSRAM, and a hanging task now leads to a reboot while saving the dump.
  • 0.47. Runbooks have been introduced — macros that can wait for the appearance or disappearance of a phrase on the text screen and execute on the device with the browser closed; scripts are accepted in DuckyScript format. A scheduler with cron syntax and notifications to Telegram (with a screenshot) or to a webhook have been added.
  • 0.48. The microSD card and WiFi module now work simultaneously — earlier both used the same SDMMC slot.
  • 0.49. The microSD card on Function EV and Waveshare ESP32-P4-ETH boards operates at a bus speed of 40 MHz instead of 4 (reading around 9 MB/s, writing around 4 MB/s): the power lines of the slot were not powered from the built-in regulator. Loading images via the web interface has been accelerated approximately 50 times, up to 3.5 MB/s over Ethernet. A keyboard mode for legacy BIOS has been added — the target machine sees a single device at USB 1.1 speed, without a mouse and storage. The device reports if the HDMI mode exceeds the bandwidth of two MIPI CSI lines.
  • 0.49.1. Reading from the virtual storage by the target machine has been sped up from 5.6 to 9 MB/s due to block reading from the card in 256 KB chunks. Changing the image is now visible to the target machine without having to reconnect USB.
  • 0.50. The microSD card can be swapped while the device is running, even if removed in the middle of copying: the slot is checked every five seconds. The MJPEG delay has been fixed, which previously caused the browser to display a frame preceding the last key press on a static screen.

Source: opennet.ru

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