Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Generate videos in bulk using the Shotstack API

说明与用途

使用 Shotstack 的批量视频生成自动化流程:创建带占位符的模板,准备 CSV,运行脚本逐行提交渲染请求,轮询状态并收集最终 URL。

问题

Creating a unique video for each product in a catalog is time‑consuming if done manually; a scalable solution is needed to render hundreds of personalized videos efficiently.

结果

The pipeline renders 100 three‑second vertical videos in under five minutes of output time, costing roughly five minutes of Shotstack credits. It scales to thousands of videos with minimal code changes.

工作流

  • Create a Shotstack template with merge fields for product_name, headline, price, image_url, and brand_color.
  • Export the template ID from the stage environment and later from production.
  • Generate a 100‑row CSV (or pull from a database/CRM) with the required columns.
  • Write a script (Node.js or Python) that: 1) reads the CSV, 2) validates each row, 3) submits a POST /edit/{version}/templates/render request per row, 4) records the render ID, 5) polls the status until completion, 6) collects the final video URL.
  • Store the render IDs and URLs in a manifest for later use.
  • Optionally, preflight the first few rows to catch errors before the full batch.
  • Run the script against the stage environment first, then repeat with production keys.
  • Use the stage environment for development (watermarked videos, lower limits) and production for final outputs.

证据

Shotstack does not accept an entire CSV in a single Edit API request.

来源

The tutorial renders 100 three‑second videos and records every render ID in a resumable manifest, then collects permanent hosted URLs when the renders finish.

来源

Use the stage environment while developing. Sandbox videos are watermarked and require at least one available credit, while v1 creates production outputs.

来源

  • 记录日期: 2026-09-02T14:26:19.518Z