Skip to content

Commit 47f8e82

Browse files
Ace Nassrijmdobry
Ace Nassri
authored andcommitted
Add new video samples (#382)
1 parent 17230de commit 47f8e82

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

packages/google-cloud-videointelligence/samples/README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Google Cloud Video Intelligence API Node.js Samples
44

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

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

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

4242
```
4343
Commands:
44-
faces <gcsUri> Analyzes faces in a video using the Cloud Video Intelligence API.
45-
shots <gcsUri> Analyzes shot angles in a video using the Cloud Video Intelligence API.
46-
labels <gcsUri> Labels objects in a video using the Cloud Video Intelligence API.
44+
shots <gcsUri> Analyzes shot angles in a video stored in Google Cloud Storage using the Cloud Video
45+
Intelligence API.
46+
labels-gcs <gcsUri> Labels objects in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.
47+
labels-file <gcsUri> Labels objects in a video stored locally using the Cloud Video Intelligence API.
4748
4849
Options:
4950
--help Show help [boolean]
5051
5152
Examples:
52-
node analyze.js faces gs://my-bucket/my-video.mp4
5353
node analyze.js shots gs://my-bucket/my-video.mp4
54-
node analyze.js labels gs://my-bucket/my-video.mp4
54+
node analyze.js labels-gcs gs://my-bucket/my-video.mp4
55+
node analyze.js labels-file my-video.mp4
56+
node analyze.js unsafe-content gs://my-bucket/my-video.mp4
5557
5658
For more information, see https://cloud.google.com/video-intelligence/docs
5759
```

packages/google-cloud-videointelligence/samples/quickstart.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ video.annotateVideo(request)
4747
// Gets faces for video from its annotations
4848
const faces = annotations.faceAnnotations;
4949
faces.forEach((face, faceIdx) => {
50-
console.log('Thumbnail size:', face.thumbnail.buffer.length);
50+
console.log('Thumbnail size:', face.thumbnail.length);
5151
face.segments.forEach((segment, segmentIdx) => {
5252
console.log(`Track ${segmentIdx} of face ${faceIdx}: frames ${segment.startTimeOffset} to ${segment.endTimeOffset}`);
5353
});

0 commit comments

Comments
 (0)