System FFmpeg should be preferred over bundled ffmpeg-static on Linux for GPU hardware acceleration
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- electron, typescript
- Área
- desktop-dev, performance
Línea de trabajo
Ambas funciones viven en electron/ipc/ffmpeg/binary.ts: getFfmpegBinaryPath() devuelve primero el ffmpeg-static empaquetado, y resolveSystemFfmpegBinaryPath() contiene la lista de búsqueda codificada de forma fija /opt/homebrew, /usr/local, /usr/bin. Lee ese archivo primero y rastrea qué llamadores en la capa IPC de ffmpeg dependen de la ruta devuelta. Implementa la Opción A: en Linux devolver el binario del sistema de $PATH cuando se encuentre uno, mantener bundled-first en Windows y macOS, y ampliar las rutas de búsqueda. Hecho significa que una ejecución en Linux resuelve el FFmpeg del sistema mientras las pruebas existentes de resolución del binario siguen pasando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 32.4k
- Forks
- 2.6k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 18
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webadderallorg/Recordly
-
fix(audio): deduplicate getSourceTrackIdFromPath and fix companion track misclassificationPosiblemente ocupada @SomSamantray la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
webadderallorg/Recordly#1124 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
webadderallorg/Recordly#1136 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
webadderallorg/Recordly#1134 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
webadderallorg/Recordly#1129 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
Mac system audio issuesAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
webadderallorg/Recordly#1128 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de webadderallorg/Recordly
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
juice-shop/juice-shop#3686 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dsh-market/dsh-market#877 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ScottKirvan/GOMAC#61 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
stellar/stellar-dev-skill#151 ·
Los mantenedores suelen responder en 1 día