Create a Job

POST /jobs/

Authorization Header

  • Bearer token: OAuth 2.0 API access token. 

Parameters

  • format : json or xml. This will override the Request Accept header.
  • human : true or false. It makes response in structured form, useful only when calling API through curl or browser.
  • show_null: true or false. If set to "true", the response will contain also keys that are not set to a value.
  • expand_all: true or false. Recursively look up referenced objects (e.g.: preset id) and embed the respective json as a nested object directly into the response.

Example 

POST /jobs/
curl -X POST -H "Authorization: Bearer um9VmyJKTPGFqpkL_THjGE5rkXqfURDYqQ8MTBVidG3PtwkfABIdx6s_z9WlFl4_j" -H "application/json" -d '{ \
    "job": { \
      "input": { \
        "input_name": "uploads/ljDzFtXkNhBpYJ3K_RWL155oj7FWyriK/video02.mp4" \
      }, \
      "autograph": { \
        "watermark_strength": "light" \
      }, \
      "user_data" : "My Personal Marker",
      "output_prefix": "{job_id}/", \
      "outputs": [ \
        { \
          "output_name": "REAL6_A_", \
          "thumbnails": [ \
            { \
              "thumbnail_names": "thumb_{resolution}", \
              "thumbnail_preset": "thumbnails_small" \
            } \
          ], \
          "logos": [ \
            { \
              "logo_image": "https://s3-us-east-1.amazonaws.com/my_logo_pngs/logo30.png", \
              "logo_preset": "logo_30_bottom_right" \
            } \
          ], \
          "settings": { \
            "video": { \
              "height": "100%", \
              "width": "100%", \
              "bitrate": "90%" \
            } \
          }, \
          "preset": { id: "5260e39d84aea12008b69bc1" } \
        } \
      ], \
      "pipeline": { id: "5475dc68e4b00d2b0f7a6100" } \
    } \
}' "https://api.xvid.com/v1/jobs/?human=true&show_null=true"


  • pipeline_id: References the pipeline on which to perform the Job. This specifies the input and output locations for the Job's input and output files as well as the notification scheme that applies to the Job.

  • input:input_name: The URI/Filename of the input video file to convert. If given as a relative path, it is treated relative to the base input uri set in the referenced Pipeline.
  • input:force_container(optional): Force the transcoder to treat the input file as having the given container format instead of auto-detect.
  • input:force_aspect_ratio(optional): Force the transcoder to treat the input file as having the given aspect_ratio set instead of auto-detect.
  • input:framerate(optional): Force the transcoder to treat the input file as having the given framerate instead of auto-detect.
  • input:interlaced(optional): Force the transcoder to treat the input file as having the interlaced property as given instead of auto-detect.
  • user_data: User-provided string that will be stored with the job and returned again in further GET requests or upon ping callbacks.
  • output_prefix: Prefix to prepend globally to all files created by this job. Can be also foldernames if the prefix strings contains "/". Can contain {job_id} placeholder, which will be replaced with the id of the job.
  • autograph[] (optional): If not null, enables Xvid AutoGraph forensic watermarking for all outputs in this job. (Note: The output data internally processed and stored when using the autograph option will be about 2-8 times larger than without autograph due to the additional watermark data that must be precomputed in autograph mode. This will cause higher encoding and storage costs compared to not using autograph).
  • autograph[]:watermark_strength (optional): Determines the AutoGraph watermark embedding strength. Possible values are "stronger", "strong", "light", "verylight" and "ultralight", whereas "stronger" is the most robust embedding strength and "ultralight" the least visibly perceptable one. Default is: "light".
  • autograph[]:autograph_prefix (optional): Specifies the prefix to prepend to all AutoGraph copies created by making a call to the autographs subresource. The prefix must be made unique per Autograph by including the {tag} placeholder anywhere in the dir name - otherwise new autographed copies may overwrite older ones.
  • outputs[]: An array of output files to be created with their respective presets. This enables creating multiple outputs from one input within one Job.
  • outputs[]:preset_id: Preset id to be used for the job. It can be either a system or a custom-defined preset.
  • outputs[]:output_name: Filename to give to the converted output video file. No file ending should be specified because file ending is added automatically based on chosen container format. Can contain {job_id} placeholder, which will be replaced with the id of the job.
  • outputs[]:thumbnails (optional): If present, thumbnails will be created for the output according to thumbnail_preset selected and named according to thumbnail_names naming pattern.
  • outputs[]:logos (optional): If present, one or more logos will be overlayed onto the output video using the image URL provided as logo_image and according to the settings specified in the logo_preset selected.
  • outputs[]:settings:video:height (Optional ) : The width of the output video. Can be absolute value in pixels or relative in percentage.

  • outputs[]:settings:video:width (Optional) : The height of the output video. Can be absolute value in pixels or relative in percentage.
  • outputs[]:settings:video:framerate (Optional) : The framerate of the output video. Must be an absolute value and be one of the allowed choices according to general validation rules.
  • outputs[]:settings:video:bitrate (Optional) : The bitrate of the video track in the converted output video. Can be a percentage value or an absolute value in kbps.
  • outputs[]:settings:video:aspect_ratio (Optional) : The aspect_ratio to set on the output video. Must be one of the allowed choices under the general validation rules.
  • outputs[]:settings:max_duration (Optional) : Max number of seconds limiting the length of the output video.
  • outputs[]:settings:audio:bitrate (Optional) : The bitrate of the audio track in the converted output video. Can be a percentage value or an absolute value in kbps.
  • outputs[]:settings:audio:samplingrate (Optional) : The samplingrate of the audio tracks in the converted output video. Must be an absolute value and allowed under the General Validation rules.


  • No labels