Skip to content

Commit

Permalink
Add new video samples (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace Nassri authored and jmdobry committed May 10, 2017
1 parent 17230de commit 47f8e82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions packages/google-cloud-videointelligence/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Google Cloud Video Intelligence API Node.js Samples

The [Cloud Video Intellience API][video_docs] allows developers to easily
integrate video analysis within applications, including video labeling, face
detection, and shot change detection.
The [Cloud Video Intelligence API][video_docs] allows developers to easily
integrate video analysis within applications, including video labeling, safe search
, and shot change detection.

[video_docs]: https://cloud.google.com/video-intelligence/docs/

Expand Down Expand Up @@ -41,17 +41,19 @@ __Usage:__ `node analyze.js --help`

```
Commands:
faces <gcsUri> Analyzes faces in a video using the Cloud Video Intelligence API.
shots <gcsUri> Analyzes shot angles in a video using the Cloud Video Intelligence API.
labels <gcsUri> Labels objects in a video using the Cloud Video Intelligence API.
shots <gcsUri> Analyzes shot angles in a video stored in Google Cloud Storage using the Cloud Video
Intelligence API.
labels-gcs <gcsUri> Labels objects in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.
labels-file <gcsUri> Labels objects in a video stored locally using the Cloud Video Intelligence API.
Options:
--help Show help [boolean]
Examples:
node analyze.js faces gs://my-bucket/my-video.mp4
node analyze.js shots gs://my-bucket/my-video.mp4
node analyze.js labels gs://my-bucket/my-video.mp4
node analyze.js labels-gcs gs://my-bucket/my-video.mp4
node analyze.js labels-file my-video.mp4
node analyze.js unsafe-content gs://my-bucket/my-video.mp4
For more information, see https://cloud.google.com/video-intelligence/docs
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ video.annotateVideo(request)
// Gets faces for video from its annotations
const faces = annotations.faceAnnotations;
faces.forEach((face, faceIdx) => {
console.log('Thumbnail size:', face.thumbnail.buffer.length);
console.log('Thumbnail size:', face.thumbnail.length);
face.segments.forEach((segment, segmentIdx) => {
console.log(`Track ${segmentIdx} of face ${faceIdx}: frames ${segment.startTimeOffset} to ${segment.endTimeOffset}`);
});
Expand Down

0 comments on commit 47f8e82

Please sign in to comment.