Py’otrMuhammad Toheed Sahar

Automated AI animal Shorts pipeline

A local pipeline that writes a script, generates AI stills, animates them, edits the clip with music and sound effects, and uploads it to YouTube Shorts.

Client
Own project
Year
2025
Type
AI video & media

The problem

I wanted to test how far a one-person Shorts channel could run on its own: an idea in, a published 10 to 15 second vertical video out, with no manual editing in between.

How I built it

A local language model writes a three-scene script (hook, offering, call to action), fal.ai Flux makes the stills and Kling animates them. MoviePy assembles the scenes with matched sound effects and a music bed, a metadata step writes the title and tags, and the YouTube Data API uploads the result. State lives in SQLite: a clip library and a record of every produced video.

What got hard

  1. The animation step failed with 404 on every Kling endpoint I tried (four different model strings).

    I pinned the exact model endpoint enabled on the account, and the pipeline went on to run on Kling v2.5 Turbo.

  2. The unofficial TikTok uploader reported success even when the upload had failed.

    I dropped it as a production path, kept YouTube on the official API, and wrote the video plus a metadata file to a hand-off folder for the other platforms.

  3. Scenes generated one by one felt disjointed as a clip.

    I structured every script as three timed beats (an interactive hook, an offering, a wave) so each clip has a beginning, a middle and an end.

The result

During testing it produced five finished 1080x1920 Shorts of 10 to 15 seconds and uploaded three of them to YouTube through the official API.