Skip to Content

A video's lifecycle

The five states a video moves through, what moves it, and what a re-encode does to a video that is already playing.

A video has one of five statuses, in the asset's status field. The status says whether it can play; the work of encoding (probing, transcoding, packaging) is tracked on jobs, so a video that is ready stays ready while it is encoded again.

The states

StatusWhat it meansPlays?
waiting_uploadThe video exists and its playback IDs are made, but the file hasn't arrived.No
processingThe file has arrived and is being encoded.No
readyAn output is published.Yes
erroredThe upload, the import or the first encode failed. error_code says why.No
deletedThe video was deleted. Its playback stopped at once.No

What moves it

FromToWhenWebhook
(new)waiting_uploadYour backend creates an upload with POST /v1/uploads.
(new)processingYour backend imports a URL with POST /v1/assets.
waiting_uploadprocessingThe upload is completed.
waiting_uploaderroredThe upload is cancelled (upload_cancelled) or sits idle for 24 hours (upload_expired).video.asset.errored
processingreadyThe first output is written and published.video.asset.ready
processingerroredThe import or the encode fails for good, for example import_failed or unsupported_source.video.asset.errored
erroredprocessingYou re-encode it with POST /v1/assets/{id}/reencode, if its source was kept.
readyreadyA re-encode finishes, the title changes, a playback ID is published, or the files move storage.video.asset.updated
anydeletedYou delete it with DELETE /v1/assets/{id}.video.asset.deleted

The asset's version rises on every change. Webhooks are delivered at least once and in no fixed order, so keep the highest version you have stored and ignore an older snapshot. See Receive webhooks.

Re-encoding a ready video

POST /v1/assets/{id}/reencode encodes the source again, for example with other renditions. The new encode writes a new output beside the current one:

  • The video stays ready, and viewers keep watching the current output.
  • When the new output is complete, the video switches to it in one step and you get video.asset.updated. Players that start after that get the new output.
  • If the re-encode fails, the current output keeps playing and you get video.asset.reencode_failed, with job.error_code saying why.

Only one job that changes a video runs at a time. A second re-encode while one runs is 409 job_active, with the running job's job_id; send "supersede": true to cancel the running job and start yours. A delete always wins: it cancels whatever is running.

A re-encode needs the source file. A video still waiting_upload has none (409 asset_not_ready), and one whose source was not kept can't be encoded again (409 source_missing).

Tracks

Subtitles and chapters have their own status, on each track: preparing, ready or errored. They are made after the video is ready and never hold it up, so expect video.asset.ready first, then video.asset.track.ready or video.asset.track.errored. See Subtitles and transcripts.

Next

On this page