Reputation: 1
I am trying to watermark a video to prevent users from downloading the original video.
Below is my code for uploading a video, followed by watermarking it:
public function watermarkpost(Request $request)
{
if ($file = $request->file('watermark'))
{
$name = time().str_replace(' ', '', $file->getClientOriginalName());
$file->move('assets/images/products',$name);
}
FFMpeg::open(asset('assets/images/products/'.$name))->addWatermark(function(WatermarkFactory $watermark) {
$watermark
->open(asset('assets/images/1571567292logo.png') )
->right(25)
->bottom(25);
});
// return asset('assets/images/products/'.$name);
}
The error:
Alchemy\\BinaryDriver\\Exception\\ExecutableNotFoundException(code: 0): Executable not found, proposed : ffmpeg at F:\\xampp\\htdocs\\GeniusCart\\project\\vendor\\alchemy\\binary-driver\\src\\Alchemy\\BinaryDriver\\AbstractBinary.php:159)
How to resolve this issue?
Upvotes: 0
Views: 618
Reputation: 4271
You need to install ffmpeg and ffprobe on your system.
You can download the required release of these based on your os from this url
After installing them, you should give the path to their executive binaries. Laravel ffmpeg provides a config for this purpose. Give it the proper address to the ffmpeg and ffprobe binaries in your .env file.
FFMPEG_BINARIES=
FFPROBE_BINARIES=
Upvotes: 1