Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

System FFmpeg should be preferred over bundled ffmpeg-static on Linux for GPU hardware acceleration

オープン 初心者向け
#757 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@LangerSword がすでに取り組んでいます。

2026年10月5日 から。

  • #1102 @LangerSword による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
electron, typescript

調査の方向性

両方の関数は electron/ipc/ffmpeg/binary.ts にあり、getFfmpegBinaryPath() はバンドルされた ffmpeg-static を最初に返し、resolveSystemFfmpegBinaryPath() はハードコードされた /opt/homebrew、/usr/local、/usr/bin の検索リストを保持している。まずそのファイルを読み、ffmpeg IPC レイヤー内のどの呼び出し元が返されたパスに依存しているかを追跡すること。Option A を実装する: Linux では $PATH のシステムバイナリが見つかった場合にそれを返し、Windows と macOS では bundled-first を維持し、検索パスを拡張する。完了とは、Linux 実行でシステム FFmpeg が解決され、既存のバイナリ解決テストが引き続き通ることを意味する。

索引モデルが issue の本文から書いたものです。

説明

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:

  1. Bundled ffmpeg-static (first priority)
  2. 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 (from extra/ffmpeg, compiled with --enable-cuda-llvm, --enable-nvenc, --enable-vaapi)
  • Recordly version: latest
主要言語
TypeScript
スター
32.4k
フォーク
2.6k
平均マージ
1日 5時間
マージ済み PR(30日)
16

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

webadderallorg/Recordly のほかの issue

webadderallorg/Recordly の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。