Skip to content

01 Native macOS Studio Recorder

Yoan Yomba edited this page Nov 28, 2026 · 3 revisions

Pillar 01 — Native macOS Studio Recorder ("Own the Capture Layer")

← Back to Deep Wiki Index · Next: Pillar 02 — Native NLE Extensions →


1. Strategic Context & Why This Matters

Today on iOS/iPadOS, Dante already owns the camera via CaptureController.swift and saves synchronized take sidecars directly beside each recording. On macOS, however, Dante relies on third-party recorders (OBS Studio, QuickTime, ScreenFlow, Loom, Ecamm Live).

That external dependency creates three structural problems for creators:

  1. Clock-drift & sync friction: Unless the creator configures OBS WebSocket v5 (OBSWebSocketClient), Dante's TakeTimelineRecorder timestamps don't share frame-zero with the recorded video file.
  2. Two-app cognitive load: Solo creators juggle window management, mic routing, camera framing, and recording state across two apps before every take.
  3. Missed post-production magic: Because Dante doesn't hold the media asset on macOS, it can only export a unlinked .FCPXML / .EDL file—not a ready-to-upload, silence-trimmed, retake-excised, kinetic-captioned 4K MP4.

Owning native macOS capture transforms Dante from a teleprompter utility into a unified Creator Studio—competing directly with Loom, Screen Studio, Descript Recorder, and Elgato Camera Hub while keeping Dante's unfair Smart Follow + Smart Retake advantage.


2. Target Creator Workflows

Persona Today's Pain With Dante macOS Studio Recorder
YouTube Talking-Head Creator Opens OBS + Dante + Camera preview; trims 15 min of stumbles manually. Hits Record in Dante → 3-2-1 → reads with Smart Retake → gets both raw 4K .mov and an auto-rough-cut MP4 + linked .FCPXML instantly.
Product / SaaS Educator Records screen in Screen Studio, reads notes on phone, spends 1 hr syncing. Records 4K Mac screen + PiP webcam/Continuity Camera + isolated mic in one click while reading from the invisible snapped-to-notch prompter.
Founder / Exec Comms Needs a crisp 2-minute investor/team update in 5 minutes flat. Films once in Dante, clicks Export Clean Take (MP4) with burned-in minimal subtitles and zero bad takes.

3. Deep Technical Architecture

3.1 Synchronized Multi-Track Capture Pipeline

All video and audio inputs must share a single monotonic master clock (CMClockGetHostTimeClock() / CMSampleBufferGetPresentationTimeStamp) so TakeTimelineRecorder timestamps align to the exact video frame (±16ms at 60fps).

flowchart TD
    subgraph Sources["Synchronized Capture Sources (Single CMClock)"]
        CAM["AVCaptureSession\n(Built-in / USB / iPhone Continuity Camera\nUp to 4K 60fps)"]
        SCR["ScreenCaptureKit (SCStream)\n(Full Display / Single Window\nExcludes Dante Overlay Panel!)"]
        MIC["AVAudioEngine / AVCaptureAudioDataOutput\n(Isolated Creator Mic 48kHz PCM\n+ Live Feed to SpeechRecognizer)"]
        SYS["ScreenCaptureKit System Audio\n(Isolated Desktop Audio Track)"]
    end

    SYNC["StudioCaptureCoordinator\nUnified PTS Origin (t0 = first written video frame)\nFeeds exact t0 to TakeTimelineRecorder"]

    subgraph Storage["Crash-Safe Fragmented Writer"]
        WR["AVAssetWriter (.mov / Fragmented .mp4)\n• Track 1: Camera Video (HEVC / ProRes 422 LT)\n• Track 2: Screen Video (Optional Separate File)\n• Track 3: Clean Mic Audio (48kHz AAC/PCM)\n• Track 4: System Audio (Optional)"]
        SIDECAR["TakeTranscriptRecord.json\n• Word-level clean-pass timings\n• Smart Retake & Manual Markers\n• Exact media file URI + frame rate"]
    end

    subgraph Export["Instant Post-Take Outputs"]
        MP4["Auto-Rough-Cut MP4\n(AVMutableComposition + CoreAnimation Kinetic Captions)"]
        FCP["Fully Linked Multi-Track .FCPXML\n(Zero Relinking Needed in FCP / Resolve)"]
    end

    CAM --> SYNC
    SCR --> SYNC
    MIC --> SYNC
    SYS --> SYNC
    SYNC --> WR
    SYNC --> SIDECAR
    WR --> MP4
    WR --> FCP
    SIDECAR --> MP4
    SIDECAR --> FCP
Loading

3.2 Critical Engineering Design Decisions

  1. Zero-Contention Shared Audio Bus:
    • Today SpeechRecognizer opens its own AVAudioEngine tap. When recording natively on macOS, opening a second hardware audio input session can trigger sample-rate switching or Bluetooth HFP profile degradation.
    • Solution: Route the single AVCaptureAudioDataOutput (or AVAudioEngine input node) buffer into a lightweight lock-free ring buffer that feeds both AVAssetWriterInput (48 kHz studio quality) and a downsampled 16 kHz mono buffer for SpeechRecognizer / LocalSpeechEngine.
  2. Guaranteed Overlay Invisibility During Screen Capture:
    • Using SCContentFilter(display:excludingApplications:exceptingWindows:) in ScreenCaptureKit, explicitly exclude Dante's PrompterPanel window IDs (panel.windowNumber) in addition to panel.sharingType = .none.
  3. Crash-Safe Movie Fragmentation:
    • Set assetWriter.movieFragmentInterval = CMTime(seconds: 5, preferredTimescale: 600) so even if a Mac battery dies or the app crashes 20 minutes into a shoot, all recorded footage up to the last 5 seconds remains 100% playable and recoverable!
  4. Exact Frame-Zero Anchoring (t0):
    • Call assetWriter.startSession(atSourceTime: firstFramePTS) and pass hostTime of firstFramePTS directly to TakeTimelineRecorder.markStart(at:). Every word timestamp, retake marker, and rough-cut edit point is now frame-accurate without audio cross-correlation!
  5. Dual-Mode Recording Profiles:
    • Creator Ready (Default): Hardware-accelerated HEVC (kCMVideoCodecType_HEVC, 10-bit capable on Apple Silicon Media Engine, tiny file sizes, ~20–35 Mbps at 4K30).
    • Studio Master (Pro): Apple ProRes 422 LT (kCMVideoCodecType_AppleProRes422LT) with uncompressed 48 kHz 24-bit LPCM audio for color grading in DaVinci Resolve / Final Cut Pro.

4. Instant Auto-Rough-Cut Renderer (AVMutableComposition)

When the creator clicks Export Clean Video right after stopping:

  1. RoughCutBuilder computes kept [CMTimeRange] intervals from TakeTranscriptRecord.resolvedWordTimings(cleanPassOnly: true) (excising stumbled retake spans and silences > 1.2s, preserving 120ms pre-pad / 180ms post-pad).
  2. AVMutableComposition stitches only the kept video + audio ranges—applying a 25ms micro-audio crossfade (AVMutableAudioMixInputParameters) across every cut boundary to eliminate clicks/pops!
  3. If Burned-In Captions is toggled on, AVVideoCompositionCoreAnimationTool renders synchronized word-highlighted CATextLayer animations in GPU-accelerated pass.
  4. For multi-cam/screen shoots (Camera + Screen), AVMutableVideoComposition composites either Screen + Rounded PiP Camera, Auto-Split, or exports separate synchronized tracks inside a fully-linked .FCPXML bundle (pointing <media-rep src="file:///..."> directly to the local .mov files!).

5. Proposed Swift Module Layout

File Target Responsibility
Textream/Textream/Capture/MacStudioCaptureCoordinator.swift macOS Orchestrates AVCaptureSession, ScreenCaptureKit, unified CMClock, and TakeTimelineRecorder anchoring.
Textream/Textream/Capture/MacScreenCaptureEngine.swift macOS Wraps SCShareableContent + SCStream with Dante overlay exclusion and optional cursor zoom/highlight.
Textream/Textream/Capture/MacAssetWriterPipeline.swift macOS Multi-track AVAssetWriter with 5-second fragmented crash safety and HEVC/ProRes presets.
Textream/Shared/RoughCutCompositionEngine.swift macOS + iOS Shared AVMutableComposition builder + 25ms anti-click audio crossfades + CoreAnimation kinetic captions.
Textream/Textream/TakeLibraryView.swift macOS Persistent local gallery of recorded takes per script with instant preview, rough-cut toggle, and 1-click MP4/FCPXML export.

6. Entitlements, Permissions & Distribution Matrix

Capability Mac App Store (Textream-AppStore.entitlements) Direct DMG (Textream-DeveloperID.entitlements)
Camera (AVCaptureDevice) com.apple.security.device.camera + NSCameraUsageDescription com.apple.security.device.camera + NSCameraUsageDescription
Microphone com.apple.security.device.audio-input (already present) com.apple.security.device.audio-input (already present)
Screen Recording (ScreenCaptureKit) System TCC prompt (CGPreflightScreenCaptureAccess) — allowed on MAS! System TCC prompt (CGPreflightScreenCaptureAccess)
Storage Folder Sandbox container (~/Library/Containers/.../Recordings) + user-selected export folder ~/Movies/Dante Recordings (configurable)

7. Phased Rollout & Verification

  1. Milestone 1A — Camera + Mic Synced Recording: Native 4K/1080p webcam & Continuity Camera capture with fragmented .mov writing, shared audio bus, and frame-zero TakeTimelineRecorder sync.
  2. Milestone 1B — Instant Auto-Rough-Cut MP4 & Linked .FCPXML: Stitch clean-pass segments with anti-click audio crossfades + optional kinetic captions + one-click linked .FCPXML.
  3. Milestone 1C — ScreenCaptureKit Integration: Add display/window recording + live PiP layout switcher (Camera Only, Screen + PiP, Dual Track Separate Files).

Key Metrics

  • Audio/Video ↔ Caption Sync Drift: < 1 frame (±16ms) across a 30-minute continuous take.
  • CPU Overhead During 4K30 HEVC + On-Device Whisper: < 35% on M1/M2/M3 MacBook Air (hardware Media Engine offload).
  • Time From Stop-Recording to Playable Rough-Cut MP4 (5-min take): < 15 seconds on Apple Silicon.

8. Deep Feature Catalog — 30 Features for Native macOS Studio Recorder

1. One-Click Synchronized Camera + Prompter Record

  • Description: Starts native 4K/1080p camera capture (AVCaptureSession) and live teleprompter tracking from a single button, anchoring TakeTimelineRecorder to frame zero (t = 0.000s).
  • User Journey: Creator finishes editing a script → clicks Record & Prompt → sees 3 · 2 · 1 countdown → delivers script smoothly → hits Stop → immediately receives a frame-locked video and word-timed timeline with zero manual syncing.

2. Native ScreenCaptureKit Display & Window Recorder

  • Description: Records the full Mac display, a single app window, or a custom crop region at 60fps while automatically excluding Dante's teleprompter overlay from the capture filter.
  • User Journey: SaaS educator selects their Figma window → enables Screen + Prompter → reads script pinned below the notch → exports a razor-sharp product walkthrough where viewers never see the teleprompter.

3. Picture-in-Picture (PiP) Dynamic Camera Layout Switcher

  • Description: Composites the creator's webcam or Continuity Camera over the screen recording with customizable circle, rounded-square, or side-by-side layouts—switchable live via hotkey or script cue ([LAYOUT: FULL CAM]).
  • User Journey: Creator opens on Full Camera for the hook → hits [LAYOUT: PIP] or a foot pedal when demoing software → switches back to Full Camera for the CTA → exports a finished video with smooth layout transitions already baked in.

4. Dual-File Iso Track Recording (Separate Camera + Screen Masters)

  • Description: Writes Camera and Screen streams into two separate frame-synchronized .mov files alongside a unified multi-track .FCPXML so editors retain full layout control in post.
  • User Journey: Pro YouTuber enables Record Separate Iso Tracks → records a 12-minute coding tutorial → opens the linked .FCPXML in DaVinci Resolve → freely zooms screen or cuts to full-screen talking head without baked-in PiP limits.

5. iPhone Continuity Camera 4K Desk Rig Support

  • Description: Natively selects a mounted iPhone via Apple Continuity Camera (including Desk View and Center Stage toggles) as the primary 4K studio lens inside Dante macOS.
  • User Journey: Creator snaps their iPhone onto a MagSafe MacBook mount → selects iPhone 4K Camera in Dante's source bar → previews framing next to the notch → films crisp 4K footage without buying a DSLR.

6. Crash-Safe 5-Second Fragmented Movie Writer

  • Description: Writes fragmented .mov/.mp4 chunks every 5 seconds via AVAssetWriter.movieFragmentInterval so power loss, app termination, or sleep never corrupts a long recording.
  • User Journey: Creator films a 40-minute course module → Mac unexpectedly runs out of battery at minute 38 → plugs back in and opens Dante → finds the intact 38-minute take automatically recovered in Take Library.

7. Zero-Contention Shared Audio Bus (48 kHz Master + 16 kHz Speech Feed)

  • Description: Captures a single 48 kHz studio-quality microphone stream and internally forks a 16 kHz mono buffer to SpeechRecognizer / LocalSpeechEngine, preventing sample-rate drops or Bluetooth HFP downgrades.
  • User Journey: Creator plugs in a Shure MV7 USB mic → starts recording with Word Tracking enabled → audio stays locked at 48 kHz crisp studio quality while Smart Follow tracks every word accurately.

8. Isolated System Audio Track Capture

  • Description: Captures Mac desktop/app audio (browser demos, notification sounds, video clips) onto a dedicated isolated audio track separate from the creator's voice track.
  • User Journey: Creator records a reaction or music-production demo → hits Stop → lowers system audio track by -6 dB independently during rough-cut export without affecting vocal clarity.

9. Instant Auto-Rough-Cut MP4 Renderer

  • Description: Uses AVMutableComposition and TakeTranscriptRecord clean-pass intervals to render a ready-to-upload MP4 with all Smart Retake stumbles and long silences automatically cut out.
  • User Journey: Creator finishes a 9-minute recording containing 4 retakes → clicks Export Clean MP4 → Dante excises 2m 40s of stumbles and dead air in 12 seconds → creator uploads straight to YouTube or Slack.

10. Anti-Click 25ms Micro-Audio Crossfades on Auto-Cuts

  • Description: Automatically applies subtle 25ms equal-power audio crossfades across every auto-rough-cut splice boundary so jump cuts never produce harsh digital clicks or clipped breath attacks.
  • User Journey: Creator exports an auto-rough-cut MP4 → listens back on studio headphones → every excised retake transitions cleanly without audible pops.

11. Hardware-Accelerated HEVC 10-Bit & ProRes 422 LT Profiles

  • Description: Lets creators choose between compact 10-bit HEVC (for fast uploads) and Apple ProRes 422 LT + 24-bit LPCM (for heavy color grading), offloaded to Apple Silicon's Media Engine.
  • User Journey: Agency DP selects ProRes 422 LT in Recorder Settings for a commercial shoot → records 4K30 cleanly on a MacBook Pro with fans staying silent → drops ProRes masters straight into Resolve.

12. Real-Time Live LUT & Studio Exposure Preview

  • Description: Applies optional .cube 3D LUTs, white-balance tint, and exposure sliders non-destructively (preview-only or baked-in) for Log/flat capture cards and HDMI mirrorless cameras.
  • User Journey: Creator connects a Sony A7IV via Cam Link shooting S-Log3 → loads their brand .cube LUT in Dante → sees natural color in the framing preview while preserving flat master files (or baking the LUT for instant MP4s).

13. Native HDMI Capture Card & Multi-Cam Switcher Input

  • Description: Recognizes UVC/HDMI capture cards (Elgato Cam Link 4K, ATEM Mini, Blackmagic UltraStudio) alongside built-in webcams and supports switching active camera sources mid-take.
  • User Journey: Creator selects Cam Link 4K as Cam A and iPhone Overhead as Cam B → taps a hotkey during a hardware unboxing paragraph → Dante logs the angle switch cleanly in the take.

14. Auto-Zoom Cursor Spotlight for Screen Tutorials

  • Description: Tracks mouse clicks and cursor focus during ScreenCaptureKit recordings, optionally applying smooth spring-eased zooms around clicked UI regions during MP4 export.
  • User Journey: Developer demos a subtle terminal setting → clicks a small toolbar icon → exports via Dante with Smart Cursor Zoom enabled → viewers see a crisp 1.8× zoom onto the exact click target automatically.

15. Built-In Burned-In Kinetic Captions on macOS Export

  • Description: Renders customizable word-by-word animated captions directly onto exported macOS MP4s using GPU CoreAnimation synchronized to TakeTranscriptRecord clean-pass timings.
  • User Journey: Founder records a 90-second LinkedIn update on Mac → toggles Minimal Studio Captions in Export → gets a captioned, rough-cut MP4 ready to post in under 30 seconds.

16. Pre-Roll Audio Check & Clipping Guardrail Meter

  • Description: Displays a real-time dBFS peak meter (-18 to -6 dB green studio zone, 0 dB red clip latch) beside the Record button so creators catch muted or clipping mics before filming.
  • User Journey: Creator opens Record panel → speaks a test sentence → notices peak hitting -1 dB red → dials back USB mic gain until meter sits solidly in the green sweet spot → begins filming confidently.

17. Automatic Disk-Space & Thermal Safety Guardrails

  • Description: Estimates remaining recording minutes for the active codec (e.g., 4K ProRes · 42 min free), warns at < 10 GB remaining, and gracefully stops & finalizes files before disk exhaustion.
  • User Journey: Creator starts a long batch shoot on a nearly full SSD → Dante flags 12 min remaining in ProRes; switch to HEVC for 4h 20m → creator switches codec in one click and finishes the shoot safely.

18. Live Background Blur & Studio Virtual Backdrop (Portrait Effects)

  • Description: Exposes macOS native Studio Light and Portrait Background Blur controls directly inside Dante's camera drawer without heavy third-party virtual camera drivers.
  • User Journey: Creator films from a messy hotel room → toggles Subtle Depth Blur and Studio Light in Dante's camera strip → gets clean subject separation with zero CPU spike.

19. Automated Silence-Trim Threshold Preview Slider

  • Description: Lets creators drag a post-take slider (Cut pauses longer than 0.8s / 1.2s / 2.0s) and instantly see updated final runtime and cut count before rendering the rough-cut MP4.
  • User Journey: Creator finishes a relaxed tutorial → drags silence slider to 0.9s → preview shows Duration 6:42 → 5:18 (21 cuts) → clicks Export to render a tight, energetic cut.

20. Non-Destructive Take Trimming by Clicking Words

  • Description: Displays the recorded take's spoken transcript alongside the video preview so creators can click any word or sentence to exclude/restore it before exporting MP4 or .FCPXML.
  • User Journey: Creator reviews a finished take → notices an off-script tangent sentence → highlights and strikes through those 14 words → Dante regenerates the clean MP4 with that tangent seamlessly removed.

21. Linked Multi-Track .FCPXML Bundle Export (Zero Relinking)

  • Description: Exports a self-contained project folder (or .fcpxmld bundle) to a user-selected folder outside the Mac App Store sandbox container, packaging the raw .mov files alongside an .FCPXML v1.10 referencing exact local file:// media URLs so external NLEs open with zero sandbox-permission or "Missing Media" dialogs.
  • User Journey: Creator chooses their project drive and double-clicks the exported .FCPXML → Final Cut Pro opens immediately with Camera, Screen, Isolated Mic, Clean Cuts, and B-Roll Markers all linked and playable.

22. Native macOS Take Library & Instant Playback Scrubber

  • Description: Persists every recorded macOS take grouped under its parent DanteScript with thumbnail previews, duration, WPM, retake badges, and instant J/K/L playback scrubbing.
  • User Journey: Creator records 3 takes of an intro → opens the script's Takes drawer → scrubs all 3 takes side by side → stars Take 2 as Keeper and trashes Takes 1 and 3 to reclaim disk space.

23. Automatic Proxy Generation for Fast Cloud Handoff

  • Description: Optionally transcodes a lightweight 720p H.264 proxy alongside the 4K master in the background so editors can review takes immediately over slow Wi-Fi.
  • User Journey: Creator wraps a shoot on hotel Wi-Fi → Dante finishes a 45 MB 720p proxy in seconds → shares proxy + .FCPXML with their editor while 4K masters sync overnight.

24. Instant Aspect-Ratio Reframing (16:9 Master → 9:16 Vertical Export)

  • Description: Uses Apple Vision face-tracking to auto-center the speaker inside a 1080×1920 vertical crop when exporting Shorts/Reels clips from a widescreen 4K Mac recording.
  • User Journey: Creator records a 4K 16:9 YouTube video → selects a marked 45-second highlight → clicks Export as 9:16 Short → Dante auto-centers their face and adds vertical kinetic captions automatically.

25. Voice-Triggered Auto-Pause & Auto-Resume Recording

  • Description: Optionally pauses writing frames during extended silences (> 10s, e.g., when grabbing a prop or resetting notes) and resumes seamlessly when the creator starts speaking again.
  • User Journey: Creator steps away for 30 seconds to fetch a product box → Dante pauses recording after 10s silence → creator returns and begins reading → recording resumes cleanly without bloated dead footage.

26. Custom Watermark, Intro Bumper & Outro Slate Composer

  • Description: Lets creators attach a subtle channel logo watermark, 2-second intro bumper .mov, or end-screen outro card automatically stitched onto exported MP4s.
  • User Journey: Course creator sets their academy logo and 3-second intro bumper once in Workspace Branding → every lesson exported from Dante arrives pre-branded and ready to upload to Teachable/Kajabi.

27. Multi-Mic Dual-Speaker Local Podcast Recording

  • Description: Captures two distinct USB/audio-interface input channels (Host Mic Ch 1 + Guest Mic Ch 2) as separate synced mono tracks in the .mov container.
  • User Journey: Two co-founders record an announcement video at one desk with a 2-channel Focusrite interface → Dante records isolated tracks for each voice so post-production leveling is effortless.

28. Audio Loudness Normalization (-14 LUFS YouTube / -16 LUFS Podcast)

  • Description: Applies broadcast EBU R128 loudness normalization and gentle true-peak limiting (-1 dBTP) during MP4 export so finished videos never sound quieter than competing YouTube uploads.
  • User Journey: Creator toggles Auto-Master Audio (-14 LUFS) → exports final MP4 → volume matches broadcast YouTube standards without opening Logic Pro or Audition.

29. Background On-Device Voice Isolation (Live Parallel Bus & Offline Denoiser)

  • Description: Captures Apple's native Voice Isolation (AVCaptureDevice.PreferredMicrophoneMode.voiceIsolation / AUVoiceIO) onto a parallel processed vocal bus alongside the untouched raw microphone track during recording, and pairs it with an optional offline on-device CoreML/DSP denoiser pass during export to strip AC hum, fan noise, and room echo non-destructively.
  • User Journey: Creator films near a loud window AC unit → toggles Voice Isolation before recording (or runs the offline denoiser on export) → Dante outputs crisp, studio-clean dialogue while keeping the original raw track intact.

30. Instant Drag-Out Media Chip to Any App (Finder, Slack, YouTube, NLE)

  • Description: Displays a draggable file chip (NSItemProvider) right inside StudioTakeSummaryView once a clean MP4 or .FCPXML finishes rendering so creators can drag it straight into Chrome, Slack, or Final Cut Pro.
  • User Journey: Creator finishes a 60-second update → clicks Render Clean MP4 → drags the finished chip straight from Dante's summary card into Slack or YouTube Studio Upload without ever opening Finder.

Clone this wiki locally