Commit Graph

582 Commits

Author SHA1 Message Date
Enriquefft 4d4b08db07 fix: skip chained initial trims before recording starts
Startup trim-skip only consulted the first active region at t=0, so
back-to-back or overlapping trims starting at zero (e.g. [0,500ms]
followed by [500ms,1000ms]) left the second region un-skipped. The
in-flight tick loop would catch it, but MediaRecorder was already
running by then, capturing up to one rAF frame of trimmed audio into
the blob and shifting the downstream timeline.

Loop findActiveTrimRegion from the advancing startPosition until no
region matches or startPosition >= effectiveEnd, bounded by
trimRegions.length for safety. Recompute initialSpeedRegion from the
final startPosition so playbackRate reflects the true start point.
2026-04-16 14:31:51 -05:00
Enriquefft 61e895a75a fix: sanitize packet-scan range against NaN/Infinity duration
mediaInfo.duration from web-demuxer can be NaN or Infinity on Chromium
Linux (same MediaRecorder bug this PR otherwise addresses). That value
flowed straight into Math.max + demuxer.read() as scanEndSec, producing
an invalid range argument and breaking the ground-truth packet scan.

Guard both mediaInfo.duration and videoStream.duration with
Number.isFinite before Math.max; validateDuration() already handled the
downstream use.

Drop redundant WebDemuxer.read() / getDecoderConfig() type casts while
here — the generics infer the chunk/config type from the media string
literal, so the `as ReadableStream<EncodedVideoChunk>` and
`as AudioDecoderConfig` are no-ops.
2026-04-16 14:18:40 -05:00
Enriquefft 83ea025ed8 fix: handle NaN in zero-scan fallback and symmetric divergence check
- validateDuration returns 0 instead of NaN when both container is
  NaN and scanned is zero
- Use Math.abs for divergence check so container under-reporting is
  also corrected (not just over-reporting)
2026-04-16 13:50:09 -05:00
Enriquefft 337838294d fix: pass explicit range to packet scan read
Some containers are truncated when read() has no end bound.
Use container/stream duration + buffer as scan range, matching
the same pattern used in decodeAll().
2026-04-16 13:50:09 -05:00
Enriquefft 5e62ad3215 fix: validate export duration and fix audio trim in speed-aware path
Two bugs in the export pipeline:

1. Container duration from WebM metadata can be unreliable (Chromium bug
   on Linux — reports Infinity, 0, or inflated values). The pipeline
   trusted this value, causing inflated exports, frozen video, and
   "decode ended early" errors.

   Fix: scan actual packet timestamps in loadMetadata() and compare
   against container duration. Use packet-based ground truth when they
   diverge.

2. The speed-aware audio path (renderPitchPreservedTimelineAudio)
   recorded in real-time via MediaRecorder but never paused recording
   during trim-region seeks. Seek dead time was captured as audio,
   inflating the audio track beyond the video duration.

   Fix: pause MediaRecorder during trim seeks, skip past initial trim
   before recording starts, wait for seek completion before resuming.

Fixes #276, #433. Partially addresses #428.
2026-04-16 13:50:09 -05:00
Sid 6d449a46c4 Merge pull request #362 from imAaryash/detect-system-lang
feat(launch): refine recording HUD and language switching UX
2026-04-15 23:10:47 -07:00
Sid e2c4f3f62a Merge pull request #414 from theopfr/fix/correct-frame-count
fix: export frame counter exceeding total frames
2026-04-15 23:06:37 -07:00
Sid ff52e55fa1 Merge branch 'main' into detect-system-lang 2026-04-15 23:02:34 -07:00
Sid 8aa85413f9 Merge pull request #444 from AmitwalaH/fix/read-binary-error
fix: prevent crash in read-binary-file handler and improve error debugging
2026-04-15 23:01:21 -07:00
Sid 4f05cf572e Merge pull request #432 from Enriquefft/feature/nix-support
feat: add Nix flake with dev shell, package, and NixOS/Home Manager modules
2026-04-15 22:57:12 -07:00
Sid cefcf443e4 Merge pull request #436 from Dopiz/feat/i18n-zh-TW
feat(i18n): add zh-TW locale
2026-04-15 22:55:42 -07:00
Sid 20aecc13ae Merge pull request #431 from LorenzoLancia/feat/blur-mosaic-and-black
feat: add mosaic blur and black shading option
2026-04-15 22:51:47 -07:00
Sid 89fce713e5 Merge pull request #430 from SimulAffect/fix/tutorial-help-i18n
fix(i18n): sync tutorial help translations
2026-04-15 22:50:28 -07:00
Sid 847647d310 Merge pull request #421 from pufferfish3e/main
Add documentation section to README
2026-04-15 22:46:21 -07:00
Sid 97d1957b78 Merge pull request #452 from imAaryash/discord-actions
added discord.yaml
2026-04-15 22:13:51 -07:00
imAaryash ee395b7896 added discord.yaml 2026-04-15 22:01:28 +05:30
Theodor Peifer 14bbe8f183 fix: algin frame cap with epsilon boundary to prevent frame count mismatch 2026-04-14 20:26:21 +02:00
AmitwalaH 6441e96035 fix: prevent crash in read-binary-file handler and improve error debugging 2026-04-14 12:45:02 +05:30
Theodor Peifer 46c611bd3f fix: include epsilon subtration in totalFrame calculation 2026-04-13 17:30:16 +02:00
Enriquefft d20a062150 fix(nix): handle store path sources for path: flake inputs
gitTracked uses builtins.fetchGit which fails when the source is
already a store path (happens with path: flake inputs from consuming
flakes). Detect store paths at eval time and fall back to cleanSource.
2026-04-13 06:17:07 -05:00
Dopiz 515baf1d84 feat: add zh-TW locale 2026-04-13 17:19:45 +08:00
Enriquefft f106cc6835 fix(nix): restrict package source to git-tracked files
Replace denylist approach with gitTracked to exclude node_modules,
dist, .git, and any other untracked artifacts from the derivation.
Keeps the nix/flake/md exclusions as they are nix-only or non-source.
2026-04-12 18:14:44 -05:00
Enriquefft 456816ab2e fix(nix): correct Electron binary path to libexec/electron
Electron 41.x in nixpkgs places the binary at libexec/electron/,
not lib/electron/. Without this fix, npm run dev fails with ENOENT.
2026-04-12 17:55:43 -05:00
Enriquefft 64cdc0dd3c feat: add Nix flake with dev shell, package, and NixOS/Home Manager modules
Reproducible development environment for NixOS/Nix contributors:
- Dev shell with Node 22, system Electron, Playwright, LD_LIBRARY_PATH
  for X11/Wayland/audio libs, activated automatically via direnv
- buildNpmPackage derivation wrapping system Electron with desktop file
  and hicolor icons
- NixOS module (programs.openscreen.enable) with xdg-desktop-portal
- Home Manager module for per-user installation
- Overlay for composing with other flakes

Tested: nix flake show, nix develop, nix build, nixos-rebuild switch
2026-04-12 13:33:13 -05:00
LorenzoLancia 8bcce473d5 feat: add mosaic blur with black shading 2026-04-12 18:04:43 +02:00
SimulAffect 0efd2d64ed fix(i18n): sync tutorial help translations 2026-04-12 17:26:45 +08:00
Sid a6ae0e6d98 Merge pull request #373 from Moncef-Mhz/adjust-zoom-speed
feat: implement zoom speed
2026-04-11 20:23:10 -07:00
imAaryash d1c9555464 feat(i18n): auto-discover valid locales and harden language menu
- derive available locales from locale folders with required namespace validation

- exclude incomplete locales and report missing namespace files

- align system-language suggestion and selectors with discovered locales

- improve launch HUD language menu interaction, scrolling, and viewport clipping

- make i18n-check discover locale folders automatically
2026-04-12 05:13:31 +05:30
imAaryash 1ef30ff1c7 Merge branch 'detect-system-lang' of https://github.com/imAaryash/openscreen into detect-system-lang 2026-04-12 04:24:00 +05:30
imAaryash e96478e813 Revert "Merge pull request #365 from AmitwalaH/fix-tutorial-translations"
This reverts commit 5494acb5ba.
2026-04-12 04:23:41 +05:30
imAaryash 97fbb01801 fix(i18n): resolve prompt persistence and language menu behavior 2026-04-12 04:23:39 +05:30
imAaryash c9c2634db4 fix(launch): polish language menu behavior 2026-04-12 04:23:37 +05:30
imAaryash 0c627da22c feat(launch): refine recording HUD and language switching UX 2026-04-12 04:23:35 +05:30
moncef e8d6fe3d1b Merge branch 'main' into adjust-zoom-speed 2026-04-11 23:27:50 +01:00
Sid db10f92c49 Merge pull request #300 from samirpatil2000/main
feat: configure macOS hardened runtime, entitlements, and build envir…
2026-04-11 11:45:20 -07:00
Sid bbf75a27e7 Merge pull request #418 from Orchardxyz/fix/icon-size
fix: adjust icon size for macOS platform compatibility
2026-04-11 11:41:58 -07:00
Sid 5781be0ba1 Merge pull request #409 from Scottlexium/fix/hud-follows-spaces
fix: HUD overlay and source selector follow across macOS Spaces
2026-04-11 11:18:50 -07:00
Sid 26c243950a Merge pull request #407 from kwakseongjae/feat/i18n-ko-KR
feat(i18n): add Korean (ko-KR) localization
2026-04-11 11:15:23 -07:00
Sid 0e4fc249ce Merge pull request #392 from imAaryash/patch-1
Fix SUPPORTED_LOCALES array syntax
2026-04-11 10:59:55 -07:00
Sid 321c4983ca Merge pull request #316 from lueckpeter76-lgtm/revert-293-fix/restart-recording-windows
Revert "fix: prevent double-finalize race condition in restartRecording on Windos"
2026-04-11 10:45:38 -07:00
Sid d9114877ff Merge pull request #389 from richard950825-sys/fix/zh-CN-missing-newRecording-translation
fix(i18n): add missing zh-CN translation for newRecording dialog
2026-04-11 10:44:35 -07:00
Siddharth b713b6a9e8 fix: zoom focus now matches indicator position including wallpaper edges 2026-04-11 10:26:26 -07:00
Siddharth 40028cfd55 feat: add dual frame webcam layout preset (#347) 2026-04-11 10:01:19 -07:00
Siddharth 7169e583c7 revert: undo local merge of PR #347 2026-04-11 09:58:15 -07:00
Siddharth de7518549c feat: add dual frame webcam layout preset (#347) 2026-04-11 09:54:30 -07:00
Shreyas b1a1f45e93 refactor: simplify dual frame preset normalization 2026-04-11 09:30:01 -07:00
Shreyas bce1957505 fix: clear webcam position for non-pip layouts 2026-04-11 09:30:00 -07:00
Shreyas 24b4b4254a fix: normalize dual frame preset for portrait projects 2026-04-11 09:26:15 -07:00
Shreyas 16cba73cb2 fix: avoid double-scaling dual frame export radius 2026-04-11 09:26:15 -07:00
Shreyas c55f462f1c feat: add dual frame webcam layout preset 2026-04-11 09:20:34 -07:00