项目简介
OpenCut 是 CapCut 的开源替代品,提供跨 Web、桌面和移动端的视频编辑功能。目前正在用插件优先架构和 Rust 核心重写,带来现代化的编辑体验。采用 MIT 许可证。
README 预览
\n \n \n \n \n \n OpenCut\n A free and open source video editor for web, desktop, and mobile.\n \n \n\n\n[](https://discord.gg/zmR9N35cjK)\n[](https://x.com/opencutapp)\n[](LICENSE)\n\n## Status\n\n**OpenCut is being rewritten from the ground up.** What's coming:\n\n- An Editor API\n- First-class third party plugins (made possible by a plugin-first architecture)\n- Desktop, mobile, and browser from one codebase (Rust core)\n- MCP server (for AI agents)\n- Headless mode (automation, batch rendering)\n- A scripting tab directly in the editor\n\nYou can still find the previous version at [opencut-app/opencut-classic](https://github.com/opencut-app/opencut-classic), which is the one to reach for today. [opencut.app](https://opencut.app) still runs the classic version; the rewrite will live at [new.opencut.app](https://new.opencut.app) until it's ready to take over.\n\n## Development\n\nInstall [proto](https://moonrepo.dev/proto) if you haven't already:\n\n```sh\nbash <(curl -fsSL https://moonrepo.dev/install/proto.sh)\n```\n\nFrom the repo root:\n\n```sh\nproto use # installs bun + moon at the versions pinned in .prototools\nbun install\n```\n\n```sh\nmoon run web:dev # localhost:5173\nmoon run api:dev # localhost:8787\n```\n\n## Contributing\n\nWe're not set up to take outside contributions yet while the architecture is being designed. If you want to follow along, ask questions, or just hang out, [join the Discord](https://discord.gg/zmR9N35cjK) or [open an issue](https://github.com/opencut-app/opencut/issues).\n\n## Sponsors\n\nOpenCut is supported by companies that believe in open source creator tools.\n\n- [**fal.ai**](https://fal.ai?utm_source=github-opencut&utm_campaign=oss): Generative image, video, and audio models all in one place.\n\nWant your logo here? Reach out at [sponsor@opencut.app](mailto:sponsor@opencut.app).\n\n## License\n\n[MIT](LICENSE)\n
常见问题 (4)
故障排除如何修复 Rust 中的 Cargo 错误 "unknown edition 2024"?
编辑 Cargo.toml,将不受支持的 edition = "2024" 替换为最新的稳定 edition "2021":
[workspace.package]
edition = "2021"
然后运行以下命令验证构建:
cargo check
Rust 目前支持 2015、2018 和 2021 edition;2024 不是有效的已发布 edition。
故障排除如何修复 Rust 桌面应用在 headless CI 中发生 panic 的问题,以及 Cargo 报出的 "unknown edition 2024" 构建错误?
首先修复 Cargo 的 edition。在 Cargo.toml 中,将 edition = "2024" 替换为受支持的 edition:
edition = "2021"
然后重新构建:bashcargo clean
cargo build
为防止窗口创建时发生 panic,请将 `.expect("failed to open the main window")` 替换为优雅的错误传播:rustfn main() -> Result<(), Box<dyn std::error::Error>> {
cx.open_window(...)?;
Ok(())
}
如果 GUI 必须在 CI 中运行,请提供虚拟显示(virtual display),例如在 Ubuntu/Debian 上:bashsudo apt-get install -y xvfb
xvfb-run -a cargo run
```
或者,在无头(headless)环境中运行时跳过窗口创建。这样可以处理 X11/Wayland 缺失、没有 X 转发的 SSH 会话以及 GPU 初始化失败等情况,而不会触发 panic。
故障排除如何修复在 ChromeOS 上导出带音频的 MP4 时出现的 'mp4a.40.2, 192000 bps, 2 channels, 44100 Hz encoder configuration is not supported' 错误?
更新到最新版本。该修复为 MP4 导出添加了运行时音频编码器能力协商:应用不再始终使用硬编码的 AAC 配置(mp4a.40.2、192 kbps、立体声、44.1 kHz),而是探测浏览器/WebCodecs 的支持情况并选择兼容的音频配置。如果无法立即更新,可以通过更改导出音频编解码器,或降低音频比特率/声道/采样率设置来变通解决,然后重试导出。
故障排除为什么 OpenCut 的 "Start Contributing" 按钮会打开 GitHub 404 页面?
该按钮使用了一个失效的硬编码路径:https://github.com/OpenCut-app/OpenCut/blob/main/.github/CONTRIBUTING.md。请将该按钮的 href 更新为贡献指南的实际位置。如果该文件存储在仓库根目录,请使用 https://github.com/OpenCut-app/OpenCut/blob/main/CONTRIBUTING.md。或者,在 .github/ 目录下创建 CONTRIBUTING.md,使现有 URL 变为有效。使用 grep -R ".github/CONTRIBUTING" src 查找该引用,替换错误的 URL,然后重新构建并重新部署站点。作为临时解决方案,可直接访问 https://github.com/OpenCut-app/OpenCut,并从仓库中打开贡献指南。