Skip to content

htMarquee/PostAnimate

Repository files navigation

PostAnimate

Generate seamlessly looping animated movie posters from still images using AI image-to-video models via PiAPI.

Wonder Woman Back to the Future Pacific Rim

Avatar: Fire and Ash Stargate Jurassic Park

Wonder Woman • Back to the Future • Pacific Rim • Avatar: Fire and Ash • Stargate • Jurassic Park
All generated with Kling AI via PostAnimate

What it does

Point it at a movie-poster image and a short motion prompt, and PostAnimate prepares the image, runs it through one of 11 AI image-to-video models via PiAPI's unified API, and post-processes the result into a seamlessly looping video clip. Use it as a CLI or as a Python library.

Features

  • 11 AI models — Kling, Luma, Hunyuan, Hailuo, Wan, Wan 2.6, Veo 3, Veo 3.1, SkyReels, FramePack, Seedance
  • Seamless looping — crossfade blending or boomerang playback for a smooth loop point
  • Poster-native aspect ratio — preserves the exact 27:40 movie poster ratio (1296 × 1920)
  • Automatic image prep — resizes, pads, or crops any image to the correct dimensions
  • Unified API — every supported model accessed through one PiAPI account and one API key
  • Library + CLI — use as a Python package or from the command line

Quick start

git clone <this-repo>
cd animated_poster_generation

pip install -r requirements.txt
cp .env.example .env                    # add your PiAPI key

python postanimate_cli.py animate input/poster.jpg \
    -p "subtle floating particles, gentle light flickers"

Output lands in output/:

  • <name>_prepared.jpg — resized poster sent to the API
  • <name>_raw.mp4 — the model's raw output
  • <name>_loop.mp4 — the final seamlessly looping clip

Python 3.10+ and FFmpeg on PATH are required. Image uploads need the PiAPI Creator plan or higher.

Documentation

Doc What's in it
Setup Install dependencies, FFmpeg, API key, environment variables.
Models All 11 models — comparison table, deep-dive on each, "which model should I use?".
CLI reference Every subcommand (animate, models, loop, prep, fetch, extend) with every flag, plus a big examples block.
Library usage Using postanimate as a Python package — full pipeline, individual components, batch.
Prompt guide How to write motion prompts, a copy-paste LLM meta-prompt, and a ~35-prompt ready-made library organized by element.
Internals Pipeline walkthrough, loop modes, project structure, adding new models.
Troubleshooting Common errors and their fixes.

License

MIT

About

Turn still movie posters into seamlessly looping animated clips using AI image-to-video models via PiAPI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages