Commit Graph
97 Commits
Author SHA1 Message Date
lashman af30963223 fix the behaviour bugs in capture, encode and the overlay poller 2026-09-21 06:26:29 +03:00
lashman b33ce5bf77 fix the failures that were failing quietly 2026-09-21 06:22:44 +03:00
lashman c9ee532bd3 extract the d3d descriptors and cover the sweep and guard paths 2026-09-21 02:10:52 +03:00
lashman e1a7b234b7 return unit from main 2026-09-21 01:47:19 +03:00
lashman 1268b1d211 release the mapped texture even when the readback fails 2026-09-21 01:46:13 +03:00
lashman c746f4916a finish the lint pass: allow what is contractual, fix what is not 2026-09-21 01:38:01 +03:00
lashman c46fe82543 ignore send failures without tripping the copy lint 2026-09-21 01:33:39 +03:00
lashman 1f95a0321b discard send results explicitly and label the codec flags 2026-09-21 01:33:07 +03:00
lashman e6e07ca6a1 merge duplicate arms and drop a needless clone 2026-09-21 01:32:20 +03:00
lashman 3f50fdd337 tidy bindings, closures and string building 2026-09-21 01:31:16 +03:00
lashman c7a4721e7d case-insensitive extensions and explicit else arms 2026-09-21 01:30:12 +03:00
lashman 9e23a5b7d3 make the buffer slicing checked instead of assumed 2026-09-21 01:27:56 +03:00
lashman e6e0d5b2b4 return values instead of wrapping them in needless results 2026-09-21 01:26:53 +03:00
lashman b2dd93fb09 take command arguments by value on purpose 2026-09-21 01:25:35 +03:00
lashman 5003b461fc funnel byte counts through one documented conversion 2026-09-21 01:24:38 +03:00
lashman 4d3d889f27 explain the remaining float conversions at their use sites 2026-09-21 01:23:45 +03:00
lashman d297ec4271 convert the last lossy casts to checked ones 2026-09-21 01:22:16 +03:00
lashman cd583ba02b route the size and byte maths through saturating helpers 2026-09-21 01:20:11 +03:00
lashman 7c577eafd7 use let-else where the match only guarded an exit 2026-09-21 01:18:07 +03:00
lashman 72f24b7369 hoist item declarations above statements 2026-09-21 01:17:28 +03:00
lashman 8972592b8d document the remaining win32 safety contracts 2026-09-21 01:14:27 +03:00
lashman 630687945a drop a lint that only fires on command macro noise 2026-09-21 01:08:34 +03:00
lashman 29cd5a8050 ignore progress send errors without faking a drop 2026-09-21 01:07:21 +03:00
lashman e0ceb7591c document the d3d and win32 safety invariants 2026-09-21 01:06:34 +03:00
lashman 186337b7bb replace production unwraps with real handling 2026-09-21 01:05:30 +03:00
lashman 1ace31fc6e keep temp clean and previews alive across a capture 2026-09-21 01:04:22 +03:00
lashman 03b2fec744 tighten visibility and clear the remaining mechanical lint noise 2026-09-21 00:44:25 +03:00
lashman 1332600148 enforce stricter lints, drop discarded results properly 2026-09-21 00:40:51 +03:00
lashman 95d168d5d8 drop the frame timing probe, keep click highlights in frame 2026-09-21 00:32:08 +03:00
lashman 1affbc63ff add frame timing probe to capture handler 2026-09-21 00:27:28 +03:00
lashman d3418c86df tonemap hdr captures on the gpu
firefox playing hdr youtube renders the desktop in linear scrgb, and
capturing it as bgra8 clamps the >1.0 highlights to pure white. capture
in r16g16b16a16_float instead and run a hable filmic + bt709 pixel
shader directly on the captured d3d11 texture (which windows-capture
already exposes via frame.as_raw_texture), then read back bgra8 so the
ffmpeg pipe stays unchanged from the sdr path.

the shader is compiled offline with fxc at build time and embedded. the
fullscreen-triangle draw needs an explicit cull-none rasterizer state
since the default back-face cull silently drops it.
2026-06-18 13:06:00 +03:00
lashman c3f132507a harden gif pipeline, capture, and audio resilience
fix gif calibration (sample deleted before measurement), swap the
budget-mode application so resolution shrinks width not fps, correct the
color factor comment. accumulate gif encode progress across retry
attempts instead of resetting, surface an over-budget result on the done
screen. stream the audio head padding instead of loading it into memory,
detect mid-record audio device loss and offer the existing retry flow,
invalidate the cached encoder list when the ffmpeg binary changes.
add a capture quality setting so 4k screens can record at native res,
try a stream copy before re-encoding when fixing capture timestamps,
park the overlay poll thread when idle, sweep stale config backups, add
a diagnostics tab, and consolidate the preview render debounce.
2026-06-17 23:57:28 +03:00
lashman f732cdda4d calibrate gif size, probe codecs, align audio with video
- sample-encode gif calibration before the retry loop
- probe ffmpeg encoders and grey out missing codecs in settings
- pad audio head with silence so it lines up with video start
- cache gif preview palette keyed on colors and sample window
- read encode progress from -progress pipe:1 instead of stderr scraping
- thread bt709 color metadata through capture, fix, and gif scale
- sweep temp on startup
- gif estimate table for the ui, interpolated locally on slider drag
2026-06-17 23:09:53 +03:00
lashman 4ca802ef71 tighten export and capture handling 2026-06-04 23:09:13 +03:00
lashman a48d82ddc9 split Main into components, move gif math to backend 2026-06-04 22:03:20 +03:00
lashman b6bee70dcd fix extraction leak, dead deps, logging, and frontend races 2026-06-01 19:14:29 +03:00
lashman c38bc04239 fix pts_scale: use capture fps (not declared 120) for timestamp correction 2026-05-30 02:11:29 +03:00
lashman d9266a4fba fix capture timing: re-encode with setpts to scale timestamps
Stream copy doesn't fix timestamps. Now uses setpts=PTS*scale filter
to stretch timestamps from declared 120fps to actual delivery rate.
The scale factor is declared_fps / actual_fps (e.g. 120/44.3 = 2.71).
2026-05-30 02:08:21 +03:00
lashman 3c5acdce68 track frame count directly in capture handler, use for fps correction
The frame count is now tracked via Arc<AtomicU64> in the capture handler,
incremented on each frame arrival. fix_intermediate_fps uses this count
along with elapsed time to calculate the actual delivery rate, then
re-encodes the intermediate with correct fps via stream copy.
2026-05-30 02:04:36 +03:00
lashman 151220a4f7 restore capture fps filter, keep fix_intermediate_fps re-encode 2026-05-30 01:55:55 +03:00
lashman 076ac21980 restore -framerate 120 for capture, fix_intermediate_fps corrects after 2026-05-30 01:51:04 +03:00
lashman 4d521522fc fix frame counting: use ffmpeg -f null instead of missing ffprobe 2026-05-30 01:33:50 +03:00
lashman 8b91028a42 remove -framerate 999, use default 25fps then re-encode with actual rate 2026-05-30 01:28:31 +03:00
lashman 5d312b6b00 fix capture timing and gif size cap
- capture declares -framerate 999 to accept all frames without dropping
- after capture stops, measure actual delivery rate from frame count / elapsed time
- re-encode intermediate file with correct fps via stream copy (no quality loss)
- same fix applied to pause_capture segments
- gif: remove 15% size tolerance - never exceed target size
2026-05-30 01:14:51 +03:00
lashman 67c2a84178 fix capture speeding up: remove framerate declaration and fps filter
The capture was declaring -framerate 120 (monitor refresh rate) but the
Windows capture API doesn't deliver frames at that rate. This caused ffmpeg
to compress the timeline - 10 seconds of recording became 4 seconds of video.

Fix: remove both -framerate and fps filter from capture. All frames are
captured as they arrive. The export pipeline's fps filter handles rate
conversion correctly.
2026-05-30 01:05:29 +03:00
lashman c970caeebd add gif encode debug logging to diagnose speed issue 2026-05-30 00:56:36 +03:00
lashman 0ebbded776 restore capture fps filter, keep -r removal from gif encoder
The capture fps filter is needed to keep intermediate files at the user's
chosen fps instead of the monitor's native refresh rate. The GIF speed fix
was just removing the -r output flag from the gif encoder.
2026-05-30 00:53:01 +03:00
lashman 2eca4b64b6 fix GIF speed: remove capture-side fps filter, let encoder handle conversion
The capture pipeline was applying fps=N to drop frames from monitor refresh
rate to user fps. Then the GIF encoder applied fps=M on the already-converted
file. Double fps conversion = broken frame timestamps = wrong playback speed.

Fix: remove fps filter from capture. Intermediate files keep monitor's native
refresh rate (e.g. 120fps). The GIF/video encoder's fps filter handles the
conversion correctly in one clean step.

Also removed redundant -r flag from GIF encoder (already done), and restored
the 16:9 preset and low FPS options that were removed earlier.
2026-05-30 00:43:10 +03:00
lashman 2d5f689d93 fix GIF playback speed, restore removed presets and FPS options
- remove redundant -r flag from GIF encoder (conflicted with fps filter)
- restore [960, 540, 16:9] aspect ratio preset
- restore low FPS options [1, 2, 5, 10] for GIF exports
2026-05-30 00:40:29 +03:00
lashman f3ff35a48b quality pass 3: preview cleanup, gif filter hoist, config logging
- startOver clears previewPath/trimPreviewPath and resets gif settings
- startOver resets format/fps/dither to config defaults
- Main onMount wraps getConfig in try/catch
- unify DownloadProgress/UpdateDownloadProgress into single type
- default_output_path borrows config instead of cloning
- encode_gif_pass filter prefixes computed once outside retry loop
- config backup path included in warning log
- capture ffmpeg stderr logged at debug level instead of error
- is_newer comment notes pre-release version handling
- Picker hover debounced to ~33ms
- Picker emits picker-cancel on unmount
2026-05-30 00:13:58 +03:00