doukang8949 2019-06-17 08:03
浏览 438

Laravel不承认laravel-ffmpeg方法

I'd like to put a watermark to a streaming video with Laravel-ffmpeg repo from Github, but it doesn't recognize its own methods. I've installed the package with composer according to the repo-s readme.md file from here: https://github.com/pascalbaljetmedia/laravel-ffmpeg

I know that there was a similar question here. But nobody answered the question and I've got the method inside the files.

The installation worked properly. And to stream the video I use these codes: https://codesamplez.com/programming/php-html5-video-streaming-tutorial

But when I put the code above to the open() method, Laravel doesn't find the fromDisk method from the FFMpeg.php file.

FFMpeg::fromDisk('videos')
            ->open('steve_howe.mp4')
            ->addFilter($clipFilter)
            ->export()
            ->toDisk('converted_videos')
            ->inFormat(new \FFMpeg\Format\Video\X264)
            ->save('short_steve.mkv');

My composer.json look like this:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "illuminate/config": "5.8.*",
        "illuminate/filesystem": "5.8.*",
        "illuminate/log": "5.8.*",
        "illuminate/support": "5.8.*",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0",
        "league/flysystem": "~1.0",
        "pbmedia/laravel-ffmpeg": "^4.0",
        "php-ffmpeg/php-ffmpeg": "^0.13",
        "symfony/process": "~4.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^7.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

How could I say to Laravel that recognize the methods?

Thank you for the help in advance

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?