Commit Graph
40 Commits
Author SHA1 Message Date
young 4fcf2deaa7 Apply consistent project formatting 2026-08-28 09:54:42 +10:00
young 117bbfe0eb fix: stabilize macOS countdown capture 2026-08-24 10:29:43 +10:00
wiiiii123 b823bb45ce fix(ipc): confine recorded video writes 2026-07-10 05:24:53 +07:00
josh-abram df5bb5bd57 fix(recording): avoid doubled mic audio on macOS system+mic captures
On macOS the system-audio capture already contains the mic, so the recording embeds a full system+mic mix. The fallback also added the separate mic sidecar, doubling the mic into an echo. Use the embedded mix alone. Fixes #628.
2026-06-22 20:08:16 +10:00
webadderall d95686ffcc fix: avoid duplicate mic audio in native mac recordings 2026-06-02 10:24:50 +10:00
wiiiii123 f66e2c90b3 fix: preserve mac audio sidecar tracks 2026-05-29 23:30:39 +07:00
wiiiii123 efe5c45c6e fix: clear source history on recording load 2026-05-25 02:57:09 +07:00
wiiiii123 25c7a44ead fix: stabilize Windows recording preview 2026-05-25 02:50:09 +07:00
wiiiii123 3f3d56b94c fix(recording): abort prune on unreadable project 2026-05-22 20:08:41 +07:00
wiiiii123 9c8bf83ef8 fix(recording): avoid duplicate system audio fallback 2026-05-22 18:16:19 +07:00
Alan Trebugeais 6c1a561273 fix screenrecorder webcam 2026-05-10 18:05:29 +02:00
Alan Trebugeais fce9e83ae6 removed muxing completly from the code (mac/windows) 2026-05-10 13:30:34 +02:00
Alan Trebugeais 8da8984d07 add: 20 seconds -> 2 seconds fix, for now behind a flag to be sure to be able to revert. 2026-05-10 13:01:45 +02:00
Alan Trebugeais a86bb42000 fix audio exporting with microphone and system sound etc 2026-05-09 19:43:54 +02:00
Alan Trebugeais 0119e624b2 add manager tests 2026-05-09 19:30:40 +02:00
Alan Trebugeais 8a095b84dd add: project persistence of audio settings 2026-05-09 18:07:28 +02:00
wiiiii123 3d6668fd60 fix(recording): account for mic pause gaps 2026-05-08 01:35:17 +07:00
wiiiii123 678ece2f4a fix(export): harden native beta pipeline 2026-05-07 22:37:27 +07:00
wiiiii123 45f05e78c4 fix(recording): default windows mic to browser processing 2026-05-07 04:51:30 +07:00
wiiiii123 5bb36ca5fa fix(recording): add windows mic diagnostics fallback 2026-05-07 04:00:46 +07:00
wiiiii123 b962d8a1b2 fix(recording): reduce native mic noise amplification 2026-05-07 03:29:58 +07:00
wiiiii123 3c3b8bb8bb fix(recording): declip native Windows mic peaks 2026-05-06 19:10:22 +07:00
wiiiii123 97abaa4f4e fix(export): preserve pitch for fallback speed audio 2026-05-06 06:43:40 +07:00
wiiiii123 3ab66c9057 feat(export): prepare native GPU beta candidate
Add validated native CUDA/D3D11 timeline retime, pause-aware capture timing, webcam source-time sampling, edited-track audio duration padding, packaged helper updates, and focused tests for PR #410 tester branch.
2026-05-06 01:50:12 +07:00
wiiiii123 05327a12ce Add native GPU static layout export path 2026-05-03 22:43:23 +07:00
Andrii-Vovk f90e7af66f fix(highlight): screen highlight clipping on macOS
On macOS, the screen highlight overlay's right and bottom edges were
   running off-screen. macOS clamps window positions below the menu bar,
   so the outward padding only appeared on the left/top while the
   right/bottom extended beyond the visible area.

   Use display workArea instead of full bounds for screen highlights on
   macOS, and keep the border/glow within the overlay window.
2026-04-26 17:31:28 +03:00
Wiii 8da7209bae fix(recording): normalize native Windows mic loudness

2026-04-25 18:15:51 +07:00
Wiii d04fc00fd8 fix(recording): use native audio start timestamps for Windows sync

