-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Video import, performance overlay, interpolation enhancements, and diagnostics #1504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 8
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Note
Introduces end‑to‑end video import and major quality/perf improvements across desktop, rendering, and export.
start_video_import/check_import_readycommands,VideoImportProgressevent,import.rs(FFmpeg transcode to H264+Opus, cancellation), tray “Import Video…”, andImportProgress.tsxZoomFocusInterpolator, cursor spring smoothing, screen movement spring, timeline duration usage; applied in export, previews, editor, and screenshot editorMaximum; supportcustom_bpp(advanced slider/UI) and wire through API; estimates updated; added long‑video export testssysinfo; enhanced log payloadPerformanceOverlay.tsxwith FPS/frame‑time/jitter; socket exposes FPS stats accessorWritten by Cursor Bugbot for commit 5e5d689. This will update automatically on new commits. Configure here.
Greptile Overview
Greptile Summary
Overview
This PR introduces video import functionality, performance monitoring tools, and significant enhancements to the rendering pipeline's cursor and zoom interpolation systems. The changes span 39 files with 4,005 additions and 403 deletions.
Key Changes
1. Video Import Feature (New)
apps/desktop/src-tauri/src/import.rs(678 lines) implements full video import pipeline.capformatImportProgress.tsxprovides user-facing progress visualization2. Rendering Pipeline Improvements
Spring Solver Overhaul (
spring_mass_damper.rs):Cursor Interpolation Enhancements (
cursor_interpolation.rs):filter_cursor_shake()to remove small back-and-forth movements (< 0.015 UV in < 100ms)Zoom & Viewport (
zoom.rs):calculate_zoom_and_center_for_cursor()dynamically adjusts zoom to keep cursor visibleCursor Motion Blur & Rotation (
cursor.wgsl,cursor.rs):3. Decoder Health Monitoring (
avassetreader.rs)4. Diagnostics & Logging
5. Performance Overlay (New)
6. Quality & Safety
bash.exe.stackdumpfile (Windows crash dump that shouldn't be tracked)Architecture Impact
The analytical spring solver fundamentally changes how smoothing works throughout the codebase - cursor, zoom focus, and future spring-based animations will benefit from precise, time-step-independent motion. The decoder pool scaling addresses performance issues users experienced with long-form content (30+ minute recordings).
Integration Points
Confidence Score: 4/5
Important Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant User participant Frontend as Frontend (ImportProgress.tsx) participant Tauri as Tauri Command Layer participant Import as Import Module (import.rs) participant FFmpeg as FFmpeg Decoder/Encoder participant FileSystem as File System participant Events as Event System User->>Frontend: Select video file to import Frontend->>Tauri: start_video_import(source_path) Tauri->>Import: Process import request Import->>Import: generate_project_name() Import->>Import: sanitize_filename() Import->>FileSystem: Create project directory (.cap) Import->>Events: emit_progress(Probing, 0.0) Events-->>Frontend: VideoImportProgress event Import->>FFmpeg: probe_video_can_decode() FFmpeg-->>Import: Decoder compatibility result alt Video not supported Import->>Events: emit_progress(Failed) Events-->>Frontend: Show error message else Video supported Import->>Import: Create initial recording metadata Import->>FileSystem: Save recording-meta.json Import->>Events: emit_progress(Converting, 0.0) Events-->>Frontend: Update progress UI Import->>FFmpeg: Open input video Import->>FFmpeg: Get video stream info Import->>FFmpeg: Get audio stream info (optional) Import->>FFmpeg: Create H264 video encoder Import->>FFmpeg: Create Opus audio encoder (if audio present) loop For each video/audio packet Import->>FFmpeg: Decode packet FFmpeg-->>Import: Decoded frame alt Frame needs scaling/conversion Import->>FFmpeg: Scale to even dimensions Import->>FFmpeg: Convert to YUV420P end Import->>FFmpeg: Encode frame FFmpeg-->>Import: Encoded packet Import->>FileSystem: check_project_exists() (cancellation check) alt Progress threshold reached (1%) Import->>Events: emit_progress(Converting, progress%) Events-->>Frontend: Update progress bar end end Import->>FFmpeg: Flush video encoder Import->>FFmpeg: Flush audio encoder Import->>FFmpeg: Write output trailers Import->>FileSystem: Sync files to disk Import->>Events: emit_progress(Finalizing, 0.95) Events-->>Frontend: Show finalizing status Import->>Import: Create final recording metadata Import->>FileSystem: Save complete recording-meta.json Import->>Events: emit_progress(Complete, 1.0) Events-->>Frontend: Show success, open editor Frontend->>User: Video ready to edit end