Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/media-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,18 @@
'ffmpeg_path' => env('FFMPEG_PATH', '/usr/bin/ffmpeg'),
'ffprobe_path' => env('FFPROBE_PATH', '/usr/bin/ffprobe'),

/*
* The timeout (in seconds) that will be used when generating video
* thumbnails via FFMPEG.
*/
'ffmpeg_timeout' => env('FFMPEG_TIMEOUT', 900),

/*
* The number of threads that FFMPEG should use. 0 means that FFMPEG
* may decide itself.
*/
'ffmpeg_threads' => env('FFMPEG_THREADS', 0),

/*
* Here you can override the class names of the jobs used by this package. Make sure
* your custom jobs extend the ones provided by the package.
Expand Down
2 changes: 2 additions & 0 deletions src/Conversions/ImageGenerators/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public function convert(string $file, ?Conversion $conversion = null): ?string
$ffmpeg = FFMpeg::create([
'ffmpeg.binaries' => config('media-library.ffmpeg_path'),
'ffprobe.binaries' => config('media-library.ffprobe_path'),
'timeout' => config('media-library.ffmpeg_timeout', 900),
'ffmpeg.threads' => config('media-library.ffmpeg_threads', 0),
]);

$video = $ffmpeg->open($file);
Expand Down
Loading