Skip to content

Conversation

@richiemcilroy
Copy link
Member

Implement comprehensive optimizations for lightning-fast video export by leveraging hardware encoders, GPU pipelining, and frame prefetching.

This PR introduces several advanced optimizations to drastically reduce video export times. It prioritizes hardware video encoders (VideoToolbox on macOS, NVENC on Windows/Linux) with optimized settings, falling back to a highly tuned, multi-threaded libx264 software encoder. A 3-frame deep GPU rendering pipeline is implemented to overlap rendering and readback, coupled with async, double-buffered GPU readbacks. Additionally, decoders now prefetch upcoming frames, and internal pipeline buffers have been increased to handle higher throughput.


Open in Cursor Open in Web

Co-authored-by: richiemcilroy1 <richiemcilroy1@gmail.com>
@cursor
Copy link

cursor bot commented Dec 1, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/optimize-editor-export-speed-with-rust-claude-4.5-opus-high-thinking-99ab

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

This commit refactors the H264 encoder selection logic to be more organized and platform-agnostic. It introduces a new function `get_hw_encoder_names` to retrieve available hardware encoders based on the target operating system. The encoder configuration is also updated to use a match statement for better readability and maintainability.

Co-authored-by: richiemcilroy1 <richiemcilroy1@gmail.com>
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.

3 participants