-
Notifications
You must be signed in to change notification settings - Fork 31
Feature: Mouse auto-track for cursor-following zoom #7
Copy link
Copy link
Open
Description
Summary
Automatic viewport tracking that follows the mouse cursor when zoomed in, creating smooth cinematic pan effects similar to Screen Studio.
Key Features
- Mouse position recording — during screen capture, the global cursor position is captured at ~20Hz via IPC (
screen.getCursorScreenPoint()) and stored as a JSON file alongside the take's recording files - Auto-track toggle — per-section per-mode toggle (
autoTrack: boolean) on each anchor keyframe. When enabled, manualbackgroundPanX/Yis overridden by pan values computed from the mouse trail - Smoothing control — configurable
autoTrackSmoothingparameter using exponential moving average, letting users control how tightly the viewport follows the cursor (snappy vs cinematic) - Editor preview —
getStateAtTime()computesbackgroundFocusX/Yfrom the mouse trail when auto-track is on, with real-time preview in the editor - FFmpeg render — mouse trail is subsampled to keypoints (~1-2/sec), converted to focus coordinates, and fed through
buildNumericExpr()to generate animated zoompan expressions in the ffmpeg filter chain - UI controls — auto-track toggle button and smoothing scrub control, visible when a section has zoom > 1.0. Auto-disables when zoom is 1.0 (no panning needed at full size)
- Per-mode state — auto-track settings are saved independently for landscape and reel modes via
MODE_SPECIFIC_PROPS
Why
When users zoom into their screen recording, the viewport is statically positioned — they manually set a pan position per section. But during recording, the most interesting content is usually where the cursor is. Auto-track makes zoomed recordings automatically follow the action.
New Capabilities
mouse-trail-capture— cursor position recording during capture, IPC, storagemouse-trail-data— trail lookup, smoothing algorithm, subsampling for rendermouse-auto-pan— auto-track mode, focus computation, editor + render integration
Related Commits
b5407ca— feat: add mouse auto-track for cursor-following zoom in editor and render
Fixes included in PR #3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels