Skip to content

Commit

Permalink
docs(samples): video beta samples (#123)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nirupa-kumar authored Oct 25, 2018
1 parent d7d7250 commit 7e75e1c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
47 changes: 43 additions & 4 deletions packages/google-cloud-videointelligence/samples/README.md
Original file line number Diff line number Diff line change
@@ -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`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# Google Cloud Video Intelligence API: Node.js Samples
Expand All @@ -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

Expand All @@ -32,31 +35,67 @@ __Usage:__ `node analyze.js --help`
analyze.js <command>
Commands:
analyze.js faces <gcsUri> Analyzes faces in a video stored in Google Cloud Storage using the Cloud Video
Intelligence API.
analyze.js shots <gcsUri> Analyzes shot angles in a video stored in Google Cloud Storage using the Cloud
Video Intelligence API.
analyze.js labels-gcs <gcsUri> Labels objects in a video stored in Google Cloud Storage using the Cloud Video
Intelligence API.
analyze.js labels-file <filePath> Labels objects in a video stored locally using the Cloud Video Intelligence API.
analyze.js safe-search <gcsUri> Detects explicit content in a video stored in Google Cloud Storage.
analyze.js transcription <gcsUri> 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
```

[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 <command>
Commands:
analyze.v1p2beta1.js video-text-gcs <gcsUri> Analyzes text in a video stored in Google Cloud Storage using the
Cloud Video Intelligence API.
analyze.v1p2beta1.js track-objects-gcs <gcsUri> Analyzes objects in a video stored in Google Cloud Storage using the
Cloud Video Intelligence API.
analyze.v1p2beta1.js video-text <path> Analyzes text in a video stored in a local file using the Cloud Video
Intelligence API.
analyze.v1p2beta1.js track-objects <path> 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
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7e75e1c

Please sign in to comment.