Commit Graph
1 Commits
Author SHA1 Message Date
Divarion_D 0e2d64cdfd feat(ffmpeg): dynamic build discovery + capabilities, wire ffmpeg_gpu, drop 4.0 hardcoding
Discover the bundled FFmpeg builds from bin/ffmpeg_bin/<version>/ instead of a
hardcoded version list, and expose what each build can do.

- FfmpegBinaries (new): scans real version folders (skips *.backup.*), probes each
  binary's hardware encoders (nvenc/qsv/vaapi/…), flags GPU capability, caches the
  result to tmp/ffmpeg_capabilities.json keyed by a folder-mtime fingerprint. UI-only.
- FfmpegPaths::resolve() rewritten: builds paths dynamically from the version string
  (is_file check, no shell — stays on the bootstrap hot path) and takes a separate GPU
  version; the switch and the per-version constants are gone. Unknown CPU version falls
  back to the legacy 4.0 build; an empty/invalid GPU version falls back to the CPU build.
- Wire the previously-dead ffmpeg_gpu column: LegacyInitializer passes it to resolve();
  settings.php lists versions from the scanner and adds an ffmpeg_gpu <select> limited to
  GPU-capable builds ("Same as CPU" = empty). No migration — the column already exists.
- Info tab: a per-build FFmpeg table (version, build banner, GPU badge, hw encoders).
- De-hardcode: drop the unused FFMPEG_BIN_71/80 + FFPROBE_BIN_71/80 constants; keep only
  the 4.0 anchor (DTS override in StreamProcess + FfmpegPaths fallback). Llod/Loopback/
  Record now use FfmpegPaths::cpu()/probe() (config-selected version) with the 4.0
  constant as fallback, matching Scanner/Created/Thumbnail.
2026-08-30 14:05:34 +03:00