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

Build log: turning one photo into a ~13-second racing meme video on Cloudflare Workers

说明与用途

使用 Cloudflare Workers、R2 和 D1 的自动化服务将用户照片转换为 13 秒的赛车迷因视频,验证面部、管理积分并在 7 天后自动删除文件。

问题

Users wanted to insert their own face into a viral racing meme clip, but existing tools required complex setups and paid services.

结果

The pipeline delivers a 13‑second racing meme video from a single photo in about four minutes, with automatic face validation, credit management, and audio handling, all within a single Cloudflare Worker.

工作流

  • 1. User uploads photo and signs in with Google; photo stored in R2.
  • 2. Pre‑charge face check verifies exactly one frontal face and rejects tiny faces or errors with a 503.
  • 3. Photo and signed reference clip URL sent to the video‑to‑video model; output length matches trimmed 12.8s reference.
  • 4. Output duration validated against reference; MP4 timing table rewritten if needed.
  • 5. Audio tracks dropped from the model output; original backing track (13.0s with 0.5s fade‑out) merged via ffmpeg endpoint.
  • 6. Result stored in R2; user notified via email; video available for download; both audio and silent copies provided.
  • 7. Automatic cleanup deletes photo and video 7 days after job completion.
  • 8. Credit ledger in D1 tracks usage; daily spend cap and per‑user limits enforced; failed jobs refunded appropriately.

证据

The model wants one clear face. If you send a group photo or a profile shot, it still bills you and the result is bad.

来源

The racing reference is trimmed to exactly 12.8s (384 frames; the old shot 5, a blurred close pass, made the rider's face drift) ...

来源

The music is an original backing track generated for the site, not any existing song. It's stored privately in R2 and merged with a hosted ffmpeg merge endpoint.

来源

  • 记录日期: 2026-10-16T19:55:57.579Z