How to use Encoding Templates

Our Live and VOD Encoding products are powerful but hard to use? Look no further, as Encoding Templates will give you the same powerful feature set you love with just one endpoint!

🚧

Closed beta

Please reach out to our support if you want to become an early adopter and try out this upcoming feature. Consider, that things might break and change until the public release.

We prepared some Encoding Template examples to get you started faster with some recommended workflows. Simply go to our Bitmovin Dashboard, browse the examples and start modifying them to your needs:

Template structure

Encoding Templates are written in YAML, as there is less visual clutter in comparison to JSON. Additionally, you can enrich your Encoding Template with comments to explain configuration decisions as you would do in a custom script that uses our SDK.

An example Encoding Template will look like this:

metadata:
  type: LIVE # can be either `LIVE` or `VOD`
  name: Standard VOD Workflow

inputs:
  https:
    encoding_https_input: # user-defined name to be used for reference within the template
    	# `properties` indicates the request payload of a POST request
      properties: # refers to the `/encoding/inputs/https` endpoint
        host: bitmovin-sample-content.s3.eu-west-1.amazonaws.com
        name: Bitmovin Sample Content

configurations:
	video:
  	h264:
    	encoding_h264:
      	properties:
    			...

encodings:
  my-encoding:
    properties:
      name: Standard VOD Workflow
      cloudRegion: AUTO
      encoderVersion: STABLE

    streams:
      video_h264:
        properties:
          inputStreams:
            - inputId: $/inputs/https/encoding_https_input # reference from line 7
              inputPath: /bbb_sunflower_1080p_60fps_normal.mp4
          codecConfigId: $/configurations/video/h264/encoding_h264
          mode: PER_TITLE_TEMPLATE
          
    ...
    
    start: # exactly one Encoding per template is required
      properties:
        encodingMode: THREE_PASS
        perTitle:
          h264Configuration: {}

Using Encoding Templates via SDK

❗️

Not available yet

Since this feature is still in closed-beta state, it is not available in our SDKs.

Using Encoding Templates via endpoint

🚧

Not recommended

Once the SDK is available with a public release, direct usage of endpoints is discouraged. Until then, you only have the Bitmovin Dashboard or direct endpoint requests.

The current closed-beta prototype consists of a synchronous endpoint that receives an Encoding Template. This Encoding Template must contain exactly one Encoding configuration, that the endpoint will trigger in our systems. If the Encoding Start requests was successfully made, the endpoint returns the Encoding ID.

Endpoint: https://api.bitmovin.com/v1/encoding/templates (prototype: synchronous might require an increased request timeout)

There are two ways to pass the Encoding Template to this request:

  • set a Content-Type:application/yaml request header and directly put your Encoding Template YAML into the request body
  • set a Content-Type:application/json request header and directly put your Encoding Template as a string-serialized YAML into a { configYaml: "metadata:..." } JSON request body

Do not forget to also set the other request headers:

  • required: set X-Api-Key with your user's API keys
  • (optional): set X-Tenant-Org-Id depending on your organization structure of where you want to run the Encoding