2026-04-25 17:47:39 +07:00
webadderall 3283ee9213 Fix companion audio sync for trimmed and long exports 2026-04-24 12:04:21 +10:00
webadderall f056a22afc Fix embedded audio fallback handling and audio diagnostics (#309)
* Fix embedded audio fallback handling and audio diagnostics

* Add recording fallback diagnostics toasts

* Fix Windows audio fallback cleanup and path matching

* Format rebased recording fallback changes

* Fix embedded audio preview and export fallback handling
2026-04-24 11:30:10 +10:00
soufian3hm 87ae990b22 Fix invalid Windows recording finalization 2026-04-21 17:38:37 +01:00
webadderall e64d2cc8ec Merge pull request #282 from meiiie/fix/protect-project-recordings-from-prune
fix(recordings): preserve media referenced by saved projects
2026-04-20 20:37:07 +10:00
wiiiii123 a0d32c8c7c fix(recordings): fail closed during prune project scans 2026-04-20 02:03:45 +07:00
wiiiii123 e3baf7b2ad fix(recordings): preserve media referenced by saved projects 2026-04-20 01:49:40 +07:00
wiiiii123 818dc50e6a fix(recording): preserve mic companion audio when source has audio 2026-04-19 23:54:40 +07:00
webadderall 9e2e2cce69 fix: replace real-time audio export with streaming decode + chunked offline rendering
Major rewrite of the audio export pipeline for stability and memory efficiency:

## Streaming Decode
- Primary decode path uses WebDemuxer + AudioDecoder (WebCodecs streaming)
- Falls back to bulk decodeAudioData if streaming fails
- Avoids holding full compressed file + decoded PCM simultaneously

## Chunked Offline Rendering
- Processes timeline in 30-second OfflineAudioContext chunks
- Memory bounded to ~30s of PCM per chunk regardless of recording length

## Chunked WAV Writing
- Writes PCM in ~256KB chunks instead of single massive ArrayBuffer
- Eliminates OOM for long recordings on the native/FFmpeg export path

## Chunked Encoding
- Single AudioEncoder kept alive across all chunks (clean AAC stream)
- Proper backpressure and error propagation per chunk

## scheduleBufferThroughTimeline chunk windowing
- Clips source nodes to chunk boundaries for correct cross-chunk audio
- Backwards compatible defaults when no chunk params provided

## Other export fixes
- Progress cap: 99% -> 100% in both exporters and UI
- Muxing errors: propagated instead of silently swallowed
- Mac recording: enhanced warning when no audio files for muxing
- Export timeout: eliminated by removing real-time rendering
2026-04-18 20:29:14 +10:00
webadderall c4ada3505c fix: always apply aresample sync filter and tighten audio sync tolerances
- Always route audio through aresample=async=1:first_pts=0 filter during
  muxing on both macOS and Windows, even when duration delta is small.
  Previously skipped when delta ≤50ms, which left progressive clock drift
  (from CPU load) completely uncorrected.
- Lower sync detection threshold from 50ms to 20ms so tempo correction
  kicks in earlier.
- Use explicit 48kHz AudioContext sample rate in both browser recording
  and export rendering to prevent sample rate mismatch drift.
- Reduce MediaRecorder timeslice from 1000ms to 250ms to reduce chunk
  loss under CPU pressure.
- Tighten export audio sync: seek threshold 300ms→150ms, tolerance
  15ms→8ms, correction window 2s→0.5s, max adjustment ±8%→±12%.
- Lower companion audio start delay threshold from 50ms to 25ms.
2026-04-18 19:03:36 +10:00
webadderall 28dd8bffae fix: address ipc review follow-ups 2026-04-17 21:11:58 +10:00
webadderall 10c86f40b6 fix: address CodeRabbit review feedback
- Remove dead helperExists local in recording/windows.ts
- Hoist fs/promises import out of close handler in recording/ffmpeg.ts
- Guard fs.readdir with mkdir in recording/prune.ts (ENOENT resilience)
- Derive companion audio suffixes from COMPANION_AUDIO_LAYOUTS in prune.ts
- Guard mousemove hook registration to Linux only in cursor/interaction.ts
- Replace dynamic require('electron') with static import in cursor/monitor.ts
- Wrap nodeRequire in try/catch in ffmpeg/binary.ts for fallback safety
- Fix hardcoded timeOffsetMs: 0 in project/session.ts (use normalizer)
- Fix isPathInsideDirectory to normalize candidatePath in project/manager.ts
- Fix isAllowedLocalReadPath security: require path to be in allowlist (AND not OR)
- Derive extension regex from constants in project/manager.ts
- Consolidate duplicate Duration parsers in recording/diagnostics.ts
- Refactor ensureReadableFile to use options object instead of description string
- Make swiftc compilation async (execFile) in paths/binaries.ts
- Add socket timeout to httpsGet in captions/whisper.ts
2026-04-17 20:35:08 +10:00
webadderall d9f40571a6 refactor: split handlers.ts into focused sub-modules
handlers.ts was ~5967 lines. Extracted into 22 focused modules:

- ipc/types.ts — shared TypeScript interfaces and types
- ipc/constants.ts — module-level constants
- ipc/state.ts — all mutable state with typed setters
- ipc/utils.ts — shared low-level utilities (getScreen, normalizePath, etc.)
- ipc/ffmpeg/binary.ts — ffmpeg binary resolution
- ipc/ffmpeg/filters.ts — audio sync/filter builders
- ipc/captions/parser.ts — SRT/Whisper JSON parsers
- ipc/captions/whisper.ts — Whisper model download/status
- ipc/captions/generate.ts — auto-caption generation
- ipc/paths/binaries.ts — native binary path resolution
- ipc/cursor/monitor.ts — cursor monitor process management
- ipc/cursor/telemetry.ts — cursor sampling and telemetry
- ipc/cursor/bounds.ts — window bounds capture and resolution
- ipc/cursor/interaction.ts — mouse hook and interaction capture
- ipc/recording/events.ts — recording lifecycle events
- ipc/recording/diagnostics.ts — media validation and diagnostics
- ipc/recording/prune.ts — auto-recording cleanup
- ipc/recording/ffmpeg.ts — FFmpeg screen capture
- ipc/recording/windows.ts — Windows native capture (WGC)
- ipc/recording/mac.ts — Mac ScreenCaptureKit integration
- ipc/export/native-video.ts — native video export sessions
- ipc/project/session.ts — recording session manifests
- ipc/project/manager.ts — project library and file management

handlers.ts reduced from 5967 → 2930 lines (registerIpcHandlers + helpers only)
2026-04-17 19:57:26 +10:00