mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #36225 from Jachhj-sc/patch-1
Add check config.php for ffmpeg_path in PreviewManager.php. fix for snap no video preview
This commit is contained in:
commit
752f3a39f9
2 changed files with 14 additions and 3 deletions
|
|
@ -1190,7 +1190,14 @@ $CONFIG = [
|
|||
'preview_office_cl_parameters' =>
|
||||
' --headless --nologo --nofirststartwizard --invisible --norestore '.
|
||||
'--convert-to png --outdir ',
|
||||
|
||||
|
||||
/**
|
||||
* custom path for ffmpeg binary
|
||||
*
|
||||
* Defaults to ``null`` and falls back to searching ``avconv`` and ``ffmpeg`` in the configured ``PATH`` environment
|
||||
*/
|
||||
'preview_ffmpeg_path' => '/usr/bin/ffmpeg',
|
||||
|
||||
/**
|
||||
* Set the URL of the Imaginary service to send image previews to.
|
||||
* Also requires the ``OC\Preview\Imaginary`` provider to be enabled.
|
||||
|
|
|
|||
|
|
@ -417,11 +417,15 @@ class PreviewManager implements IPreview {
|
|||
|
||||
// Video requires avconv or ffmpeg
|
||||
if (in_array(Preview\Movie::class, $this->getEnabledDefaultProvider())) {
|
||||
$movieBinary = $this->binaryFinder->findBinaryPath('avconv');
|
||||
$movieBinary = $this->config->getSystemValue('preview_ffmpeg_path', null);
|
||||
if (!is_string($movieBinary)) {
|
||||
$movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
|
||||
$movieBinary = $this->binaryFinder->findBinaryPath('avconv');
|
||||
if (!is_string($movieBinary)) {
|
||||
$movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (is_string($movieBinary)) {
|
||||
$this->registerCoreProvider(Preview\Movie::class, '/video\/.*/', ["movieBinary" => $movieBinary]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue