Laravel wrapper for GCloud Video Intelligence PHP client
yedincisenol/video-intelligence is a Laravel package for laravel wrapper for gcloud video intelligence php client.
It currently has 1 GitHub stars and 18 downloads on Packagist (latest version 0.1.1).
Install it with composer require yedincisenol/video-intelligence.
Discover more Laravel packages by yedincisenol
or browse all Laravel packages to compare alternatives.
Last updated
composer require "yedincisenol/video-intelligence"
config/app.php'providers' => [
...
yedincisenol\VideoIntelligence\LaravelServiceProvider::class
],
config/app.php
'aliases' => [
...
'VideoIntelligence' => \yedincisenol\VideoIntelligence\LaravelFacede::class
],
copy theese parameters to your project .env and fill
VIDEO_INTELLIGENCE_CREDENTIALS_PATH=
How to get credentials file? Visit here
use VideoIntelligence;
VideoIntelligence::annotateVideo(['inputUri' => 'gs://pandora-test/video-1.mp4', 'features' => [1]]);
$operationResponse = VideoIntelligence::annotateVideo(['inputUri' => 'gs://pandora-test/video-1.mp4', 'features' => [1]]);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$results = $operationResponse->getResult();
foreach ($results->getAnnotationResults() as $result) {
echo 'Segment labels' . PHP_EOL;
foreach ($result->getSegmentLabelAnnotations() as $labelAnnotation) {
echo "Label: " . $labelAnnotation->getEntity()->getDescription()
. PHP_EOL;
}
echo 'Shot labels' . PHP_EOL;
foreach ($result->getShotLabelAnnotations() as $labelAnnotation) {
echo "Label: " . $labelAnnotation->getEntity()->getDescription()
. PHP_EOL;
}
echo 'Frame labels' . PHP_EOL;
foreach ($result->getFrameLabelAnnotations() as $labelAnnotation) {
echo "Label: " . $labelAnnotation->getEntity()->getDescription()
. PHP_EOL;
}
}
} else {
$error = $operationResponse->getError();
echo "error: " . $error->getMessage() . PHP_EOL;
}
For more detail visit here
Label Codes: here
php artisan vendor:publish --tag=videointelligence