Skip to content

Recordings longer than ~10 minutes silently fail to save #616

@Amanuel2x

Description

@Amanuel2x

Bug

Recordings that run longer than approximately 10 minutes never appear in the editor after stopping. The app shows the recording stopped successfully but no file is accessible.

Root Cause

The entire recording is buffered in the renderer process as a Blob[] array throughout the session. On stop, three additional in-memory copies are made:

  1. fixWebmDuration(screenBlob, duration) — duplicates the full blob to patch the WebM duration header
  2. .arrayBuffer() — converts the fixed blob to an ArrayBuffer
  3. Buffer.from(payload.screen.videoData) in the main process — fourth copy before fs.writeFile

For an 18-minute 1080p screencast this results in 400–600 MB being duplicated 3–4× in the Electron renderer. The process exceeds its memory limit and crashes silently — no file is written and no error is shown to the user.

Steps to Reproduce

  1. Start a screen recording at 1080p
  2. Record for more than ~10 minutes
  3. Stop the recording
  4. The editor never opens / no recording file is saved

Expected Behavior

Recordings of any length should save successfully.

Fix

Stream each ondataavailable chunk (every 1 second) directly to disk via IPC as it arrives, so the renderer never holds more than a single 1-second chunk in memory at a time. A PR with a fix is attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions