Video API, gRPC: VideoService.Create
Create video.
gRPC request
rpc Create (CreateVideoRequest) returns (operation.Operation)
CreateVideoRequest
{
"channel_id": "string",
"title": "string",
"description": "string",
"thumbnail_id": "string",
"auto_transcode": "AutoTranscode",
"labels": "map<string, string>",
// Includes only one of the fields `tusd`
"tusd": {
"file_size": "int64",
"file_name": "string"
},
// end of the list of possible fields
// Includes only one of the fields `public_access`, `auth_system_access`, `sign_url_access`
"public_access": "VideoPublicAccessParams",
"auth_system_access": "VideoAuthSystemAccessParams",
"sign_url_access": "VideoSignURLAccessParams"
// end of the list of possible fields
}
Field |
Description |
channel_id |
string Required field. ID of the channel. |
title |
string Required field. Video title. |
description |
string Video description. |
thumbnail_id |
string ID of the thumbnail. |
auto_transcode |
enum AutoTranscode Auto start transcoding.
|
labels |
object (map<string, string>) Custom labels as |
tusd |
Upload video using the tus protocol. Includes only one of the fields Source type. |
public_access |
Video is available to everyone. Includes only one of the fields Video access rights. |
auth_system_access |
Checking access rights using the authorization system. Includes only one of the fields Video access rights. |
sign_url_access |
Checking access rights using url's signature. Includes only one of the fields Video access rights. |
VideoTUSDParams
Field |
Description |
file_size |
int64 File size. |
file_name |
string File name. |
VideoPublicAccessParams
Field |
Description |
Empty |
VideoAuthSystemAccessParams
Field |
Description |
Empty |
VideoSignURLAccessParams
Field |
Description |
Empty |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"video_id": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"channel_id": "string",
"title": "string",
"description": "string",
"thumbnail_id": "string",
"status": "VideoStatus",
"duration": "google.protobuf.Duration",
"visibility_status": "VisibilityStatus",
"auto_transcode": "AutoTranscode",
"subtitle_ids": [
"string"
],
// Includes only one of the fields `tusd`
"tusd": {
"url": "string"
},
// end of the list of possible fields
// Includes only one of the fields `public_access`, `auth_system_access`, `sign_url_access`
"public_access": "VideoPublicAccessRights",
"auth_system_access": "VideoAuthSystemAccessRights",
"sign_url_access": "VideoSignURLAccessRights",
// end of the list of possible fields
"created_at": "google.protobuf.Timestamp",
"updated_at": "google.protobuf.Timestamp",
"labels": "map<string, string>"
}
// 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. |
CreateVideoMetadata
Field |
Description |
video_id |
string ID of the video. |
Video
Field |
Description |
id |
string ID of the video. |
channel_id |
string ID of the channel where the video was created. |
title |
string Video title. |
description |
string Video description. |
thumbnail_id |
string ID of the thumbnail. |
status |
enum VideoStatus Video status.
|
duration |
Video duration. Optional, may be empty until the transcoding result is ready. |
visibility_status |
enum VisibilityStatus Video visibility status.
|
auto_transcode |
enum AutoTranscode Auto start transcoding.
|
subtitle_ids[] |
string IDs of active video subtitles. |
tusd |
Upload video using the tus protocol. Includes only one of the fields Source type. |
public_access |
Video is available to everyone. Includes only one of the fields Video access rights. |
auth_system_access |
Checking access rights using the authorization system. Includes only one of the fields Video access rights. |
sign_url_access |
Checking access rights using url's signature. Includes only one of the fields Video access rights. |
created_at |
Time when video was created. |
updated_at |
Time of last video update. |
labels |
object (map<string, string>) Custom labels as |
VideoTUSDSource
Field |
Description |
url |
string URL for uploading video via the tus protocol. |
VideoPublicAccessRights
Field |
Description |
Empty |
VideoAuthSystemAccessRights
Field |
Description |
Empty |
VideoSignURLAccessRights
Field |
Description |
Empty |