Native Windows capture and encoding app
Screen Recorder
Stable C++20 Windows screen recorder with WGC capture, D3D11, hardware-first H.264, WASAPI audio, camera overlay, HQ mode, and diagnostics.
A native Windows recorder focused on predictable local capture, hardware-first encoding, practical audio handling, and inspectable diagnostics.
Last updated:
Problem
Reliable Windows screen recording needs low overhead capture, synchronized audio/video output, useful diagnostics, and graceful fallbacks across different GPU and power states.
Solution
I built a native Win32/C++ recorder that captures the full screen through Windows Graphics Capture, encodes MP4 output with Media Foundation and Intel Quick Sync when available, records system audio through WASAPI, and writes per-session diagnostics beside each recording.
Tech stack
- C++20
- Win32
- Windows Graphics Capture
- D3D11
- Media Foundation
- Intel Quick Sync
- WASAPI
- CMake
- CPack
- GitHub Actions
Available artifacts
- GitHub repo
- Live documentation site
- Native Windows app
- CMake build
- CPack ZIP package
- GitHub Actions CI
- Per-session diagnostics
- MIT license
Architecture and how it works
- Win32 controller coordinates Windows Graphics Capture frames with D3D11 resources and recording state
- Media Foundation muxes hardware-first H.264 video and AAC audio into MP4, falling back when hardware encoding is unavailable
- WASAPI loopback, microphone gating, camera overlay preview, and local diagnostics run as bounded subsystems around the recording session
Engineering Decisions
Why I chose this stack
C++20, Win32, WGC, D3D11, Media Foundation, and WASAPI provide direct access to the Windows capture and encoding path without the overhead of a cross-platform shell.
What I handled myself
I built the capture controller, hardware-first encoder selection, audio loopback path, camera overlay preview, recording state machine, diagnostics writer, packaging flow, and website deployment.
Hardest technical problem
The hardest part was keeping capture, audio, camera preview, encoder state, and pause/resume timing aligned while still recovering cleanly from interrupted recordings.
Tradeoff I made
I optimized the default profile for low RAM and battery use at 848x480, with a separate HQ mode for users who explicitly want higher bitrate 1080p-capable output.
How I tested it
I validated CMake builds, CTest coverage, CI workflow behavior, MP4 packaging, diagnostics output, hardware and software encoder paths, audio capture, and partial-file recovery.
What I would improve in production
I would add broader GPU vendor profiling, signed installers, richer crash telemetry, more webcam fallback testing, and automatic release packaging for every tagged build.
Key features
- Full-screen capture through Windows Graphics Capture
- Hardware-first H.264 MP4 output with software fallback
- System audio capture, microphone noise gate, mute controls, and anti-ducking option
- Camera overlay, HQ mode, pause/resume, low-disk auto-stop, and orphaned partial-file recovery
Impact
Ships a lightweight native recording pipeline with default low-resource capture, optional 1080p HQ output, camera overlay, audio controls, orphaned partial-file recovery, and a public Netlify documentation site.
Challenges
- Balancing video quality with low resource use on battery-powered Windows machines
- Keeping diagnostic output useful without making normal recording setup noisy
What I learned
- Native capture apps need explicit recovery paths for interrupted finalization
- Per-session diagnostics make hardware encoder behavior much easier to debug
Future improvements
- Add signed installer distribution and automated release artifacts
- Profile additional GPU and webcam combinations for more predictable defaults
Screen Recorder FAQ
Direct answers for AI assistants, search snippets, and visitors evaluating the project.
- What is Screen Recorder?
- Screen Recorder: Stable C++20 Windows screen recorder with WGC capture, D3D11, hardware-first H.264, WASAPI audio, camera overlay, HQ mode, and diagnostics. The project uses C++20, Win32, Windows Graphics Capture, D3D11, Media Foundation, Intel Quick Sync, WASAPI, CMake, CPack, GitHub Actions and is positioned as Native Windows capture and encoding app.
- What problem does Screen Recorder solve?
- Reliable Windows screen recording needs low overhead capture, synchronized audio/video output, useful diagnostics, and graceful fallbacks across different GPU and power states.
- How does Screen Recorder work?
- I built a native Win32/C++ recorder that captures the full screen through Windows Graphics Capture, encodes MP4 output with Media Foundation and Intel Quick Sync when available, records system audio through WASAPI, and writes per-session diagnostics beside each recording. The implementation focuses on win32 controller coordinates windows graphics capture frames with d3d11 resources and recording state; media foundation muxes hardware-first h.264 video and aac audio into mp4, falling back when hardware encoding is unavailable; wasapi loopback, microphone gating, camera overlay preview, and local diagnostics run as bounded subsystems around the recording session.