v13

latestOpenAPI 3.0.0raw.githubusercontent.com2023-04-201625158.8 KB
Jobs

Create an Encoding Job

'Encoding jobs are created by sending an HTTP POST request to https://app.zencoder.com/api/v2/jobs. The post body must include one thing: the URL of a video to process. It may also include output settings for the job, including an output destination, notification settings, and transcoding settings. You also must send a Zencoder API Key in a Zencoder-Api-Key header.'

post/jobs

Headers

Content-Typestring required

Content-Type: application/json

Zencoder-Api-Keystring required

Your API key

Request body

generate_dynamic_profileboolean

'With CAE the number of outputs and parameters of such outputs may change dynamically for each input file. To specify limits on the number of outputs to be generated as well as other profile constraints, CAE job request must also include dynamic_profile_options object. The outputs reserved for CAE use should not include resolution, bitrate, or codec-related parameters. Instead, they should include labels dynamic_profile_rendition. The number of outputs reserved for CAE use must match the number specified as max_renditions in dynamic_profile_options.'

inputstring required

'A valid URL to a media file (HTTP/HTTPS, FTP/FTPS, SFTP, Azure, GCS, CF or S3), with or without authentication'

region'us' | 'europe' | 'asia' | 'sa' | 'australia' | 'us-virginia' | 'us-oregon' | 'us-n-california' | 'eu-dublin' | 'asia-singapore' | 'asia-tokyo' | 'sa-saopaulo' | 'australia-sydney'

'The AWS region or Google Compute Engine instance (beta) where Zencoder should process the job'

testboolean

'Enable test mode ("Integration Mode") for a job'

privateboolean

Enable privacy mode for a job

pass_throughstring

Optional information to store alongside this job

mockboolean

Send a mocked job request

groupingstring

A report grouping for this job

aspera_transfer_policy'fair' | 'low'

How to allocate available bandwidth for Aspera file transfers

transfer_minimum_rateinteger

A targeted rate in Kbps for data transfer minimums

transfer_maximum_rateinteger

A targeted rate in Kbps for data transfer maximums

expected_md5_checksumstring

The expected MD5 checksum of the input file. If the file's checksum does not match the provided checksum the job will fail.

credentialsstring

References saved credentials by a nickname

Example request

{
  "input": "s3://zencodertesting/test.mov",
  "region": "us-virginia",
  "pass_through": "my-custom-pass-through-value",
  "grouping": "my-custom-group-name",
  "transfer_minimum_rate": 2500,
  "transfer_maximum_rate": 300000,
  "expected_md5_checksum": "d5ed34b6b49f57a4a5f4be72fc0a2cd4",
  "credentials": "my_s3_credentials",
  "notifications": [
    "dev@example.com",
    "http://user:pass@example.com/path/to/notification/action",
    {
      "url": "https://example.com/notifications.html"
    }
  ],
  "outputs": [
    {
      "alternate_audio": {
        "input": "s3://zencodertesting/test.mov",
        "outputs": [
          {
            "type": "playlist",
            "alternate_audio": {
              "custom_audio_group": [
                {
                  "source": "english-audio",
                  "path": "alternate-audio-en.m3u8",
                  "language": "en"
                },
                {
                  "source": "french-audio",
                  "path": "alternate-audio-fr.m3u8",
                  "language": "fr"
                }
              ],
              "secondary_audio_group": {
                "path": "path/to/secondary-audio-group.m3u8",
                "language": "en",
                "name": "Secondary English Audio Track",
                "source": "secondary-english-audio"
              }
            }
          }
        ]
      },
      "audio_language": "en-US",
      "transcription_filename": "stc-episode-3-transcript.json",
      "caption_url": "http://example.com/captions.scc",
      "crf": 26,
      "cue_points": [
        {
          "time": 30.4
        }
      ],
      "decryption_key": "a5f6a7d6ef5d6a7a02a23dd35dd56a63",
      "decryption_key_url": "http://example.com/encryption.key",
      "decryption_password": "super-secret-password",
      "encryption_iv": "a5f6a7d6ef5d6a7a02a23dd35dd56a63",
      "encryption_key": "a5f6a7d6ef5d6a7a02a23dd35dd56a63",
      "encryption_key_rotation_period": 10,
      "encryption_key_url": "http://example.com/encryption.key",
      "encryption_key_url_prefix": "keys/",
      "encryption_password": "super-secret-password",
      "keyframe_manifest_filename": "my_iframe_index.m3u8",
      "prepare_for_segmenting": "hls,dash",
      "sample_aspect_ratio": "8:9",
      "select_audio_language": "eng",
      "select_audio_service_type": "main",
      "size": "640x360",
      "skip": {
        "min_size": "640x360",
        "max_size": "640x360",
        "min_duration": 300,
        "max_duration": 600,
        "min_audio_bitrate": 128,
        "max_audio_bitrate": 160,
        "min_video_bitrate": 800,
        "max_video_bitrate": 2000
      },
      "streaming_delivery_format": "dash",
      "streams": [
        {
          "path": "http://example.com/video/high/index.m3u8",
          "bandwidth": 500,
          "resolution": "800x600"
        }
      ],
      "ts_audio_pid": 33,
      "ts_muxrate": 2600,
      "ts_pcr_pid": 34,
      "ts_pmt_pid": 16,
      "ts_video_pid": 32,
      "vp6_stream_max_buffer": 5
    }
  ]
}

Response

A list of videos.

idinteger

The job id, an integer in the 64-bit range.

Example response

{
  "id": 365524597,
  "outputs": [
    {
      "id": 1294836780
    }
  ]
}