video-chain

Chains short generated video clips into one continuous video by feeding each clip's last frame forward.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/astralform-ai/skills --skill video-chain-astralform-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: video-chain
Source: https://github.com/astralform-ai/skills/tree/main/skills/video-chain
Command: npx skills add https://github.com/astralform-ai/skills --skill video-chain-astralform-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve? AI video generation produces only a single short clip (about five seconds) per call, so creating a 15-, 30-, or 60-second video requires chaining multiple clips together while keeping the seams invisible. This Skill automates that chaining: it extracts each clip's last frame, uses it as the next clip's starting frame, and stitches all segments into one verified continuous file. ## Core Features & Use Cases - Last-frame chaining: Extracts the final frame of each generated clip with ffmpeg and feeds it as the source image for the next generation, preserving scene continuity. - Verified stitching: Joins segments via stream copy or re-encode and validates the joined duration against the sum of the parts, catching silent timebase mismatches. - Drift and continuity control: Optional color matching pulls exposure back toward the opening frame on long chains, and the continuity reference guides prompt writing so each segment ends on a resting frame. - Use Case: A user provides a still image and asks for a 30-second continuous shot. The Skill plans six motion prompts, generates six clips sequentially, and delivers one joined 30-second MP4. ## Quick Start Ask the assistant in video mode with a source image attached: "Turn this still into a 30-second continuous video." ## Quick Start Provide a still image in video mode and request a specific duration such as "make a 30-second continuous video from this image."

Frequently Asked Questions about video-chain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI-generated video longer than 5 seconds?

Generate the first clip from a still image, extract its last frame with ffmpeg, and pass that frame as the source image for the next generation. Repeat until the target duration is reached, then stitch the clips into one file with a duration check.

How do I join multiple MP4 clips into one video with ffmpeg?

Use ffmpeg's concat demuxer with stream copy when all clips share codec, pixel format, and frame rate, otherwise re-encode with libx264. Always verify the joined duration against the sum of the segments, since stream copies across mismatched timebases can silently drop seconds.

Why do chained video clips drift in color and exposure?

Each generation pass shifts exposure and saturation slightly, and the shifts compound across segments. Past four segments, color-matching each handoff frame back toward the opening frame arrests the drift, at the cost of a one-frame step at the seam.

Can generated video clips include audio?

No. The generate_video tool produces silent clips and the stitched output stays silent. Narration or music requires a separate ffmpeg pass over the finished master file.

When should I not chain video clips together?

Do not chain when the desired result is a montage or multiple distinct shots with scene changes. Chaining produces one continuous take; different locations or subjects should each start from their own still and be joined as cuts instead.

Why does a stitched video play fine but end up shorter than expected?

A stream copy across clips with mismatched timebases produces a playable file that is seconds short, which watching the opening never reveals. The stitch step probes the output and fails if the joined duration differs from the expected sum by more than 0.3 seconds.