Kashif Anwar
Kashif Anwar

Reputation: 1

Unable to Watermark an Uploaded Video Using protonemedia / laravel-ffmpeg

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

Answers (1)

SEYED BABAK ASHRAFI
SEYED BABAK ASHRAFI

Reputation: 4271

Installation

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

Configuration

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

Related Questions