
Export files to YouTube
🤖/youtube/store exports encoding results to YouTube.
Note
This Robot only accepts videos.
Installation
Since YouTube works with OAuth, you will need to generate Template Credentials to use this Robot.
To change the title, description, category, or keywords per video, we recommend to inject variables into your Template.
Adding a thumbnail image to your video
You can add a custom thumbnail to your video on YouTube by using our "as" syntax for the "use" parameter to supply both a video and an image to the step:
"exported": {
"use": [
{ "name": "video_encode_step", "as": "video" },
{ "name": "image_resize_step", "as": "image" },
],
...
},
If you encounter an error such as "The authenticated user doesnʼt have permissions to upload and set custom video thumbnails", you should go to your YouTube account and try adding a custom thumbnail to one of your existing videos. Youʼll be prompted to add your phone number. Once youʼve added it, the error should go away.
Keep your credentials safe
Usage example
Export an uploaded video to YouTube and set some basic parameters:
{
"steps": {
"exported": {
"robot": "/youtube/store",
"use": ":original",
"credentials": "YOUR_YOUTUBE_CREDENTIALS",
"title": "Transloadit: Video Example",
"description": "Some nice description",
"category": "science & technology",
"keywords": "transloadit, robots, botty",
"visibility": "private"
}
}
}Parameters
output_metaRecord<string, boolean> | boolean | Array<string>Allows you to specify a set of metadata that is more expensive on CPU power to calculate, and thus is disabled by default to keep your Assemblies processing fast.
For images, you can add
"has_transparency": truein this object to extract if the image contains transparent parts and"dominant_colors": trueto extract an array of hexadecimal color codes from the image.For videos, you can add the
"colorspace: true"parameter to extract the colorspace of the output video.For audio, you can add
"mean_volume": trueto get a single value representing the mean average volume of the audio file.You can also set this to
falseto skip metadata extraction and speed up transcoding.resultboolean(default:false)Whether the results of this Step should be present in the Assembly Status JSON
queuebatchSetting the queue to 'batch', manually downgrades the priority of jobs for this step to avoid consuming Priority job slots for jobs that don't need zero queue waiting times
force_acceptboolean(default:false)Force a Robot to accept a file type it would have ignored.
By default, Robots ignore files they are not familiar with. 🤖/video/encode, for example, will happily ignore input images.
With the
force_acceptparameter set totrue, you can force Robots to accept all files thrown at them. This will typically lead to errors and should only be used for debugging or combatting edge cases.usestring | Array<string> | Array<object> | objectSpecifies which Step(s) to use as input.
- You can pick any names for Steps except
":original"(reserved for user uploads handled by Transloadit) - You can provide several Steps as input with arrays:
{ "use": [ ":original", "encoded", "resized" ] }
Tip
That's likely all you need to know about
use, but you can view Advanced use cases.- You can pick any names for Steps except
credentials— requiredstringThe authentication Template credentials used for your YouTube account. You can generate them on the Template Credentials page. Simply add the name of your YouTube channel, and you will be redirected to a Google verification page. Accept the presented permissions and you will be good to go.
title— requiredstringThe title of the video to be displayed on YouTube.
Note that since the YouTube API requires titles to be within 80 characters, longer titles may be truncated.
description— requiredstringThe description of the video to be displayed on YouTube. This can be up to 5000 characters, including
\nfor new-lines.category— requiredautos & vehicles | comedy | education | entertainment | film & animation | gaming | howto & style |The category to which this video will be assigned.
keywords— requiredstringTags used to describe the video, separated by commas. These tags will also be displayed on YouTube.
visibility— requiredpublic | private | unlistedDefines the visibility of the uploaded video.