cottom/openshorts-cpu

Turn long videos into short vertical clips with captions, hooks and an editable layer (CPU)

Public
27 runs

Run time and cost

This model runs on CPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

OpenShorts: long video to short vertical clips

Give it a long video (an upload, a direct link, or a YouTube link). It finds the best moments, reframes them to 9:16 around the speaker, and returns ready-to-post clips. Each clip also comes with an editable layer: captions with word timings, a hook text and an assets track. An app can edit and re-export the clip in the browser without running the model again.

Bring your own keys: gemini_api_key picks the moments and writes titles. ElevenLabs (elevenlabs_api_key) is only needed for dubbing. Keys are secret inputs, used only for your prediction and masked in the logs.

This is the CPU model: the same inputs and outputs as the GPU model cottom/openshorts, slower but cheaper per run. It takes up to 60 minutes of source by default.

Output

A list of files. metadata.json describes all of them. Match the other URLs to it by file name, because the list order is not guaranteed:

  • clip_NN.mp4: publish-ready, with captions and hook burned in (when burn_in is on)
  • clean_NN.mp4: the same clip with nothing burned in, the base for an editor
  • clip_NN.jpg: a poster frame
  • clip_NN_<lang>.mp4: dubbed (with dub_language)

Per clip, metadata.json holds the title, hook, descriptions, source start/end, word timings, and an edit object (schema openshorts.edit/1) with the caption, hook and overlay layers. Replicate deletes output files after about an hour, so copy them to your own storage.

Progress and errors

The logs carry machine-readable lines, [openshorts:progress] {"stage": ...}: downloading, transcribing (percent), rendering, clip_ready, done. A failed prediction’s error starts with a code:

  • [youtube_blocked]: YouTube bot-checked the server. Pass youtube_cookies, a residential proxy_url, or upload the file.
  • [source_unavailable]: the video is private, removed or locked.
  • [no_clips]: nothing clip-shaped was found.
  • [invalid_api_key]
  • [gpu_error]
  • [transient]: already retried once inside the job.
  • [timeout]: no clip finished in time.
  • [pipeline_error]

Replicate stops a prediction after 30 minutes. The model stops itself at 26 minutes and returns the clips already finished ("partial": true in metadata.json).

Tips

  • YouTube often bot-checks cloud servers. The most reliable input is a file (video) your app downloaded, or a direct link to one.
  • burn_in: false skips the burned render: faster, for apps that edit in the browser.
  • max_source_minutes caps cost on long videos.
Model created
Model updated