From 7e75e1cd091206290c4b5851365da44b25819d2c Mon Sep 17 00:00:00 2001 From: Nirupa Anantha Kumar Date: Thu, 25 Oct 2018 12:44:42 -0700 Subject: [PATCH] docs(samples): video beta samples (#123) * Video beta * Video beta object tracking/text detection * Fixing review issues * Inc. -> LLC * trigger kokoro to check issue * debugging sample test failure issue * debugging errors * debugging - attempt 2 * debugging - attempt 3 * debugging attempt - 4 * debugging - attempt 2 * Fixing review comments --- .../.cloud-repo-tools.json | 7 +++ .../samples/README.md | 47 +++++++++++++++++-- .../samples/package.json | 2 +- 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-videointelligence/.cloud-repo-tools.json b/packages/google-cloud-videointelligence/.cloud-repo-tools.json index 3ee01e26f85..7413d258955 100644 --- a/packages/google-cloud-videointelligence/.cloud-repo-tools.json +++ b/packages/google-cloud-videointelligence/.cloud-repo-tools.json @@ -11,6 +11,13 @@ "file": "analyze.js", "docs_link": "https://cloud.google.com/video-intelligence/docs", "usage": "node analyze.js --help" + }, + { + "id": "video", + "name": "Video Intelligence Beta", + "file": "analyze.v1p2beta1.js", + "docs_link": "https://cloud.google.com/video-intelligence/docs", + "usage": "node analyze.v1p2beta1.js --help" } ] } diff --git a/packages/google-cloud-videointelligence/samples/README.md b/packages/google-cloud-videointelligence/samples/README.md index c281a9e4576..e72ec5a9dd7 100644 --- a/packages/google-cloud-videointelligence/samples/README.md +++ b/packages/google-cloud-videointelligence/samples/README.md @@ -1,3 +1,5 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `npm run generate-scaffolding`." Google Cloud Platform logo # Google Cloud Video Intelligence API: Node.js Samples @@ -11,6 +13,7 @@ The [Cloud Video Intelligence API](https://cloud.google.com/video-intelligence) * [Before you begin](#before-you-begin) * [Samples](#samples) * [Video Intelligence](#video-intelligence) + * [Video Intelligence Beta](#video-intelligence-beta) ## Before you begin @@ -32,25 +35,24 @@ __Usage:__ `node analyze.js --help` analyze.js Commands: - analyze.js faces Analyzes faces in a video stored in Google Cloud Storage using the Cloud Video - Intelligence API. analyze.js shots Analyzes shot angles in a video stored in Google Cloud Storage using the Cloud Video Intelligence API. analyze.js labels-gcs Labels objects in a video stored in Google Cloud Storage using the Cloud Video Intelligence API. analyze.js labels-file Labels objects in a video stored locally using the Cloud Video Intelligence API. analyze.js safe-search Detects explicit content in a video stored in Google Cloud Storage. + analyze.js transcription Extract the video transcription using the Cloud Video Intelligence API. Options: --version Show version number [boolean] --help Show help [boolean] Examples: - node analyze.js faces gs://demomaker/larry_sergey_ice_bucket_short.mp4 node analyze.js shots gs://demomaker/sushi.mp4 node analyze.js labels-gcs gs://demomaker/tomatoes.mp4 node analyze.js labels-file cat.mp4 node analyze.js safe-search gs://demomaker/tomatoes.mp4 + node analyze.js transcription gs://demomaker/tomatoes.mp4 For more information, see https://cloud.google.com/video-intelligence/docs ``` @@ -58,5 +60,42 @@ For more information, see https://cloud.google.com/video-intelligence/docs [video_0_docs]: https://cloud.google.com/video-intelligence/docs [video_0_code]: analyze.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +### Video Intelligence Beta + +View the [source code][video_1_code]. + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-intelligence&page=editor&open_in_editor=samples/analyze.v1p2beta1.js,samples/README.md) + +__Usage:__ `node analyze.v1p2beta1.js --help` + +``` +analyze.v1p2beta1.js + +Commands: + analyze.v1p2beta1.js video-text-gcs Analyzes text in a video stored in Google Cloud Storage using the + Cloud Video Intelligence API. + analyze.v1p2beta1.js track-objects-gcs Analyzes objects in a video stored in Google Cloud Storage using the + Cloud Video Intelligence API. + analyze.v1p2beta1.js video-text Analyzes text in a video stored in a local file using the Cloud Video + Intelligence API. + analyze.v1p2beta1.js track-objects Analyzes objects in a video stored in a local file using the Cloud + Video Intelligence API. + +Options: + --version Show version number [boolean] + --help Show help [boolean] + +Examples: + node analyze.v1p2beta1.js video-text ./resources/googlework_short.mp4 + node analyze.v1p2beta1.js video-text-gcs gs://nodejs-docs-samples/videos/googlework_short.mp4 + node analyze.v1p2beta1.js track-objects ./resources/cat.mp4 + node analyze.v1p2beta1.js track-objects-gcs gs://nodejs-docs-samples/video/cat.mp4 + +For more information, see https://cloud.google.com/video-intelligence/docs +``` + +[video_1_docs]: https://cloud.google.com/video-intelligence/docs +[video_1_code]: analyze.v1p2beta1.js + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-intelligence&page=editor&open_in_editor=samples/README.md diff --git a/packages/google-cloud-videointelligence/samples/package.json b/packages/google-cloud-videointelligence/samples/package.json index e0a2f92e8f4..179d4307cc2 100644 --- a/packages/google-cloud-videointelligence/samples/package.json +++ b/packages/google-cloud-videointelligence/samples/package.json @@ -10,7 +10,7 @@ }, "scripts": { "cover": "nyc --reporter=lcov --cache ava -T 20s --verbose test/*.test.js ./system-test/*.test.js && nyc report", - "test": "ava -T 5m --verbose system-test/*.test.js" + "test": "ava -T 10m --serial --verbose system-test/*.test.js" }, "dependencies": { "@google-cloud/video-intelligence": "^1.4.1",