protonemedia / laravel-ffmpeg

This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.
https://protone.media/en/blog/how-to-use-ffmpeg-in-your-laravel-projects
MIT License
1.62k stars 193 forks source link

Call to undefined method FFMpeg\Media\Video::addWatermark() #485

Open AmirKhan47 opened 1 year ago

AmirKhan47 commented 1 year ago

I m trying to add a watermark to a video that I have but it's giving me this error while applying a watermark

The library is installed and working with the code commented but not when trying to add watermark

`use FFMpeg\FFMpeg; use ProtoneMedia\LaravelFFMpeg\Filters\WatermarkFactory;

$ffmpeg = FFMpeg::create(); $video = $ffmpeg->open(public_path('video-making-test/test1.mp4')); // $video // ->filters() // ->resize(new \FFMpeg\Coordinate\Dimension(320, 240)) // ->synchronize(); // $video // ->frame(\FFMpeg\Coordinate\TimeCode::fromSeconds(10)) // ->save(public_path('video-making-test/results/frame.jpg')); $video->addWatermark(function(WatermarkFactory $watermark) { $watermark->fromDisk('public') ->open('video-making-test/logo.png') ->right(25) ->bottom(25); });`