简体   繁体   中英

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?

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=

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM