Lychee: ffprobe binary path declaration fails
Test OK:
<?php
require '../vendor/autoload.php';
$ffprobe = FFMpeg\FFProbe::create(array(
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe',
'timeout' => 3600,
'ffmpeg.threads' => 12,
));
$filename = '/var/www/html/LycheeLaravel/public/Test.MOV';
$stream = $ffprobe->streams($filename)->videos()->first()->all();
print $stream['width'];
Lychee-Laravel NOK:
Out of the box - Upload Video - DB Insert "Test.MOV" - DB Log - Unable to load FFProbe - Server error or API not found - Laravel Log - Undefined offset ... Photo.php:250 - DB Delete "Test.MOV" - Server Ok Add/Replace binary path (see above): - Upload Video - No DB modification - Laravel Log - Unable to load FFProbe - Server Ok
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (20 by maintainers)
Many thanks - fix looks good so far
I just submitted a PR that fixes the “Server error or API not found” errors when ffmpeg cannot be found.
From the reports here it appears that the use of nginx is the common factor in Lychee being unable to locate
ffprobe/ffmpeg(I’m using Apache and it works fine there). We may want to update the installation instructions and/or the FAQ. I guess the addition offastcgi_param PATHto nginx config should be enough though and there should be no need to modify the Lychee code…I had a exactly this problem with video upload (Linux/nginx), by me helped set the path to ffmpeg/ffprobe binary in nginx conf:
you can check your enviroment with testfile.php: