Template management
This section outlines the core features available within each template on the platform. These tools help you manage, configure and get the most out of your templates.
Available actions
Default render options
Each template can define a set of default Output formats and Render options that will be used for every render execution of that template. These options are set up in the template details page, and they can be overridden by the options supplied when invoking the render.
The overriding is done in the all or nothing manner per category, meaning that if you provide a specific rendering option category in a render request, all default options from the same category will be ignored.
On the Template details page, click on the Edit under the Default render options section, which will open a settings modal.
API cURL example - Set default options
curl -X POST \
-H "Content-Type: application/json" \
-u "[API_KEY]:" \
-d '{
"options": {
"captions": {
"captionsPosition": "TOP",
"captionsStyle": "BASIC_WITH_STROKE_AND_SHADOW",
"srtFileUrl": "https://my.cnd.net/srt.srt"
},
"projectFiles": {
"uploadEnabled": true
},
"watermark": {
"url": "https://example.com/watermark.png"
}
},
"outputFormat": {
"attachment": false,
"attachmentFileName": "my_cool_video",
"outputModule": "H_264",
"postEncoding": {
"type": "none"
},
"settingsTemplate": "BEST_SETTINGS"
}
}' \
https://api.plainlyvideos.com/api/v2/projects/[PROJECT_ID]/templates/[TEMPLATE_ID]/options
Reference parameters
Some of the options support the usage of parameter references as their values. This is useful when you want to have a dynamic option that depend on a render parameter.
To reference a parameter in an option value, you need to use the following syntax:
{{parameterName:defaultValue}}
The default value is optional, and if not defined, will resolve the option to null
if the given parameter name could not be found in the render parameters. Optionally, you can define an empty string as the default value, by using the following syntax:
{{parameterName:}}
You can combine multiple parameter references and fixed (static) values in the same option. In this case all the references will be replaced by their values, and the fixed values will remain as they are. Note that if any of the referenced parameters is given without a default value and without a render-time value then the entire result of the option will be null
.
{{name}} - {{season:Winter}} Sale Project - 16x9
The fields that support parameter references are:
- Video file download name
- Webhook passthrough
- Integration passthrough
Read more about the referencing parameters in the Change file name and Passthrough sections.
Reference passthrough values in the default options
It is also possible to reference a value of a the webhook or the integration passthrough in the default options. These are available as integrationPassthrough
and webhookPassthrough
parameters respectively.
Same rules apply for usage of these parameters as for the regular render parameters.
{{integrationPassthrough}}
{{webhookPassthrough:}}
{{webhookPassthrough:someDefaultValue}}
Integrations
You can also set up integrations for the template, which will be used when rendering the template. This is done in the same way as setting up integrations for a project.
Integrations card on the Template details page provides you with a quick overview of your integrations setup for the template. You can stop/start, remove or add integrations directly from the card.
Generate CSV example
You can generate a CSV file with the template parameters by clicking on the Generate CSV button. This will download a CSV file with all of your parameters and layer parameters, to get you started faster with batch rendering.
Editing templates
To edit a template, navigate to the Template details page, and click on the Edit template button. This will start the editing process that is exactly the same as Creating template, where you can edit the template name, composition, and parametrized layers.
To edit parametrized layers, click on the Parametrized layers tab, and select the layer you want to edit. This will open the Parametrization window where you can change the layer name and parametrization options.
FAQ
Can I change the composition used for a template later?
You will need to re-parametrize the layers in the new composition, as the previous parametrization will be removed. This is because the layers in the new composition may have different names or types, and the parametrization needs to be updated accordingly.