Don't use absolute path for default binary paths

Created on 17 April 2025, 12 days ago

Problem/Motivation

Not all installations have ffmpeg and ffprobe located in /usr/local/bin/ffmpeg and /usr/local/bin/ffprobe.

There's logic within the library to auto-detect the default binary path, so I think it should be the default behaviour for the most compatibility.

Steps to reproduce

On a new installation on Ubuntu, the binary might be installed in /usr/bin/

Proposed resolution

Two options:
* Update the default config installs to just ffmpeg and ffprobe, and let it autodetect the default location.
* Keep it empty, and pass NULL to the library if it's empty so it uses its own internal logic to detect the default binary locations.

Remaining tasks

Provide issue fork/patch, with logic along the lines of this to allow the default binaries to be used.

--- media_thumbnails_video.module
+++ media_thumbnails_video.module
@@ -84,10 +84,10 @@
 
     try {
       // Create ffmpeg container.
       $ffmpeg = FFMpeg::create([
-        'ffmpeg.binaries' => $config->get('ffmpeg'),
-        'ffprobe.binaries' => $config->get('ffprobe'),
+        'ffmpeg.binaries' => $config->get('ffmpeg') ?: NULL,
+        'ffprobe.binaries' => $config->get('ffprobe') ?: NULL,
         'timeout' => $config->get('timeout'),
         'ffmpeg.threads' => $config->get('threads'),
       ]);

User interface changes

N/A

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024