Skip to content
Guillermode20Public

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

LiteClip

License: MIT Rust

Lightweight Windows screen recorder that captures your best moments retroactively.

Features

  • Always-On Replay Buffer — Continuously records in RAM with zero disk writes until you save.

  • Hardware-Accelerated Encoding — First-class support for NVIDIA NVENC, AMD AMF, and Intel QSV with D3D11 zero-copy frame transport. Falls back to software encoding automatically.

  • Smart Audio Processing — AI-powered noise suppression (RNNoise), automatic loudness normalization, and Discord-style noise gate for clean voice capture.

  • Lossless Clip Editor — Built-in gallery with timeline scrubbing, multi-snippet trimming without re-encoding, and export to target file size.

  • Game-Aware Organization — Auto-detects fullscreen games and organizes clips by game name. No manual sorting needed.

  • Minimal Resource Footprint — Rust-powered with lock-free ring buffers, async I/O, and proactive memory management. Runs quietly in the system tray.

Quick Start

  1. Download and run the MSI from Releases
  2. LiteClip starts automatically in your system tray
  3. Hit Ctrl + Shift + S anytime to save the last 30 seconds as an MP4
  4. Press Ctrl + Shift + G to open the gallery and browse your clips

Screenshots

Gallery Settings Video Editor
Gallery Settings Video Editor

GPU Testing Needed

⚠️ Contributor Help Wanted ⚠️

LiteClip is developed and tested primarily on AMD GPUs. The NVIDIA NVENC and Intel QSV encoder paths have never been tested on real hardware by the maintainer. If you have an NVIDIA or Intel GPU, your help is critical — these paths may contain bugs that only surface on actual hardware.

Encoder Status Tested on What needs testing
AMD AMF ✅ Tested RX 6000/7000 series (RDNA/RDNA2/RDNA3) Working well — this is the reference implementation
NVIDIA NVENC ❌ Needs contributors Never tested on real hardware D3D11 shared device path, NVENC options (preset, tune, zerolatency), CBR/VBR/CQ rate control, forced IDR, b_ref_mode
Intel QSV ❌ Needs contributors Never tested on real hardware D3D11→QSV device derivation via av_hwdevice_ctx_create_derived, surface mapping via av_hwframe_map, oneVPL/Media SDK compatibility, iGPU and Arc dGPU

How to Help

  1. Build and run: Follow the build instructions
  2. Force your encoder: In settings, select NVENC or QSV (not Auto)
  3. Record a clip: Press Ctrl + Shift + S to save a 30-second clip
  4. Check logs: Run with $env:RUST_LOG = "debug,liteclip_core=trace" and look for unexpected CPU fallback warnings or errors
  5. Report results: Use the Hardware Encoder Test Report issue template

Even a simple "it works" or "it falls back to CPU" report is valuable. Include your GPU model, driver version, and log output.

See CONTRIBUTING.md for detailed testing checklists and per-vendor verification steps.

Hotkeys

Global hotkeys work even while gaming:

Action Default
Save clip Ctrl + Shift + S
Open gallery Ctrl + Shift + G
Toggle recording Ctrl + Shift + R

Configuration

Settings are stored at %APPDATA%\liteclip\config.toml and include:

  • Replay duration: 5-300 seconds of buffer
  • Video quality: Resolution, bitrate (1-150 Mbps), framerate (10-144 FPS)
  • Encoder: Auto-detect hardware or force software
  • Audio: Per-source volume, noise suppression toggle, mic selection
  • Hotkeys: Customize all bindings
  • Storage: Change save directory and file naming

See CONTRIBUTING.md for build instructions.

FFmpeg DLL Requirements

For development or running from source, FFmpeg 6.0+ shared DLLs are required:

Required DLLs:

  • avcodec-61.dll
  • avformat-61.dll
  • avutil-59.dll
  • swresample-5.dll
  • swscale-8.dll

Setup:

  1. Download FFmpeg 6.0+ shared libraries from gyan.dev or BtbN
  2. Extract the bin folder contents to ffmpeg_dev/sdk/bin/ in the project root
  3. The build script automatically copies DLLs next to the executable

The MSI installer includes these DLLs pre-bundled, so end users don't need to set this up manually.

AI Disclosure

This project was developed with assistance from AI coding tools, including code generation, refactoring suggestions, and documentation help. Human oversight and review was applied to all AI-assisted contributions.

Performance Optimizations

Build & Configuration

Sets target-cpu=native for CPU-specific instruction scheduling and lto=thin for link-time optimization. Cleans up dependencies (crossbeam→crossbeam-channel, optional ureq), adds per-crate dev profile optimizations for hot crates, uses hash-based DLL copy detection to skip redundant FFmpeg copies, and introduces real benchmarks replacing no-op GUI stubs.

Ring Buffer

Adds cache line padding to prevent false sharing between producer and consumer threads, relaxes atomic orderings from SeqCst to Acquire/Release inside the mutex, replaces binary search with an O(1) snapshot-from lookup via a Vec<bool> presence map, and switches internal locking to parking_lot::Mutex for lower contention.

DXGI Capture

Introduces a non-blocking texture pool that avoids recv_timeout stalls in the main capture loop, wires EMA-based backpressure signaling to throttle capture when downstream processing falls behind, uses AcquireNextFrame timeout for low-power idle detection instead of a polling sleep loop, sets the capture thread to BELOW_NORMAL priority, and drains stale NV12 views on reinit.

Audio Pipeline

Vectorizes the software mixer loop with explicit SIMD intrinsics for float processing, replaces the RNNoise Vec+head-index queue with a VecDeque to eliminate O(n) compaction overhead, sets capture threads to HIGHEST priority, converts the forward loop from per-sample writes to a drain-batch pattern, and switches RMS computation to f32 accumulators for lower instruction count.

Encoding Layer

Adds GPU vendor pre-check and D3D11 hardware context caching to avoid redundant device derivation across encoder re-initializations, reuses a pre-allocated mapped QSV frame to eliminate per-frame alloc/map/free cycles, replaces floating-point bilinear scaling with fixed-point integer arithmetic for zero FPU overhead, and streamlines packet pipeline and thread management.

Output/MP4

Caches calibration results across clips to skip redundant analysis on short recordings, hoists scaler/resampler/filter graph creation outside the packet range loop and switches to single-pass partition for lower latency, propagates codec type from EncodedPacket metadata, replaces DefaultHasher with FxHasher for thumbnail caching, and replaces HashMap routes with dense Vec arrays for stream dispatch.

License

MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages