Skip to content

Record tab: screen, camera, mic and the Mac's sound, each to its own file - #10

Merged
calvin-archastro merged 2 commits into
mainfrom
record-tab
Oct 29, 2026
Merged

calvin-archastro merged 2 commits into
mainfrom
record-tab

Conversation

@calvin-archastro

Copy link
Copy Markdown
Contributor

Basic OBS-style recording in Splice, as a Record tab beside Edit and Story.

What it does

  • Sources: a display, a window or part of a display (with the pointer), a camera (Continuity Camera too), a microphone, and the sound the Mac plays. All are live in the tab, with level meters, and Splice keeps its own windows out of the shot.
  • A file per source, like OBS's Source Record plugin: screen.mp4, camera.mp4, microphone.m4a and system.m4a go in one folder per take. They all start at the same moment on one clock.
  • Scene: Screen, Bubble (corner, size, round or square), Side by side, or Camera. A take lands on the timeline as layers in those places. The scene is an edit, not baked in, so it can still be changed afterwards.
  • Files: H.264 or HEVC at constant quality (Good, High, Best), 30 or 60 fps, and the screen at full size, 4K, 1440p or 1080p.
  • Pause and resume. Files are written in one-second fragments; if the recorder dies, what it wrote comes in.
  • Each project keeps its setup; "Make this my default" sets the one new projects start with.
  • splice ctl record: sources, setup …, start, pause, resume, stop --wait, status.

How

  • crates/splice-app/capture/main.swift is a small Swift helper using ScreenCaptureKit (screen and system audio) and AVFoundation (camera, mic, AVAssetWriter). build.rs compiles it with swiftc, and the binary carries it.
  • Splice talks to it over stdin/stdout: JSON events plus small BGRA preview frames.
  • The scene layouts are plain maths in splice-core/src/studio.rs, with tests.

Tested by hand (release build, run from the terminal):

  • Display capture plus system audio at 1440p.
  • Window capture: its sound comes from the whole display, since a window filter only hears its own app.
  • The mic.
  • Pause/resume: a sound played while paused is absent.
  • Killing the helper mid-take: the partial take comes in and the sources restart.
  • Two takes stacked on the timeline.

Not yet tested: the camera (waiting on a macOS permission prompt) and therefore the bubble and side-by-side placement with live footage. The layout maths is unit-tested.

🤖 Generated with Claude Code

calvin-archastro and others added 2 commits October 28, 2026 18:51
…file

A Swift helper (capture/main.swift, built by build.rs and carried inside the
binary) keeps the chosen sources live with ScreenCaptureKit and AVFoundation
and writes each to its own fragmented MP4/M4A on one clock. Each project keeps
its setup (sources, scene layout, codec, quality, frame rate, size); the user
can make one their default. Takes land on the timeline as layers placed by the
scene, which stays editable. splice ctl record gains setup, pause and resume.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A window's capture hears only its own app, so the Mac's sound comes from the
whole display apart. If the recorder stops mid-take, what it wrote comes in.
While macOS asks for camera or microphone access, the Record tab says so.
Fragments every second; the default setup read once; the window redrawn only
when the live sources send something.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@calvin-archastro
calvin-archastro marked this pull request as ready for review October 29, 2026 02:50
@calvin-archastro
calvin-archastro merged commit be85f27 into main Oct 29, 2026
6 checks passed
@calvin-archastro
calvin-archastro deleted the record-tab branch October 29, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant