Service Client: Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoIntelligenceServiceClient
Client stub representing the remote VideoIntelligenceService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to videointelligence.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence - Compiled Protocol Buffers messages for google/cloud/videointelligence/v1beta2/video_intelligence.proto
SYNOPSIS
use Google::Cloud::Videointelligence::V1beta2::VideoIntelligence;
my $msg = Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::AnnotateVideoRequest->new({
input_uri => $input_uri,
input_content => $input_content,
features => $features,
video_context => $video_context,
});
# Read or update a field
my $val = $msg->input_uri();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::AnnotateVideoRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/videointelligence/v1beta2/video_intelligence.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::AnnotateVideoRequest
Video annotation request.
Inherits from Protobuf::Message.
Accessors
$msg->input_uri()/$msg->input_uri($value)Type:
StringInput video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset.
$msg->input_content()/$msg->input_content($value)Type:
BytesThe video data bytes. If unset, the input video(s) should be specified via `input_uri`. If set, `input_uri` should be unset.
$msg->features()/$msg->features($value)Type:
Enum(Google::Cloud::Videointelligence::V1beta2::Feature)Required. Requested video annotation features.
$msg->video_context()/$msg->video_context($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoContext)Additional video context and/or feature-specific parameters.
$msg->output_uri()/$msg->output_uri($value)Type:
StringOptional. Location where the output (in JSON format) should be stored. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
$msg->location_id()/$msg->location_id($value)Type:
StringOptional. Cloud region where annotation should take place. Supported cloud regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, a region will be determined based on video file location.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoContext
Video context and/or feature-specific parameters.
Inherits from Protobuf::Message.
Accessors
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoSegment)Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.
$msg->label_detection_config()/$msg->label_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelDetectionConfig)Config for LABEL_DETECTION.
$msg->shot_change_detection_config()/$msg->shot_change_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ShotChangeDetectionConfig)Config for SHOT_CHANGE_DETECTION.
$msg->explicit_content_detection_config()/$msg->explicit_content_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ExplicitContentDetectionConfig)Config for EXPLICIT_CONTENT_DETECTION.
$msg->face_detection_config()/$msg->face_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceDetectionConfig)Config for FACE_DETECTION.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelDetectionConfig
Config for LABEL_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->label_detection_mode()/$msg->label_detection_mode($value)Type:
Enum(Google::Cloud::Videointelligence::V1beta2::LabelDetectionMode)What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.
$msg->stationary_camera()/$msg->stationary_camera($value)Type:
BoolWhether the video has been shot from a stationary (i.e. non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
$msg->model()/$msg->model($value)Type:
StringModel to use for label detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ShotChangeDetectionConfig
Config for SHOT_CHANGE_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for shot change detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ExplicitContentDetectionConfig
Config for EXPLICIT_CONTENT_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for explicit content detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceDetectionConfig
Config for FACE_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for face detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
$msg->include_bounding_boxes()/$msg->include_bounding_boxes($value)Type:
BoolWhether bounding boxes be included in the face annotation output.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoSegment
Video segment.
Inherits from Protobuf::Message.
Accessors
$msg->start_time_offset()/$msg->start_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).
$msg->end_time_offset()/$msg->end_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelSegment
Video segment level annotation results for label detection.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoSegment)Video segment where a label was detected.
$msg->confidence()/$msg->confidence($value)Type:
FloatConfidence that the label is accurate. Range: [0, 1].
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelFrame
Video frame level annotation results for label detection.
Inherits from Protobuf::Message.
Accessors
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
$msg->confidence()/$msg->confidence($value)Type:
FloatConfidence that the label is accurate. Range: [0, 1].
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::Entity
Detected entity from video analysis.
Inherits from Protobuf::Message.
Accessors
$msg->entity_id()/$msg->entity_id($value)Type:
StringOpaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).
$msg->description()/$msg->description($value)Type:
StringTextual description, e.g. `Fixed-gear bicycle`.
$msg->language_code()/$msg->language_code($value)Type:
StringLanguage code for `description` in BCP-47 format.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelAnnotation
Label annotation.
Inherits from Protobuf::Message.
Accessors
$msg->entity()/$msg->entity($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::Entity)Detected entity.
$msg->category_entities()/$msg->category_entities($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::Entity)Common categories for the detected entity. E.g. when the label is `Terrier` the category is likely `dog`. And in some cases there might be more than one categories e.g. `Terrier` could also be a `pet`.
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelSegment)All video segments where a label was detected.
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelFrame)All video frames where a label was detected.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ExplicitContentFrame
Video frame level annotation results for explicit content.
Inherits from Protobuf::Message.
Accessors
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
$msg->pornography_likelihood()/$msg->pornography_likelihood($value)Type:
Enum(Google::Cloud::Videointelligence::V1beta2::Likelihood)Likelihood of the pornography content..
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ExplicitContentAnnotation
Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.
Inherits from Protobuf::Message.
Accessors
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ExplicitContentFrame)All video frames where explicit content was detected.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::NormalizedBoundingBox
Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].
Inherits from Protobuf::Message.
Accessors
$msg->left()/$msg->left($value)Type:
FloatLeft X coordinate.
$msg->top()/$msg->top($value)Type:
FloatTop Y coordinate.
$msg->right()/$msg->right($value)Type:
FloatRight X coordinate.
$msg->bottom()/$msg->bottom($value)Type:
FloatBottom Y coordinate.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceSegment
Video segment level annotation results for face detection.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoSegment)Video segment where a face was detected.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceFrame
Video frame level annotation results for face detection.
Inherits from Protobuf::Message.
Accessors
$msg->normalized_bounding_boxes()/$msg->normalized_bounding_boxes($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::NormalizedBoundingBox)Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceAnnotation
Face annotation.
Inherits from Protobuf::Message.
Accessors
$msg->thumbnail()/$msg->thumbnail($value)Type:
BytesThumbnail of a representative face view (in JPEG format).
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceSegment)All video segments where a face was detected.
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceFrame)All video frames where a face was detected.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoAnnotationResults
Annotation results for a single video.
Inherits from Protobuf::Message.
Accessors
$msg->input_uri()/$msg->input_uri($value)Type:
StringVideo file location in [Google Cloud Storage](https://cloud.google.com/storage/).
$msg->segment_label_annotations()/$msg->segment_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelAnnotation)Label annotations on video level or user specified segment level. There is exactly one element for each unique label.
$msg->shot_label_annotations()/$msg->shot_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelAnnotation)Label annotations on shot level. There is exactly one element for each unique label.
$msg->frame_label_annotations()/$msg->frame_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::LabelAnnotation)Label annotations on frame level. There is exactly one element for each unique label.
$msg->face_annotations()/$msg->face_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::FaceAnnotation)Face annotations. There is exactly one element for each unique face.
$msg->shot_annotations()/$msg->shot_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoSegment)Shot annotations. Each shot is represented as a video segment.
$msg->explicit_annotation()/$msg->explicit_annotation($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::ExplicitContentAnnotation)Explicit content annotation.
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::AnnotateVideoResponse
Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_results()/$msg->annotation_results($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoAnnotationResults)Annotation results for all videos specified in `AnnotateVideoRequest`.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoAnnotationProgress
Annotation progress for a single video.
Inherits from Protobuf::Message.
Accessors
$msg->input_uri()/$msg->input_uri($value)Type:
StringVideo file location in [Google Cloud Storage](https://cloud.google.com/storage/).
$msg->progress_percent()/$msg->progress_percent($value)Type:
Int32Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.
$msg->start_time()/$msg->start_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time when the request was received.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time of the most recent update.
Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::AnnotateVideoProgress
Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_progress()/$msg->annotation_progress($value)Type:
Message(Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::VideoAnnotationProgress)Progress metadata for all videos specified in `AnnotateVideoRequest`.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Videointelligence::V1beta2::VideoIntelligence::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.