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.
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.
- 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
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).
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.
- 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
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.
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.
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.