-
Notifications
You must be signed in to change notification settings - Fork 371
feat(recording): FFmpeg backend for Windows/macOS (CFR + HW encode) #74
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
base: main
Are you sure you want to change the base?
feat(recording): FFmpeg backend for Windows/macOS (CFR + HW encode) #74
Conversation
- Add complete i18n infrastructure with I18nProvider and useI18n hook - Add Chinese (Simplified) translations for all UI elements - Auto-detect browser language preference - Add language switcher in settings panel - Create bilingual README with language toggle - Add GitHub Actions workflow for automated releases Closes: i18n support
- Update paths from release/*.ext to release/**/*.ext
- electron-builder outputs to release/${version}/ subdirectory
- Add safety check for artifacts directory listing
- Add artifactName for Windows builds to match macOS/Linux naming convention - Include all necessary build artifacts (.exe, .dmg, .AppImage, .blockmap files, latest*.yml) - Optimize release file path matching with precise glob patterns - Ensure auto-update metadata files are included in artifacts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…m#69) - 新增主进程 FFmpeg 录制器(硬编优先回退 + CFR + ffprobe 自检)\n- Renderer 优先 FFmpeg,失败回退 MediaRecorder;Linux 暂不启用\n- 增加 verify:ffmpeg 冒烟脚本,减少人工录屏验证\n- 修复重复点击导致多 ffmpeg 进程:主进程互斥 + UI 防抖
|
Manual verification on macOS (local |
|
Seems you mixed the code of #71 into this PR. It is really hard to review such a huge change in one time. 😭 |
Thanks for pointing this out — sorry about the large PR. You’re right: this PR ended up including the changes from #71 I understand that makes it hard to review in one go. To make it easier without asking you to digest everything at
If it works for you, please review it commit-by-commit, with the main focus on f9d5347. If you’d prefer this handled |
|
@fengjinyi98 Thanks for contributing and working on this!
Kindly separate out the PRs. It gets hard to review it. |
@fengjinyi98 Why? |
Summary
This PR implements the FFmpeg-based recording backend proposed in #69.
MediaRecorderto produce higher quality, constant frame rate (CFR) MP4/H.264.Closes #69.
Key changes
Main process: FFmpeg recorder
electron/recording/ffmpegRecorder.ts(FfmpegRecorder)ffmpegfor capture and encoding.qto stdin, with a kill timeout fallback.ffprobeafter stopping to return basic metadata (codec / size / fps) for a lightweight self-check.h264_nvenc/h264_amf/h264_qsv?libx264h264_videotoolbox?libx264-vf fps=...and normalizes output dimensions to even numbers.IPC + preload API
start-recording/stop-recording(FFmpeg backend)electronAPI.startRecording()/electronAPI.stopRecording()Renderer integration (fallback preserved)
useScreenRecorderprefers the FFmpeg backend when available and supported:screen:andwindow:sourcesscreen:sources onlyWindows window-capture improvements
rawName) from the source selector and tries it first forgdigrab title=...matching.Robustness
Automated verification (no screen capture required)
scripts/verify-ffmpeg.mjsandnpm run verify:ffmpeglavfiand validates the MP4 output viaffprobe.Manual verification
macOS
ffmpegandffprobeare available in PATH (or setOPENSCREEN_FFMPEG_PATH/OPENSCREEN_FFPROBE_PATH).npm run dev.Windows
ffmpegandffprobeare available in PATH (or set env overrides).npm run dev.Notes / limitations
Configuration
OPENSCREEN_FFMPEG_PATHOPENSCREEN_FFPROBE_PATH