• Stars
    star
    718
  • Rank 63,070 (Top 2 %)
  • Language
    C
  • License
    The Unlicense
  • Created about 3 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple and efficient screen recording utility for Windows 10 and 11

wcap

Simple and efficient screen recording utility for Windows.

Get latest binary here: wcap.exe (WARNING: Windows Defender or other AV software might report false positive detection)

Features

  • press Ctrl + PrintScreen to start recording current monitor (where mouse cursor currently is positioned)
  • press Ctrl + Win + PrintScreen to start recording currently active window
  • press Ctrl + Shift + PrintScreen to select & record fixed position area on current monitor
  • press any of previous combinations to stop recording
  • right or double-click on tray icon to change settings
  • video encoded using H264/AVC or H265/HEVC, with 10-bit support for HEVC
  • audio encoded using AAC or FLAC
  • for window capture can capture full window area (including title bar/borders) or just the client area
  • optionally exclude mouse cursor from capture
  • can limit recording length in seconds or file size in MB's
  • can limit max width, height or framerate - captured frames will be automatically downscaled

Details

wcap uses Windows.Graphics.Capture API available since Windows 10 version 1903, May 2019 Update (19H1) to capture contents of window or whole monitor. Captured texture is submitted to Media Foundation to encode video to mp4 file with hardware accelerated codec. Using capture from compositor and hardware accelerated encoder allows it to consume very little CPU and memory.

You can choose in settings to capture only client area or full size of window - client area will not include title bar and borders for standard windows style. Recorded video size is determined by initial window size.

Make sure your GPU drivers are updated if something is not working with hardware video encoding - by default hardware encoder is enabled, you can disable it in settings - then video will be encoded using Microsoft Media Foundation H264 software encoder. You might want to explicitly use software encoder on older GPU's as their hardware encoder quality is not great.

H265 encoding might require installing HEVC package from Microsoft Store - copy following link into Explorer address bar, or in Start->Run dialog:

windows-store://pdp/?ProductId=9n4wgh0z6vhq

Audio is captured using WASAPI loopback recording and encoded using Microsoft Media Foundation AAC encoder, or undocumented Media Foundation FLAC encoder (it seems it always is present in Windows 10).

Recorded mp4 file can be set to use fragmented mp4 format in settings (only for H264 codec). Fragmented mp4 file does not require "finalizing" it. Which means that in case application or GPU driver crashes or if you run out of disk space then the partial mp4 file will be valid for playback. The disadvantage of fragmented mp4 file is that it is a bit larger than normal mp4 format, and seeking is slower.

You can use settings dialog to restrict max resolution of video - captured image will be scaled down to keep aspect ratio if you set any of max width/height settings to non-zero value. Similarly framerate of capture can be reduced to limit maximum amount of frames per second. Setting it to zero will use compositor framerate which is typically monitor refresh rate. Lower video framerate will give higher quality video for same bitrate and reduced GPU usage. If you notice too many dropped frames during recording, try reducing video resolution and framerate.

Capture of mouse cursor in video can be disabled only when using Windows 10 version 2004, May 2020 Update (20H1) or newer.

Creating gif from mp4

If you want to create gif file out of recorded mp4 file, you can use following .bat file:

ffmpeg.exe -hide_banner -nostdin -loglevel fatal -stats -y -i %1 -filter_complex "[0]fps=15,split[v0][v1];[v0]palettegen=stats_mode=full[p];[v1][p]paletteuse" %~n1.gif

And to use new palette every frame to have more colors, but larger file size:

ffmpeg.exe -hide_banner -nostdin -loglevel fatal -stats -y -i %1 -filter_complex "[0]fps=15,split[v0][v1];[v0]palettegen=stats_mode=single[p];[v1][p]paletteuse=new=1" %~n1.gif

Put this line in make_gif.bat file, place ffmpeg executable next to it and then simply drag & drop .mp4 file on top of it. Change fps=15 to desired gif fps (or remove to use original video fps). Check the paletteuse filter arguments for different dither methods.

Building

To build the binary from source code, have Visual Studio installed, and simply run build.cmd.

Changelog

2022.11.06
  • remove notifications on start & stop of capture
  • remove Windows 10 version check on startup, code always assumes Windows 10
  • support for 10-bit HEVC encoding
older entries

2021.12.21
  • allow to choose integrated vs discrete GPU to use for encoding
  • keep proper encoded video stream time when no new frames are captured
2021.12.18
  • fixed wrong audio timestamps when encoding audio
  • fixed wrong d3d11 calls to copy texture when size is odd
  • fixed hanging when encoding audio & video with too many dropped frames
2021.12.08
  • fixed compute shaders to work on older D3D11 hardware
2021.12.05
  • allow to selected limited vs full range for YUV conversion
2021.12.04
  • improved resizing and YUV conversion quality
  • improved performance for drawing background for rectangle selection
  • fix crash when child window is in foreground for window capture
2021.10.17
  • allow to configure keyboad shortcuts
2021.10.04
  • option to encode video with HEVC codec
  • option to encode audio with FLAC codec
  • allow limit file length or size
  • allow to choose output folder location
  • customize audio codec channels & samplerate
2021.09.25
  • allow to capture fixed position rectangle area on screen
  • prevent config dialog to be open multiple times
2021.09.20
  • added WASAPI loopback recording
  • audio is encoded using AAC codec
  • fix crash when capturing toolbar window
2021.09.19
  • initial release

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

More Repositories

1

RcloneBrowser

Simple cross platform GUI for rclone
C++
1,303
star
2

aes-finder

Utility to find AES keys in running processes
C++
923
star
3

pkg2zip

Decrypts PlayStation Vita pkg file and packages to zip archive
C
385
star
4

pkgi

pkg download & installation directly on Vita
C
245
star
5

CxxProfiler

Simple sampling C/C++ profiler
C++
97
star
6

TwitchNotify

Simple utility to notify when Twitch users go live for Windows 10 and up
C
69
star
7

android-native-example

simple example for building native app on Android
C
63
star
8

build-gcc-mingw

Automatic 32-bit and 64-bit Windows build of gcc, mingw-w64, gdb and make.
Shell
57
star
9

docker-mingw-w64

mingw-w64 toolchain in docker for targeting 64-bit Windows
Dockerfile
48
star
10

build-mesa

Automatic build of mesa3d for Windows
Batchfile
28
star
11

docker-unity3d

Unity3d in docker for targeting Windows and Linux
Dockerfile
25
star
12

aseprite-bin

Batchfile
22
star
13

build-sdl3

Automatic build of SDL3 libraries for Windows
Batchfile
22
star
14

symget

fast pdb debug symbol downloader
C
19
star
15

build-angle

Automatic build of angle for Windows
Batchfile
16
star
16

ScreenBuddy

Simple remote desktop sharing application for Windows
C
15
star
17

rpi

Various demos for RaspberryPi
C
14
star
18

c_d2d_dwrite

Direct2D and DirectWrite C headers
C
13
star
19

gitprj

git tags as Windows Projected Filesystem
C
11
star
20

build-sdl2

Automatic build of SDL2 libraries for Windows
Batchfile
11
star
21

build-gcc-arm

Automatic Windows build of gcc, gdb and make for targeting 32-bit and 64-bit arm bare-metal targets.
Shell
10
star
22

build-dawn

Automatic build of dawn (WebGPU) for Windows
Batchfile
10
star
23

wstream

Experiments with RTMP streaming
C
10
star
24

derpnet

Network library in C for Windows
C
5
star
25

jvpn

Python script for connecting Juniper VPN on Linux
Python
4
star
26

smhasher3

C++
4
star
27

stuff

C
3
star
28

build-ffmpeg

static build of ffmpeg binaries for 64-bit Windows
Shell
3
star
29

build-blend2d

Batchfile
2
star
30

Squares3D-iPad

Squares3D port to iPad
C++
2
star
31

Squares3D-Android

Squares3D port to Android
C++
2
star
32

Squares3D

Indago 2006 Latvian game development contest winner
C
2
star
33

kvnc

C
2
star
34

chacha20bench

chacha20 benchmarks with avx2 & avx512
Assembly
1
star
35

Squares3D-prototype

Early prototype for Squares3D. Written in Python.
Python
1
star