Skip to content

Cloudinary Uploads

  • storage.type must be cloudinary.
  • storage.baseDir must still be set because HLS output is created locally before upload.
  • storage.credentials must include cloudName, apiKey, and apiSecret.

processCloudinary() returns a single URL string for the uploaded master.m3u8 file.

const masterUrl = await sdk.processCloudinary("./input.mp4");

Every run uploads into the following path structure:

mediapipeline/<videoId>/<filename>

Example:

mediapipeline/7450677b-c0bf-4053-bfc5-b29d92f37171/master.m3u8
mediapipeline/7450677b-c0bf-4053-bfc5-b29d92f37171/variant_720p.m3u8
mediapipeline/7450677b-c0bf-4053-bfc5-b29d92f37171/segment_240p_001.ts
  • Resource type: raw
  • Timeout per file: 120000 ms
  • Max concurrent uploads per batch: 4
  • Retry attempts: 3
  • Exponential backoff: 1000, 2000, 4000 ms

The upload helper retries when Cloudinary responds with:

  • 429
  • 499
  • Any 5xx status code
  • TimeoutError

The SDK attempts to remove the temporary local HLS output directory after a successful Cloudinary upload when cleanup is enabled.