I'm trying to add a watermark to a video I own but I'm getting this error while applying the watermark
The library is installed and works with the commented code, but it doesn't work when trying to add a 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); });
Try using
ProtoneMedia\LaravelFFMpeg\Support\FFMpeg
instead ofFFMpeg\FFMpeg
.