Docs / Guides / Transcoding & packaging

Transcoding & packaging

Turn source media into an ABR ladder and package it as HLS/DASH — as separate steps, or chained in one pipeline.

Once an asset has source media, generating a streamable ABR ladder is a two-stage pipeline: transcode, then package. You can run either stage alone, or chain both in one call.

1. Pick a transcoding profile

Profiles describe the output rendition ladder (resolutions, bitrates, codecs) and are stored per workspace. A fresh workspace has none until you seed the defaults:

Request
curl -X POST https://<your-instance>/api/v1/profiles/bootstrap

List what's available with GET /api/v1/profiles/, or add your own with POST /api/v1/profiles/ — raw YAML body. See the full shape in the Profiles reference.

2. Submit a transcode job

Request
curl -X POST https://<your-instance>/api/v1/assets/<id>/transcode \
  -H "Content-Type: application/json" \
  -d '{"profile": "<profile-name>"}'

This returns a Job of type transcode. Poll GET /api/v1/jobs/{id} for status, progress, and — once done — renditionAssetIds, the child assets holding each rendition.

The first transcode submitted to an idle workspace pays a cold-start cost while the auto-scaler spins up a transcoder instance (roughly 60–120s). See Operating a workspace → auto-scaler to trade that off against standing cost with a warm floor.

3. Package into HLS/DASH

Request
curl -X POST https://<your-instance>/api/v1/assets/<id>/package

The packager is provisioned lazily on a workspace's first packaging job and reused afterwards — the very first call on a fresh workspace pays a similar cold-start cost to the transcoder's. Once done, manifest URLs are attached to the asset; fetch them with the Delivery guide.

4. Or: run both as one pipeline

To avoid manually sequencing the two calls above and polling each job in turn, run them as a single pipeline execution:

Request
curl -X POST https://<your-instance>/api/v1/assets/<id>/execute \
  -H "Content-Type: application/json" \
  -d '{"pipeline": "transcode-and-package", "profile": "<profile-name>"}'

Poll GET /api/v1/assets/{id}/executions/{execId} for a single status covering every step. See Pipelines reference for the execution shape, and GET /api/v1/assets/{id}/pipelines to list which pipeline names are available to run.