Video transcoding API for uploads

Upload an MP4, MOV or WebM file up to 500 MB, then request MP4, WebM, GIF or HLS by adding parameters to its CDN URL. Heavy jobs return 202 while they run. Request the same URL again until it returns 200.

How video processing works

  1. 1

    Upload

    MP4, MOV or WebM, up to 500 MB

  2. 2

    Request a rendition URL

    ?format=webm&width=1280

  3. 3

    202 Accepted

    Re-encode, HLS or GIF queued

  4. 4

    Poll the same URL

    Back off between attempts

  5. 5

    200 OK

    Served from cache from then on

Light jobs such as a MOV to MP4 remux return 200 straight away. There are no completion webhooks, so readiness is the URL returning 200.

Upload a video

Videos are usually too large to proxy through your own API, so use the presigned flow. Your backend asks for a single-use upload URL, the client PUTs the file, and your backend confirms.

const upload = await dreep.presignUpload({
  filename: "launch.mov",
  contentType: "video/quicktime",
  sizeBytes: 184_000_000,
});

// The client PUTs the file to upload.uploadUrl, then:
const asset = await dreep.confirmUpload({ id: upload.id });

const hls = dreep.url(asset, { format: "m3u8" });
const poster = dreep.url(asset, { format: "webp", width: 1280 });

What one upload gives you

HLS for longer videos

The player fetches small segments as needed, so playback starts sooner and seeking does not re-download the video.

MP4 and WebM fallbacks

H.264 MP4 for the widest playback support and VP9 WebM for smaller files, both from the same source.

Posters, previews and clips

A thumbnail at any second, a short GIF preview or a trimmed highlight, without running a separate FFmpeg pipeline.

Frequently asked questions

How do I know when a video transcode has finished?

Request the rendition URL. 202 Accepted means it is still processing, and 200 means it is ready and cached. Poll with exponential backoff. There are no completion webhooks today.

Which input and output formats are supported?

Inputs are MP4, MOV and WebM up to 500 MB. Outputs are MP4, WebM, MOV, animated GIF and HLS, plus thumbnails in JPEG, PNG or WebP and audio in MP3, WAV or AAC.

How do I play HLS from Dreep?

Request the asset with a .m3u8 extension or format=hls. Safari plays it natively. In other browsers use a library such as hls.js and attach it to a video element.

How do I generate a video thumbnail?

Request an image format on the video with the time parameter, for example ?format=webp&time=5. If time is past the end of the video, the last frame is used.

Related

Turn one upload into MP4, HLS and a poster frame

The Free plan includes 10 video transformations a month, processing the first 30 seconds of each video. Upload a clip and request its HLS manifest.