我正在使用Laravel-ffmpeg,我尝试剪辑视频。这是我的代码:
public function clip($id)
{
$video = Video::where('id', $id)->first();
$vid = asset('storage/app/public/uploads/videos/');
$ffmpeg = \FFMpeg\FFMpeg::create();
$media = \FFMpeg::fromFilesystem($vid)->open($video->file_name);
dd($media);
$video->filters()->clip(FFMpeg\Coordinate\TimeCode::fromSeconds(30), FFMpeg\Coordinate\TimeCode::fromSeconds(15));
}
问题:
Type error: Argument 1 passed to Pbmedia\LaravelFFMpeg\FFMpeg::fromFilesystem() must implement interface Illuminate\Contracts\Filesystem\Filesystem, string given
我尝试实现该脚本,但它不起作用。你能帮我解决这个问题吗?