找不到类别'Pbmedia \ LaravelFFMpeg \ FFMpegServiceProvider'

时间:2019-06-20 07:31:31

标签: laravel-5.2

'providers' => [
    ...
    Pbmedia\LaravelFFMpeg\FFMpegServiceProvider::class,
    ...
];

'aliases' => [
    ...
    'FFMpeg' => Pbmedia\LaravelFFMpeg\FFMpegFacade::class
    ...
];

使用artisan CLI工具发布配置文件:

php artisan vendor:publish --provider =“ Pbmedia \ LaravelFFMpeg \ FFMpegServiceProvider”

    $artist = $req->input('artist_id');
    $audition = $req->input('audition_id');
    $id=Crypt::encrypt($audition);
    $vid1 = $req->file("video");
    $file = "vid1".time().'.'.$vid1->getClientOriginalExtension();
    $file1 = FFMPEG\FFMpeg::open($file);
    $ffmpeg = FFMpeg\FFMpeg::create();
    $video = $ffmpeg->open($file);
    $video
        ->filters()
        ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
        ->synchronize();

    $vid1->move(public_path('/auditions'),$video);

0 个答案:

没有答案