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.
This commit is contained in:
2026-06-17 23:57:28 +03:00
parent f732cdda4d
commit c3f132507a
9 changed files with 624 additions and 83 deletions
+14
View File
@@ -23,10 +23,13 @@ export type ExportConfig = {
mp4_codec: Mp4Codec
}
export type CaptureQuality = "auto" | "full"
export type CaptureConfig = {
default_fps: number
capture_cursor: boolean
capture_audio: boolean
capture_quality: CaptureQuality
}
export type HotkeyConfig = {
@@ -124,6 +127,8 @@ export type ExportRequest = {
export type ExportResult = {
output_path: string
size_bytes: number
target_bytes: number
met_target: boolean
}
export type HotkeyRegistrationResult = {
@@ -167,6 +172,13 @@ export type CodecAvailability = {
av1: boolean
}
export type DiagnosticsInfo = {
app_version: string
ffmpeg_version: string
log_dir: string
log_tail: string
}
export type AudioFailed = string
export const api = {
@@ -245,6 +257,8 @@ export const api = {
listen<string>("audio-failed", (e) => handler(e.payload)),
cancelExport: () => invoke<void>("cancel_export"),
codecAvailability: () => invoke<CodecAvailability>("codec_availability"),
diagnosticsInfo: () => invoke<DiagnosticsInfo>("diagnostics_info"),
openLogDir: () => invoke<void>("open_log_dir"),
}
export function formatBytes(n: number): string {