Video API, gRPC: VideoService.Transcode
Initiates or updates video transcoding with specified parameters.
Can be used to start transcoding for videos with auto_transcode=DISABLE,
or to re-process a completed video with new transcoding settings.
Supports additional features like subtitle processing, translation, summarization, and speech-to-text.
gRPC request
rpc Transcode (TranscodeVideoRequest) returns (operation.Operation)
TranscodeVideoRequest
{
"video_id": "string",
"field_mask": "google.protobuf.FieldMask",
"subtitle_ids": [
"string"
],
"translation_settings": {
"tracks": [
{
"input_track": {
"track_index": "int64",
"src_lang": "string"
},
"subtitles": [
{
"dst_lang": "string",
"label": "string"
}
],
"audio": [
{
"dst_lang": "string",
"label": "string"
}
]
}
]
},
"summarization_settings": {
"tracks": [
{
"input_track": {
"track_index": "int64",
"src_lang": "string"
}
}
],
"process_all_tracks": "bool"
},
"speech_to_text_settings": {
"tracks": [
{
"input_track": {
"track_index": "int64",
"src_lang": "string"
}
}
],
"process_all_tracks": "bool"
}
}
|
Field |
Description |
|
video_id |
string Required field. ID of the video to transcode. The maximum string length in characters is 50. |
|
field_mask |
Required field. Field mask specifying which transcoding-specific fields should be updated. |
|
subtitle_ids[] |
string IDs of manually uploaded subtitle files to include in the transcoding process. |
|
translation_settings |
Settings for automatic translation of audio tracks. |
|
summarization_settings |
Settings for automatic video content summarization. |
|
speech_to_text_settings |
Settings for automatic speech recognition (speech-to-text). |
VideoTranslationSettings
|
Field |
Description |
|
tracks[] |
Translation settings for each track. |
TranslationTrack
|
Field |
Description |
|
input_track |
Required field. Input track settings. |
|
subtitles[] |
Settings for target subtitle tracks. |
|
audio[] |
Settings for target audio tracks. |
InputTrack
|
Field |
Description |
|
track_index |
int64 Input audio track index (one-based). The minimum value is 1. |
|
src_lang |
string Source track language represented as a three-letter code according to ISO 639-2/T. Value must match the regular expression |
SubtitleTrack
|
Field |
Description |
|
dst_lang |
string Required field. Target language represented as a three-letter code according to ISO 639-2/T. Value must match the regular expression |
|
label |
string Required field. Track label to be displayed on the screen during video playback. The maximum string length in characters is 50. |
AudioTrack
|
Field |
Description |
|
dst_lang |
string Required field. Target language represented as a three-letter code according to ISO 639-2/T. Value must match the regular expression |
|
label |
string Required field. Track label to be displayed on the screen during video playback. The maximum string length in characters is 50. |
VideoSummarizationSettings
|
Field |
Description |
|
tracks[] |
Summarization settings for each track. |
|
process_all_tracks |
bool Summarize all available tracks. |
SummarizationTrack
|
Field |
Description |
|
input_track |
Required field. Input track settings. |
InputTrack
|
Field |
Description |
|
track_index |
int64 Input audio track index (one-based). The minimum value is 1. |
|
src_lang |
string Source track language represented as a three-letter code according to ISO 639-2/T. Value must match the regular expression |
VideoSpeechToTextSettings
|
Field |
Description |
|
tracks[] |
Speech-to-text settings for each track. |
|
process_all_tracks |
bool Recognize speech from all available tracks. |
SpeechToTextTrack
|
Field |
Description |
|
input_track |
Required field. Input track settings. |
InputTrack
|
Field |
Description |
|
track_index |
int64 Input audio track index (one-based). The minimum value is 1. |
|
src_lang |
string Source track language represented as a three-letter code according to ISO 639-2/T. Value must match the regular expression |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |