Skip to content
lifescreen-recorderPublic

Latest commit

ย 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LifeScreen Cat Mascot & App Icon

๐ŸŽฌ LifeScreen

Ultra-Low Overhead Zero-Copy Screen & Game Recorder in Zig

Zig Platform DirectX FFmpeg License: GPL v3

[!WARNING]

โš ๏ธ Alpha Version Warning / ะŸะพะฟะตั€ะตะดะถะตะฝะฝั ะฟั€ะพ ะะปัŒั„ะฐ-ะฒะตั€ัั–ัŽ

LifeScreen is currently in early ALPHA (v0.3.0-alpha).
Expect experimental features, rapid changes, and potential bugs or hardware-specific edge cases.
We actively welcome feedback! If you run into any issues, freezes, or glitches, please open an issue on our GitHub Issues page.

LifeScreen is an ultra-lightweight, hardware-accelerated desktop and 3D game recording utility crafted from scratch in Zig and C/C++. Engineered with a strict Zero-Copy GPU architecture and lock-free thread synchronizations, LifeScreen records your screen at up to 240 FPS while consuming virtually zero measurable CPU and keeping in-game frame rates smooth and stutter-free.

Key Features โ€ข Competitive Comparison โ€ข Architecture โ€ข Getting Started โ€ข Tech Stack โ€ข License


โšก Why LifeScreen? (Comparison with Others)

Most existing recorders (OBS Studio, ShadowPlay, Bandicam, Xbox Game Bar) were either built around broad broadcasting/streaming needs, locked to specific proprietary GPUs, or carry multi-gigabyte memory footprints and rendering pipelines that starve CPU and GPU caches during competitive gaming.

Feature / Metric ๐ŸŽฌ LifeScreen ๐ŸŽฅ OBS Studio ๐ŸŸข NVIDIA ShadowPlay ๐ŸŽฎ Xbox Game Bar
Primary Language Zig + C11 / C++17 (Pure native) C++ / Qt6 C++ / Proprietary C# / UWP / WinRT
Executable Footprint ~25 MB (Self-contained) ~450 MB โ€“ 1.2 GB ~800 MB (GeForce Experience) Built-in Windows bloat
Idle Memory (RAM) ~28 MB ~250 MB โ€“ 600 MB ~180 MB ~150 MB โ€“ 300 MB
Gaming FPS Impact < 1โ€“2% (Zero lock contention) 5โ€“15% (Scene graph re-render) 2โ€“4% 5โ€“12%
Integrated GPU Support Full hardware QSV / AMF / NVENC Yes, but heavy scene compositor NVIDIA GeForce GPUs only Generic, prone to micro-stutters
GPU Texture Pipeline Direct Zero-Copy Staging (Immediate Unmap in <0.2ms) Compositor Render Target pass Private NVFBC / NVENC hook DWM shared compositor
Mouse Cursor Quality Dual-Pass True Alpha Reconstruction (Always crisp) Standard GDI / Texture overlay Hardware cursor OS pointer overlay
Audio Mixing Hardware WASAPI Loopback + Mic Track 0 Universal Mix Complex multi-source bus System + Mic Basic OS mixer
Crash Protection Live Matroska (MKV) Stream Muxing MKV / MP4 MP4 (Can corrupt on crash) MP4 (Prone to corruption)
Startup Time Instant (~0.1s) 2.5s โ€“ 6s Background daemon ~2s โ€“ 4s

๐ŸŒŸ Key Features

  • ๐ŸŽ๏ธ Microsecond-Fast GPU Staging Pipeline:
    • Employs a 4-stage asynchronous staging ring buffer with D3D11_MAP_FLAG_DO_NOT_WAIT.
    • Staging textures are mapped, copied via direct SIMD pointer streaming, and unmapped immediately in under 0.2 milliseconds. The GPU DirectX 11 lock is never held during video encoding, completely eliminating micro-stutters in heavy 3D titles like Counter-Strike 2, Valorant, and Cyberpunk 2077.
  • ๐ŸŽฎ Three Specialized Capture Modes:
    1. Full Display (DXGI Desktop Duplication): Real-time high-throughput capture for multi-monitor rigs.
    2. Single Window (Windows Graphics Capture - WGC): Zero-copy window recording that continues capturing even if occluded or behind other apps, with the yellow privacy border automatically disabled.
    3. High-Performance Game Hook (lifescreen_hook64.dll): Intercepts IDXGISwapChain::Present directly inside 64-bit DirectX 11/12 engines and shares textures via D3D11_RESOURCE_MISC_SHARED.
  • ๐Ÿญ Crisp & Glitch-Free Cursor Blitting:
    • Implements a dual-pass black/white luminance test that accurately resolves transparent, semi-transparent (Aero shadow), and inverted monochrome Windows mouse cursors without tearing or missing borders.
    • Full Per-Monitor DPI Awareness V2 ensures physical 1:1 pixel alignment across all desktop display scaling factors (100%, 125%, 150%, 200%).
  • ๐ŸŽ™๏ธ Universal Dual-Track Audio Architecture:
    • Track 0 (Universal Mix): Combined Master Sound (System Audio + Microphone) for instant playback on phones, Discord, Telegram, QuickTime, and web players.
    • Track 1 & 2 (Clean Isolated Stems): Independent uncompressed audio streams for professional multi-track editing in DaVinci Resolve, Adobe Premiere Pro, and Final Cut.
    • Hardware WASAPI loopback capture with dynamic soft-clipping volume boost (up to 150% System, 200% Mic) and real-time dual animated VU meters.
  • ๐Ÿ“ Integrated Ultra-Fast Downscaling:
    • Zero-overhead 16.16 fixed-point SIMD bilinear downscaler for 720p/1080p recording on entry-level laptops and integrated GPUs (Intel UHD / Iris Xe / AMD Radeon Vega).
  • ๐Ÿ–ฅ๏ธ Modern Fluent Dark UI:
    • Built with Dear ImGui + Direct3D 11.
    • Zero scrollbars, responsive proportion-scaled cards, telemetry stats (FPS, Dropped Frames, File Size, Bitrate, Timer), and instant English / Ukrainian language switching.

๐Ÿ—๏ธ Zero-Copy Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        CAPTURE SOURCES (60 - 240 FPS)                  โ”‚
โ”‚                                                                        โ”‚
โ”‚   [DXGI Desktop Duplication]     [Windows Graphics Capture]    [Game Hook DLL] 
โ”‚        (Full Desktop)                  (Target Window)         (IDXGISwapChain)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜
                     โ”‚                       โ”‚                       โ”‚
                     โ–ผ                       โ–ผ                       โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚            GPU Direct3D 11 Surface Texture            โ”‚
             โ”‚             (ZERO-COPY in VRAM Memory)                โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                         โ”‚
                                         โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚      4-Stage Non-Blocking Asynchronous Ring Buffer     โ”‚
             โ”‚      - D3D11_MAP_FLAG_DO_NOT_WAIT (Zero GPU stalls)   โ”‚
             โ”‚      - Immediate Unmap (<0.2ms D3D lock hold)         โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                         โ”‚
                                         โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚          Hardware Video Encoder (GPU ASIC)            โ”‚
             โ”‚    Intel QSV  |  NVIDIA NVENC  |  AMD AMF  |  x264    โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                         โ”‚
                                         โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚               MKV / MP4 Container Muxer               โ”‚
             โ”‚         Crash-Resilient Live Matroska Stream          โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Getting Started

Prerequisites

  • OS: Windows 10 (Build 19041+) or Windows 11 x64
  • Toolchain: Zig 0.17.0
  • GPU Drivers: Recent NVIDIA, AMD, or Intel graphics drivers with hardware video encoding support

1. Clone the repository

git clone https://github.com/your-username/LifeScreen.git
cd LifeScreen

2. Build the project

zig build

The compiled binaries will be placed in zig-out/bin/:

  • lifescreen.exe โ€” The main recorder executable
  • lifescreen_hook64.dll โ€” DirectX game injection library
  • FFmpeg 9.0 shared runtime libraries

3. Run unit tests

zig build test --summary all

4. Launch LifeScreen

.\zig-out\bin\lifescreen.exe

โŒจ๏ธ Global Shortcuts

Action Shortcut
Start / Stop Recording F9 (or Ctrl + Shift + R)
Pause / Resume Recording F10 (or Ctrl + Shift + P)

โš™๏ธ Technical Specifications

  • Capture APIs: Direct3D 11.1, DXGI 1.2 Desktop Duplication, Windows.Graphics.Capture WinRT COM, WASAPI Loopback Audio
  • Video Codecs: H.264 / AVC, HEVC / H.265, AV1
  • Hardware Backends: Intel QuickSync Video (QSV), NVIDIA NVENC, AMD Advanced Media Framework (AMF), Software libx264/libx265
  • Audio Codec: AAC-LC (192 kbps per stream, 48 kHz stereo)
  • Container Formats: Matroska (.mkv), MPEG-4 (.mp4), QuickTime (.mov)
  • Color Format: Rec.709 BT.709, Limited (Broadcast) & Full Range (PC)

๐Ÿ“„ License

LifeScreen is free and open-source software licensed under the GNU General Public License v3.0 (GPL-3.0).

Engineered with precision in Zig & C++ for gamers, creators, and professionals.

Releases

Packages

Contributors

Languages