- NAME
-
- gcloud alpha ml video detect-labels - detect general labels for videos
- SYNOPSIS
-
-
gcloud alpha ml video detect-labels
INPUT_PATH
[--async
] [--detection-mode
=DETECTION_MODE
; default="shot"] [--output-uri
=OUTPUT_URI
] [--region
=REGION
] [--segments
=[SEGMENTS
,…]] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(ALPHA)
Detect general categories in videos, such as modes of transportation or animals. Use the --detection-mode flag to control whether labels are detected for shots, frames, or both. - EXAMPLES
-
To detect labels in video file 'gs://my_bucket/input_file.mp4':
gcloud alpha ml video detect-labels gs://my_bucket/input_file.mp4
- POSITIONAL ARGUMENTS
-
INPUT_PATH
- Path to the video to be analyzed. Must be a local path or a Google Cloud Storage URI.
- FLAGS
-
--async
- Return immediately, without waiting for the operation in progress to complete.
--detection-mode
=DETECTION_MODE
; default="shot"-
The mode of label detection requested.
DETECTION_MODE
must be one of:frame
- Detect labels at the per-frame level.
shot
- Detect labels at the per-shot level.
shot-and-frame
- Detect labels at both the per-shot and per-frame level.
--output-uri
=OUTPUT_URI
- Location to which the results should be written. Must be a Google Cloud Storage URI.
--region
=REGION
-
Optional Cloud region where annotation should take place. If no region is
specified, a region will be determined based on video file location.
REGION
must be one of:asia-east1
,europe-west1
,us-east1
,us-west1
. --segments
=[SEGMENTS
,…]-
Segments from the video which you want to analyze (by default, the entire video
will be treated as one segment). Must be in the format
START1:END1[,START2:END2,…] (inclusive). START and END of segments must
be a properly formatted duration string of the form
HhMmSs
where:* H is the number of hours from beginning of video * M is the number of minutes from the beginning of video * S is the number of seconds from the beginning of the video
H, M and S can be specified as ints or floats for fractional units (to microsecond resolution). Unit chars (e.g.
h
,m
ors
) are required. Microseconds can be specified using fractional seconds e.g. 0.000569s == 569 microseconds.Examples:
0s:23.554048s,24s:29.528064s
0:1m40s,3m50s:5m10.232265s
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - API REFERENCE
-
This command uses the
videointelligence/v1
API. The full documentation for this API can be found at: https://cloud.google.com/video-intelligence/docs/ - NOTES
-
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation-only early access
allowlist. These variants are also available:
gcloud ml video detect-labels
gcloud beta ml video detect-labels
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-02-06 UTC.",
"confidential": False
}