System FFmpeg should be preferred over bundled ffmpeg-static on Linux for GPU hardware acceleration
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- electron, typescript
- Lĩnh vực
- desktop-dev, performance
Hướng nghiên cứu
Cả hai hàm đều nằm trong electron/ipc/ffmpeg/binary.ts: getFfmpegBinaryPath() trả về ffmpeg-static đi kèm trước tiên, và resolveSystemFfmpegBinaryPath() chứa danh sách tìm kiếm hardcoded /opt/homebrew, /usr/local, /usr/bin. Hãy đọc tệp đó trước và lần theo những caller nào trong lớp IPC ffmpeg phụ thuộc vào đường dẫn được trả về. Triển khai Option A: trên Linux trả về binary hệ thống từ $PATH khi tìm thấy một cái, giữ bundled-first trên Windows và macOS, và mở rộng các đường dẫn tìm kiếm. Hoàn thành nghĩa là một lần chạy trên Linux phân giải FFmpeg hệ thống trong khi các bài kiểm thử phân giải binary hiện có vẫn pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem Description
On Linux (specifically Arch Linux installed via AUR recordly-bin), Recordly always uses the bundled ffmpeg-static for video encoding/rendering, ignoring the system-installed FFmpeg. This means GPU hardware encoders (VAAPI, NVENC, CUDA) are never utilized even when available on the system.
Impact: Video export is significantly slower than it should be. On my Arch Linux system with an NVIDIA GPU, exports only use software encoding (libx264), taking 3-4x longer than expected. The GPU sits idle while the CPU is pegged at 100%.
Root Cause
In electron/ipc/ffmpeg/binary.ts, getFfmpegBinaryPath() has this priority:
- Bundled
ffmpeg-static(first priority) - System FFmpeg from
$PATH(fallback only)
The bundled ffmpeg-static is compiled without GPU codec support (no --enable-vaapi, --enable-nvenc, --enable-cuda-llvm, etc.). This is expected for a portable static build — but on Linux desktops with GPUs, the system FFmpeg package (e.g., extra/ffmpeg on Arch) is typically compiled with full hardware acceleration support.
Additional Concern
The resolveSystemFfmpegBinaryPath() fallback also has a hardcoded Linux search order that may miss custom installs:
const commonPaths = [
"/opt/homebrew/bin/ffmpeg", // macOS path
"/usr/local/bin/ffmpeg",
"/usr/bin/ffmpeg",
];
Suggested Fixes
Option A — Platform-aware priority (recommended):
On Linux, if a system FFmpeg is found on $PATH, prefer it over the bundled one. Windows/macOS can keep the current behavior (bundled first), since their system FFmpeg is less commonly GPU-enabled.
Option B — Encoder capability detection:
Before falling back to libx264, query the bundled FFmpeg's available encoders. If it lacks hardware encoders (h264_vaapi, h264_nvenc, hevc_vaapi, hevc_nvenc, etc.) and the system FFmpeg has them, transparently switch to system FFmpeg.
Option C — Configuration setting:
Add a user-facing setting (e.g., environment variable RECORDLY_FFMPEG_PATH or a preference toggle Prefer system FFmpeg) to allow users to force using system FFmpeg.
Environment
- Distro: Arch Linux (via AUR:
recordly-bin) - GPU: NVIDIA GeForce (driver 570.133.08)
- System FFmpeg:
ffmpeg 7.1(fromextra/ffmpeg, compiled with--enable-cuda-llvm,--enable-nvenc,--enable-vaapi) - Recordly version: latest
- Ngôn ngữ chính
- TypeScript
- Star
- 32.4k
- Fork
- 2.6k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webadderallorg/Recordly
-
fix(audio): deduplicate getSourceTrackIdFromPath and fix companion track misclassificationCó thể đã có người làm @SomSamantray đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
webadderallorg/Recordly#1124 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
webadderallorg/Recordly#1129 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mac system audio issuesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
webadderallorg/Recordly#1128 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
webadderallorg/Recordly#1125 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
webadderallorg/Recordly#1122 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của webadderallorg/Recordly
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
area:cowork area:desktop documentation enhancement platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anthropics/claude-code#101720 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/rocketmq-dashboard#6610 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add: MS NOWĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Global update drops overrideAccess, so Local API updateGlobal fails filterOptions validation (3.90 regression)Có thể đã có người làm @PINYOPATTANAWASANPORN đã nhận hôm nay. Đang mởarea: core Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
payloadcms/payload#18674 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày