@@ -20,11 +20,13 @@ function analyzeFaces(gcsUri) {
20
20
// Imports the Google Cloud Video Intelligence library
21
21
const video = require ( '@google-cloud/video-intelligence' ) ;
22
22
23
- // Instantiates a client
23
+ // Creates a client
24
24
const client = new video . VideoIntelligenceServiceClient ( ) ;
25
25
26
- // The GCS filepath of the video to analyze
27
- // const gcsUri = 'gs://my-bucket/my-video.mp4';
26
+ /**
27
+ * TODO(developer): Uncomment the following line before running the sample.
28
+ */
29
+ // const gcsUri = 'GCS URI of the video to analyze, e.g. gs://my-bucket/my-video.mp4';
28
30
29
31
const request = {
30
32
inputUri : gcsUri ,
@@ -83,11 +85,13 @@ function analyzeLabelsGCS(gcsUri) {
83
85
// Imports the Google Cloud Video Intelligence library
84
86
const video = require ( '@google-cloud/video-intelligence' ) ;
85
87
86
- // Instantiates a client
88
+ // Creates a client
87
89
const client = new video . VideoIntelligenceServiceClient ( ) ;
88
90
89
- // The GCS filepath of the video to analyze
90
- // const gcsUri = 'gs://my-bucket/my-video.mp4';
91
+ /**
92
+ * TODO(developer): Uncomment the following line before running the sample.
93
+ */
94
+ // const gcsUri = 'GCS URI of the video to analyze, e.g. gs://my-bucket/my-video.mp4';
91
95
92
96
const request = {
93
97
inputUri : gcsUri ,
@@ -147,11 +151,13 @@ function analyzeLabelsLocal(path) {
147
151
const video = require ( '@google-cloud/video-intelligence' ) ;
148
152
const fs = require ( 'fs' ) ;
149
153
150
- // Instantiates a client
154
+ // Creates a client
151
155
const client = new video . VideoIntelligenceServiceClient ( ) ;
152
156
153
- // The local filepath of the video to analyze
154
- // const path = 'my-file.mp4';
157
+ /**
158
+ * TODO(developer): Uncomment the following line before running the sample.
159
+ */
160
+ // const path = 'Local file to analyze, e.g. ./my-file.mp4';
155
161
156
162
// Reads a local video file and converts it to base64
157
163
const file = fs . readFileSync ( path ) ;
@@ -215,11 +221,13 @@ function analyzeShots(gcsUri) {
215
221
// Imports the Google Cloud Video Intelligence library
216
222
const video = require ( '@google-cloud/video-intelligence' ) ;
217
223
218
- // Instantiates a client
224
+ // Creates a client
219
225
const client = new video . VideoIntelligenceServiceClient ( ) ;
220
226
221
- // The GCS filepath of the video to analyze
222
- // const gcsUri = 'gs://my-bucket/my-video.mp4';
227
+ /**
228
+ * TODO(developer): Uncomment the following line before running the sample.
229
+ */
230
+ // const gcsUri = 'GCS URI of file to analyze, e.g. gs://my-bucket/my-video.mp4';
223
231
224
232
const request = {
225
233
inputUri : gcsUri ,
@@ -284,11 +292,13 @@ function analyzeSafeSearch(gcsUri) {
284
292
// Imports the Google Cloud Video Intelligence library
285
293
const video = require ( '@google-cloud/video-intelligence' ) ;
286
294
287
- // Instantiates a client
295
+ // Creates a client
288
296
const client = new video . VideoIntelligenceServiceClient ( ) ;
289
297
290
- // The GCS filepath of the video to analyze
291
- // const gcsUri = 'gs://my-bucket/my-video.mp4';
298
+ /**
299
+ * TODO(developer): Uncomment the following line before running the sample.
300
+ */
301
+ // const gcsUri = 'GCS URI of video to analyze, e.g. gs://my-bucket/my-video.mp4';
292
302
293
303
const request = {
294
304
inputUri : gcsUri ,
@@ -345,7 +355,7 @@ function analyzeSafeSearch(gcsUri) {
345
355
// [END analyze_safe_search]
346
356
}
347
357
348
- require ( `yargs` ) // eslint-disable-line
358
+ require ( `yargs` )
349
359
. demand ( 1 )
350
360
. command (
351
361
`faces <gcsUri>` ,
0 commit comments