You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recording (Windows): raise the timer resolution and register capture threads with MMCSS #921
No Windows helper raises the timer resolution, registers with MMCSS or sets a thread priority. Every wait lands on the default 15.625 ms tick.
Affected waits: the video writer's sleep_until (main.cpp), the WASAPI poll (wasapi_loopback_capture.cpp, 5 ms asked), the audio mixer (audio_sample_utils.cpp), cursor-sampler.cpp.
Measured on a real take (recording-1790792371876):
webcam frame intervals are multiples of 15.625 ms (±0.4 ms), 13.6 % duplicates, 25.9 unique fps for 30;
cursor sampled at 22.7 Hz for 30 Hz asked (47 ms median, 3 ticks);
timeBeginPeriod(1) for the life of the recording (and timeEndPeriod on exit) in wgc-capture and cursor-sampler.
Opt the process out of power throttling (SetProcessInformation(ProcessPowerThrottling)), since Windows 11 can ignore the timer request of a throttled process. High-resolution waitable timers (CREATE_WAITABLE_TIMER_HIGH_RESOLUTION) are the alternative.
Register the capture, mixer and writer threads with MMCSS (AvSetMmThreadCharacteristicsW, "Capture" / "Pro Audio").
Verify
Same 60 s take before and after: webcam interval histogram (>95 % at 33 ms ±2, duplicates <2 %), cursor at 30 Hz ±1, [pacing] frames/elapsed ≥ 59.5 at 60 fps.
This change is assigned to the Next Release release milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked as status: pending release until a packaged release containing it is published.
Activity
perf(windows): raise the capture helpers' timer resolution and use MMCSS
github-actions commentedon Sep 30, 2026
Fixed by #927 and merged into
main.This change is assigned to the
Next Releaserelease milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked asstatus: pending releaseuntil a packaged release containing it is published.EtienneLescot commentedon Sep 30, 2026
Moved into
v2.0.0as part of the pre-release cut.