MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / main

Function main

video-intelligence/analyze.js:557–634  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555}
556
557async function main() {
558 require('yargs')
559 .demand(1)
560 .command(
561 'shots <gcsUri>',
562 'Analyzes shot angles in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.',
563 {},
564 opts => analyzeShots(opts.gcsUri)
565 )
566 .command(
567 'labels-gcs <gcsUri>',
568 'Labels objects in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.',
569 {},
570 opts => analyzeLabelsGCS(opts.gcsUri)
571 )
572 .command(
573 'labels-file <filePath>',
574 'Labels objects in a video stored locally using the Cloud Video Intelligence API.',
575 {},
576 opts => analyzeLabelsLocal(opts.filePath)
577 )
578 .command(
579 'safe-search <gcsUri>',
580 'Detects explicit content in a video stored in Google Cloud Storage.',
581 {},
582 opts => analyzeSafeSearch(opts.gcsUri)
583 )
584 .command(
585 'transcription <gcsUri>',
586 'Extract the video transcription using the Cloud Video Intelligence API.',
587 {},
588 opts => analyzeVideoTranscription(opts.gcsUri)
589 )
590 .command(
591 'video-text-gcs <gcsUri>',
592 'Analyzes text in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.',
593 {},
594 opts => analyzeTextGCS(opts.gcsUri)
595 )
596 .command(
597 'track-objects-gcs <gcsUri>',
598 'Analyzes objects in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.',
599 {},
600 opts => analyzeObjectTrackingGCS(opts.gcsUri)
601 )
602 .command(
603 'video-text <path>',
604 'Analyzes text in a video stored in a local file using the Cloud Video Intelligence API.',
605 {},
606 opts => analyzeText(opts.path)
607 )
608 .command(
609 'track-objects <path>',
610 'Analyzes objects in a video stored in a local file using the Cloud Video Intelligence API.',
611 {},
612 opts => analyzeObjectTracking(opts.path)
613 )
614 .example('node $0 shots gs://cloud-samples-data/video/googlework_short.mp4')

Callers 1

analyze.jsFile · 0.70

Calls 9

analyzeShotsFunction · 0.85
analyzeLabelsGCSFunction · 0.85
analyzeLabelsLocalFunction · 0.85
analyzeSafeSearchFunction · 0.85
analyzeTextGCSFunction · 0.85
analyzeObjectTrackingGCSFunction · 0.85
analyzeTextFunction · 0.85
analyzeObjectTrackingFunction · 0.85

Tested by

no test coverage detected