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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

codebymikey created an issue. See original summary.

dieterholvoet made their first commit to this issue’s fork.

dieterholvoet’s picture

Status: Active » Needs review

Seems like this is already possible if you just leave those two settings empty. I created a MR to leave those settings empty by default and to document the auto detection in the field descriptions.

dieterholvoet’s picture

Never mind, seems like more changes were necessary.

dieterholvoet’s picture

Title: Don't use absolute path for default binary paths » Make it optional to specify binary paths
lamp5’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.