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