Video API, REST: Video.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.
HTTP request
POST https://video.api.cloud.yandex.net/video/v1/videos/{videoId}:transcode
Path parameters
|
Field |
Description |
|
videoId |
string Required field. ID of the video to transcode. The maximum string length in characters is 50. |
Body parameters
{
"fieldMask": "string",
"subtitleIds": [
"string"
],
"translationSettings": {
"tracks": [
{
"inputTrack": {
"trackIndex": "string",
"srcLang": "string"
},
"subtitles": [
{
"dstLang": "string",
"label": "string"
}
],
"audio": [
{
"dstLang": "string",
"label": "string"
}
]
}
]
},
"summarizationSettings": {
"tracks": [
{
"inputTrack": {
"trackIndex": "string",
"srcLang": "string"
}
}
],
"processAllTracks": "boolean"
},
"speechToTextSettings": {
"tracks": [
{
"inputTrack": {
"trackIndex": "string",
"srcLang": "string"
}
}
],
"processAllTracks": "boolean"
}
}
|
Field |
Description |
|
fieldMask |
string (field-mask) Required field. A comma-separated names off ALL fields to be updated. If |
|
subtitleIds[] |
string IDs of manually uploaded subtitle files to include in the transcoding process. |
|
translationSettings |
Settings for automatic translation of audio tracks. |
|
summarizationSettings |
Settings for automatic video content summarization. |
|
speechToTextSettings |
Settings for automatic speech recognition (speech-to-text). |
VideoTranslationSettings
|
Field |
Description |
|
tracks[] |
Translation settings for each track. |
TranslationTrack
|
Field |
Description |
|
inputTrack |
Required field. Input track settings. |
|
subtitles[] |
Settings for target subtitle tracks. |
|
audio[] |
Settings for target audio tracks. |
InputTrack
|
Field |
Description |
|
trackIndex |
string (int64) Input audio track index (one-based). The minimum value is 1. |
|
srcLang |
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 |
|
dstLang |
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 |
|
dstLang |
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. |
|
processAllTracks |
boolean Summarize all available tracks. |
SummarizationTrack
|
Field |
Description |
|
inputTrack |
Required field. Input track settings. |
InputTrack
|
Field |
Description |
|
trackIndex |
string (int64) Input audio track index (one-based). The minimum value is 1. |
|
srcLang |
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. |
|
processAllTracks |
boolean Recognize speech from all available tracks. |
SpeechToTextTrack
|
Field |
Description |
|
inputTrack |
Required field. Input track settings. |
InputTrack
|
Field |
Description |
|
trackIndex |
string (int64) Input audio track index (one-based). The minimum value is 1. |
|
srcLang |
string Source track language represented as a three-letter code according to ISO 639-2/T. Value must match the regular expression |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// 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. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object 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 |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |