FastScreenCapture 0.1.1 [ALPHA] β Ultra-Fast Uncompressed Screen Capture CLI & Global Hotkey Daemon for Java
β‘ Bit-perfect uncompressed screen grabs and direct 60 FPS video recording. Direct DirectX 11 DXGI GPU capture, zero GC pressure, direct RAM pipe to FFmpeg, and native system-wide hotkeys.
FastScreenCapture was born out of frustration while recording high-frequency 3D particle benchmarks for FastAnimation: standard tools like ShareX and the native Windows 11 Snipping Tool introduced heavy compression blur, frame drops, and severe moirΓ© interference on fine particle lines.
Instead of burning CPU on heavy compression or writing 30 GB of uncompressed bitmaps to the SSD, FastScreenCapture extracts pristine frames straight from DXGI Desktop Duplication and streams raw BGRA buffers directly into an optimized FFmpeg pipe β keeping CPU usage near 0% with zero dropped frames.
FastScreenCapture.bat --daemonRuns quietly in the background without UI lag or focus interruption:
[F9]: Toggle 60 FPS Video Recording (starts/stops lossless MP4 stream via FFmpeg pipe with instant+faststartplayback).[F10]: Instant Bit-Perfect Screenshot (uncompressed 32-bit BMP straight tograbs/).- Acoustic feedback: High tone (1200 Hz) confirms recording start; low tone (450 Hz) confirms recording stop.
FastScreenCapture.batCaptures the entire desktop at hardware resolution and writes a bit-perfect uncompressed .bmp into grabs/.
FastScreenCapture.bat --record 60 --fps 60 --out fastanimation_demo.mp4- Why FastScreenCapture?
- Key Features
- Real-World Use Cases
- Architecture & Pipeline
- Performance Benchmarks
- Installation
- Documentation
- Platform Support
- License
- Related Projects
Traditional capture tools are poorly suited for latency-critical tasks, high-frequency analysis, and bit-accurate image verification:
- Sluggish UI & Desktop Freezes: Snipping Tool and ShareX interrupt desktop interaction, causing UI stutter and focus drops.
- Forced CPU Compression Overhead: Enforcing PNG/JPEG encoding burns 20β100 ms of CPU time per frame and creates compression artifacts.
- Severe GC Stalls: Legacy Java capture tools allocate tens of megabytes per frame on the JVM heap.
FastScreenCapture bypasses these limitations:
- Direct DXGI Desktop Duplication: Raw GPU framebuffer extraction in <1 ms via
FastScreen. - Bit-Perfect 100% Raw BMP: Lossless uncompressed files instantly openable in any viewer or editor.
- Global Low-Latency Hooks: Instantaneous event response via
FastHotkey. - Zero JVM GC Allocations: Zero-copy off-heap memory path straight to disk.
- β‘ Instant Capture Throughput β Captures and commits full desktop frames in milliseconds.
- π― Bit-Perfect Quality β 100% uncompressed raw BGRA/ARGB data without lossy artifacts.
- β¨οΈ Global Native Hotkeys β Background daemon mode listening for
F1βF12orPrintScreen. - π Direct-to-Disk DMA β Streamlined Little-Endian BMP serialization bypassing OS memory bloat.
- π FastJava Synergy β Powered by
FastScreen,FastHotkey, andFastCore.
- β‘ Zero-Lag Screenshot Hotkey Daemon: Replace bloated screenshot utilities (ShareX, Windows Snipping Tool) with a background process that commits full-resolution desktop captures in <6 ms without UI pauses or window flashes.
- π― Bit-Exact Visual Regression & UI Testing: Capture pristine, 100% uncompressed frames during automated UI / rendering test suites (e.g., Selenium, JavaFX, OpenGL, Vulkan) where PNG compression artifacts or color subsampling would cause false positive diffs.
- ποΈ High-Speed Gameplay & Event Bursting: Burst-capture 5β60 consecutive uncompressed frames (
--burst 10) at full monitor refresh rates during rapid in-game action, physics anomalies, or micro-stutters. - π€ Dataset Generation for Vision & OCR Pipelines: Rapidly collect hundreds of raw screen patches per second without GPU/CPU encoding bottlenecks for training OCR, layout parsing, or object detection models.
- π Financial & High-Frequency Trading Telemetry: Archive pixel-accurate order book states, charts, and millisecond ticker snapshots without introducing thread latency to execution algorithms.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Windows OS Global Hotkey Daemon (FastHotkey) β
β [F10] Single Screenshot | [F9] Toggle Video β
ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β Instant Key Event (<0.1ms)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastScreenCapture Daemon Engine β
ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β Direct DXGI Extraction (<1ms)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastScreen β
β (DirectX 11 DXGI GPU Desktop Duplication) β
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββ
β β
[F10] Single Frame [F9] 60 FPS Stream
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
β FastBmpWriter β β Zero-Copy Direct Pipe (RAM) β
β (54-Byte Top-Down DIB Header) β β Direct Memory -> FFmpeg stdin β
ββββββββββββββββββββ¬βββββββββββββββββββ ββββββββββββββββββββ¬βββββββββββββββββββ
β Direct NIO Channel Write β Lossless H.264 +faststart
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
β Bit-Perfect Raw BMP β β Instant-Play 60 FPS MP4 β
β (NVMe Storage: grabs/*.bmp) β β (NVMe Storage: grabs/*.mp4) β
βββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
Measured on official JMH benchmark suite (run-benchmark.bat):
Benchmark Mode Cnt Score Error Units
Benchmark.benchmarkFastScreenCaptureBmpWriter thrpt 3 0.221 ops/ms
- Throughput: >220 full frames / sec uncompressed 32-bit (800Γ600) written directly to disk.
- Heap GC Pressure: 0 bytes temporary allocations on the JVM heap.
Measured during continuous 60-second real-time capture of the FastAnimation demo (1440Γ960 @ 60 FPS):
Metric Value Impact
DXGI Desktop Acquisition Latency < 0.8 ms Sub-millisecond frame availability
Direct Memory Pipe Write Latency < 0.3 ms Immediate transfer to encoder stdin
Sustained Stream Throughput 60.0 FPS 100% stable framerate, 0 dropped frames
Average Process CPU Overhead < 1.0 % Barely registers during intense 3D simulations
Disk I/O Churn 0 MB/s temp Zero intermediate disk writes; pure RAM pipe
Note
Environment & Setup: Measured on an 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (4C/8T), Windows 11 Home, OpenJDK 21 LTS. By bypassing both the JVM garbage collector and disk-caching bottlenecks, FastScreenCapture records smooth 60 FPS MP4 video while compute-heavy simulations run at full hardware speed.
| Class | Method | Return Type | Description |
|---|---|---|---|
FastScreenCapture |
recordVideo(String out, int x, int y, int w, int h, int sec, int fps) |
void |
Streams lossless 60 FPS video directly into an FFmpeg pipe without disk I/O bottlenecks (+faststart MP4). |
| Class | Method | Return Type | Description |
|---|---|---|---|
FastBmpWriter |
writeBmp(String path, int w, int h, int[] pixels) |
void |
Writes 32-bit ARGB/BGRA pixel array directly to uncompressed Windows BMP file (top-down DIB). |
FastBmpWriter |
writeDirectBgra(String path, int w, int h, ByteBuffer buffer) |
void |
Zero-Copy: Streams direct off-heap native buffer straight to disk via NIO FileChannel. |
| Switch | Long Option | Argument | Description | Default |
|---|---|---|---|---|
-c |
--cursor |
- | Renders the exact, active system cursor into the capture | false |
| - | --record |
[seconds] |
Direct lossless 60 FPS video recording via FFmpeg pipe | 60 |
| - | --fps |
<fps> |
Target recording frame rate | 60 |
-d |
--daemon |
- | Runs continuously in background (hotkeys: F9 Video, F10 Screenshot) |
false |
-k |
--hotkey |
<KEY> |
Screenshot hotkey in daemon mode (F1βF12, PRINTSCREEN) |
F10 |
-o |
--out |
<path> |
Custom output file path (.bmp or .mp4) |
grabs/grab_... |
-r |
--rect |
<x,y,w,h> |
Explicit capture region coordinates | Full screen |
-b |
--burst |
<count> |
Consecutive frame burst count | 1 |
-h |
--help |
- | Prints usage instructions and switches | - |
To enable high-speed direct-pipe video recording without disk I/O bottlenecks, FastScreenCapture requires FFmpeg. FastScreenCapture will automatically detect FFmpeg in your system PATH or in standard WinGet directories.
Install FFmpeg in one command via Windows Package Manager:
winget install Gyan.FFmpegAlternatively, download the official Windows build directly from gyan.dev/ffmpeg/builds (e.g. ffmpeg-release-essentials.zip) and add its bin folder to your system PATH.
Add the JitPack repository and the dependencies to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- FastScreenCapture Engine -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastScreenCapture</artifactId>
<version>0.1.1</version>
</dependency>
<!-- Underlying Native & Zero-Copy Hardware Engines -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastScreen</artifactId>
<version>0.1.4</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>fasthotkey</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastImage</artifactId>
<version>0.1.4</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastSIMD</artifactId>
<version>0.1.3</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastMemory</artifactId>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastPointer</artifactId>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastCore</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:FastScreenCapture:0.1.1'
implementation 'com.github.andrestubbe:FastScreen:0.1.4'
implementation 'com.github.andrestubbe:fasthotkey:0.1.0'
implementation 'com.github.andrestubbe:FastImage:0.1.4'
implementation 'com.github.andrestubbe:FastSIMD:0.1.3'
implementation 'com.github.andrestubbe:FastMemory:0.1.1'
implementation 'com.github.andrestubbe:FastPointer:0.1.1'
implementation 'com.github.andrestubbe:FastCore:0.1.0'
}- πΈ FastScreenCapture-0.1.1.jar (The CLI & Capture Engine)
- π₯οΈ FastScreen-0.1.4.jar (DirectX 11 DXGI Desktop Capture & Native Engine)
- β¨οΈ FastHotkey-0.1.0.jar (Low-Latency Win32 System Hotkeys)
- πΌοΈ FastImage-0.1.4.jar (Zero-Copy Frame Container & SIMD Filters)
- β‘ FastSIMD-0.1.3.jar (Vectorized SIMD Math Core)
- π§ FastMemory-0.1.1.jar (High-Performance Off-Heap Memory Manager)
- π FastPointer-0.1.1.jar (Zero-Overhead Direct Memory Pointer Bridge)
- βοΈ FastCore-0.1.0.jar (Mandatory Native Library & DLL Auto-Loader)
Important
FastScreenCapture requires all 8 JARs above on the classpath when running standalone without a package manager. All native .dll binaries are extracted and loaded automatically into RAM on first run by FastCore.
- PHILOSOPHY.md: The engineering rationale for uncompressed zero-latency captures.
- REFERENCE.md: Complete CLI switches and Java API reference.
- CHANGELOG.md: Full release history and version notes.
- ROADMAP.md: Upcoming features, 60+ FPS video streaming, and ecosystem milestones.
| Platform | Status |
|---|---|
| Windows 10/11 (x64) | β Fully Supported (DirectX 11 DXGI + Win32 Hooks) |
| Linux | π§ Planned |
| macOS | π§ Planned |
MIT License β See LICENSE for details.
- FastScreen β Ultra-Fast DirectX Screen Capture Engine
- FastAnimation β High-Performance Zero-GC 60/120 FPS Animation Engine
- FastCamera β Hardware-Accelerated Native Camera Capture & Streaming
- FastHotkey β Low-Latency Global System Hotkeys
- FastImage β SIMD-Accelerated Off-Heap Image Engine
- FastDWM β Native Windows Desktop Window Manager & VSync Engine
- FastSIMD β AVX2/AVX-512 Vectorized Math Acceleration
- FastPointer β Safe Zero-Overhead Direct Memory Pointer Bridge
- FastMemory β High-Performance Off-Heap Memory Buffers
- FastCore β Native Library Loader for Java
Part of the FastJava Ecosystem β Making the JVM faster. β‘