Skip to content

Non-static method Pbmedia\LaravelFFMpeg\FFMpeg::fromDisk() should not be called statically #7

Closed
@saleh-old

Description

@saleh-old

Hi there, thank you for creating this package.
I've just installed it on a Laravel 5.4, and this is the error I get:
Non-static method Pbmedia\LaravelFFMpeg\FFMpeg::fromDisk() should not be called statically

this is my code:

use Illuminate\Support\Facades\Storage;

public function upload()
    {
        $file = request()->file('gif');
        $name = time() . '.gif';

        $file->storeAs('gifs', $name);

        FFMpeg::fromDisk('local')
                    ->open('gifs/' . $name)
                    ->export()
                    ->inFormat(new \FFMpeg\Format\Video\X264)
                    ->save('export-x264.mp4');

        return back();
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions