The power of fframes with the simplicity of Python.
Documentation · Example · Agent skill
pip install fframes-pyOr with uv:
uv add fframes-pyRender a three-second title card:
from fframes.compose import Composition, Position, Rectangle, Text, Tween, Video
video = Video(
resolution=(1280, 720),
fps=30,
composition=Composition(
duration=3,
children=(
Rectangle(size=(1280, 720), fill="#172033"),
Text(
content="Hello, frames",
position=Position(x="center", y="center"),
font_size=64,
fill="#FFD43B",
opacity=Tween(from_value=0, to_value=1, duration=1),
),
),
),
)
video.render("hello.mp4")Text uses system fonts; supply font files for reproducible
layout. For repeated previews or exports, reuse video.compile().
Render a one-second sequence of SVG frames:
import fframes
svg = (
'<svg xmlns="http://www.w3.org/2000/svg" width="640" height="360">'
'<rect width="640" height="360" fill="#3776AB"/></svg>'
)
native = fframes.compile_video(fframes.VideoConfig(width=640, height=360, fps=30), (svg,) * 30)
fframes.render(native, "frames.mp4")See low-level operations for scalar animation and frame sampling.