Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disk [videos] does not have a configured driver

Tags:

ffmpeg

laravel

I am trying to create a thumbnail using laravel and ffmpeg. But am getting this error.

Disk [videos] does not have a configured driver.

My code

public function index()
{
    FFMpeg::fromDisk('videos')
        ->open('steve_howe.mp4')
        ->getFrameFromSeconds(10)
        ->export()
        ->toDisk('thumnails')
        ->save('FrameAt10sec.png');
    // $videos =  Videos::where('user_email', Auth::user()->email)->get();
    //  return view('instructor.videos')->with('videost', $videos);
}

What could be the solution. Thanks

like image 652
oshakab Avatar asked Jan 06 '20 12:01

oshakab


3 Answers

Open your config file config/filesystems.php and check the key videos, make sure it contains 'driver' => 'local' or any other driver that you are wanting to use.

Example

'videos' => [
    'driver' => 'local',
    'root' => storage_path('videos'),
],
like image 167
Flame Avatar answered Oct 22 '22 14:10

Flame


i've tried on Laravel 6, it's shown : "InvalidArgumentException: Disk [public2] does not have a configured driver."

what I've tried on config/filesystem.php

    'public2' => [
    'driver' => 'local',
    'root' => storage_path('app'),
    'url' => env('APP_URL') . '/public',
    'visibility' => 'public',
],

then tried :

composer dump-autoload -o

still shown exception error. May i know what I must todo ? Thank you a lot

SOLVED

php artisan config:clear
like image 42
qlixes Avatar answered Oct 22 '22 12:10

qlixes


I had the same issue when trying to use FFMpeg in a Laravel Job.

I solved it by just restarting the queue using

php artisan queue:work
like image 29
Michiel De Greef Avatar answered Oct 22 '22 13:10

Michiel De Greef