Create videos in batch
Changed onMass upload of your videos. Method is used to set the task of creating videos in the form of 1 aggregated request instead of a large number of single requests.
An additional advantage is the ability to specify subtitles in the same request. Whereas for a normal single upload, subtitles are uploaded in separate requests.
All videos in the request will be processed in queue in order of priority. Use "priority" attribute and look at general description in POST /videos method.
Limits:
- Batch max size = 500 videos.
- Max body size (payload) = 64MB.
- API connection timeout = 30 sec.
Request
- Base URLhttps://api.gcore.com
- URLhttps://api.gcore.com/streaming/videos/batch
- AuthHTTP apikey
Query parameters
Restriction to return only the specified attributes, instead of the entire dataset. Specify, if you need to get short response. The following fields are available for specifying: id, name, duration, status, created_at, updated_at, hls_url, screenshots, converted_videos, priority. Example, ?fields=id,name,hls_url
Request body
Example request
{
"videos": [
{
"subtitles": [
{
"name": "English (AI-generated)",
"language": "eng",
"vtt": "WEBVTT\n\n1\n00:00:07.154 --> 00:00:12.736\nWe have 100 million registered users or active users who play at least once a week.\n\n2\n00:00:13.236 --> 00:00:20.198\nWe might have 80 or 100,000 playing on a given cluster."
},
{
"name": "German (AI-translated)",
"language": "ger",
"vtt": "WEBVTT\n\n1\n00:00:07.154 --> 00:00:12.736\nWir haben 100 Millionen registrierte Benutzer oder aktive Benutzer, die mindestens einmal pro Woche spielen.\n\n2\n00:00:13.236 --> 00:00:20.198\nWir haben vielleicht 80 oder 100.000, die auf einem bestimmten Cluster spielen."
}
]
}
]
}Response
Successful
Example response
[
{
"id": 70575,
"name": "Coffee Run - Blender Open Movie 720p",
"iframe_url": "https://player.gvideo.co/videos/2675_FnlHXwA16ZMxmUr",
"sprite": "https://static.gvideo.co/videoplatform/sprites/2675/10507272_sNOwd4luk5mGGf9M.mp4_sprite.jpg",
"sprite_vtt": "WEBVTT\n\n1\n00:00:00,000 --> 00:00:05,000\nxMbWbUSuvJ8NX2_sprite.jpg#xywh=0,0,100,42\n\n2\n00:00:05,000 --> 00:00:10,000\nxMbWbUSuvJ8NX2_sprite.jpg#xywh=100,0,100,42\n...\n"
}
]Changes
- breaking
the
response's property type changed fromobjectto no type for status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
added
subschema #2to theresponse propertyallOflist for the response status
- breaking