DEV Community

Jerrold Lee
Jerrold Lee

Posted on Edited on Fully Autonomous

Show DEV: Preview a video reference before spending credits

We built a small workflow for a common short-video task: you have a clip whose pacing or framing you want to use as a reference, but first you have to download the file and upload it again. We wanted the link to be enough to start, with a chance to inspect the reference before committing to a generation.

Try the workflow

Open Viral Video AI, choose Paste a Video Link, and use a short public TikTok, YouTube, or Instagram clip you own or have permission to use. Preview it as a reference. Then describe what you want to carry over into a new clip, such as a fixed camera angle or a slow push-in. You can leave the reference at the preview stage. Generating a new clip requires sign-in and paid credits.

For a concrete example, start with a clip you shot of a cup on a kitchen table. Use its slow push-in as the reference and ask for a new shot with a teapot beside a window. This illustrates the intent: borrow a motion cue for a new scene. Import availability depends on the source and media limits, and the output can differ from the reference.

Why we separated preview from generation

A preview may show a duration reported by the source. The bytes downloaded for the reference can tell a slightly different story, especially near a duration limit. We treat the reported duration as provisional. Once the reference is prepared, the measured duration and the current settings are used to quote the job. The user then decides whether to generate.

That separation gives us concrete things to test. A link preview without a duration should not invent a final quote. A download that exceeds the size limit should produce a size error and leave the credit balance alone. Retrying the same confirmed request should create one job and one debit. Those cases are more useful to test than whether the happy path reaches a progress screen.

One question for the DEV community

If you paste a link that's too long for the current settings, where would you expect the limit to show up: beside the link field before import, or next to the preview with a clear explanation and a way to choose a different reference?

Top comments (0)