Skip to main content

OpenVideo

Open-source AI video generation library without API keys. Generate videos from text prompts or images using open-source models.

Features

  • Text-to-Video: Generate videos from text descriptions
  • Image-to-Video: Animate static images into videos
  • Multiple Models: Support for various open-source models (Zeroscope, ModelScope, AnimateDiff)
  • No API Keys Required: Fully local generation using open-source models
  • CLI Interface: Easy command-line usage
  • Python API: Programmatic access for developers

Installation

pip install openvideo

For development installation:

pip install openvideo[dev]

Requirements

  • Python 3.9+
  • CUDA-capable GPU (recommended for performance)
  • 8GB+ VRAM for video generation

Quick Start

CLI Usage

# Text to Video
openvideo text2video -p "a cat walking in the snow" -o output.mp4

# Image to Video
openvideo image2video -i input.png -o output.mp4 -p "camera panning"

Python API

from openvideo import VideoGenerator

# Initialize generator
generator = VideoGenerator(model_name="zeroscope")

# Generate from text
frames = generator.generate(
    prompt="a beautiful sunset over the ocean",
    num_frames=24,
    width=512,
    height=512,
)

# Save video
generator.save_video(frames, "output.mp4", fps=24)
# Generate from image
from PIL import Image

img = Image.open("input.png")
frames = generator.generate_from_image(
    image=img,
    prompt="gentle camera pan",
    num_frames=24,
)
generator.save_video(frames, "output.mp4")

Supported Models

Model Description VRAM
zeroscope High-quality text-to-video 8GB
modelscope Fast text-to-video 6GB
animatediff Animation from SD models 6GB

Configuration

GPU Settings

# Use specific device
generator = VideoGenerator(device="cuda")

# Use float16 for less VRAM
generator = VideoGenerator(dtype="float16")

Generation Parameters

Parameter Default Description
num_frames 24 Number of frames
width 512 Frame width
height 512 Frame height
num_inference_steps 25 Denoising steps
guidance_scale 7.5 CFG scale
seed None Random seed

Advanced Usage

Custom Model Loading

from openvideo.models.text2video import TextToVideoModel

model = TextToVideoModel(model_name="zeroscope")
model.load()
frames = model.generate(prompt="your prompt")

Batch Generation

prompts = [
    "a dog running in park",
    "a bird flying in sky",
    "rain falling on window",
]

for i, prompt in enumerate(prompts):
    frames = generator.generate(prompt=prompt)
    generator.save_video(frames, f"video_{i}.mp4")

Troubleshooting

Out of Memory

  • Reduce resolution (width/height)
  • Use float16 dtype
  • Reduce num_frames
  • Enable attention slicing

Slow Generation

  • Use GPU instead of CPU
  • Reduce num_inference_steps
  • Use smaller models

License

MIT License

Credits

  • Uses Hugging Face Diffusers
  • Model weights from various open-source projects

Metadata

Release files for openvideo-ai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openvideo-ai 0.1.0
File Size Uploaded Provenance
openvideo_ai-0.1.0.tar.gz 4.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openvideo-ai 0.1.0
File Interpreter ABI Platform
openvideo_ai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / openvideo_ai-0.1.0.tar.gz

Download URL openvideo_ai-0.1.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a13d09714bcfd983b8f3a713a579071b5f455ef6c0ba028d73a56f3db76be6d3
BLAKE2b-256 checksum
How to use checksums
7382ae9a5d3ee8d3c1873c130f874ff66c4616c6fbc25ae9ed92955ee2f252eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / openvideo_ai-0.1.0-py3-none-any.whl

Download URL openvideo_ai-0.1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77f65eacb6bcefd5045fbd96ff84f55fd66a9fd8c59777da65f99368eb18285c
BLAKE2b-256 checksum
How to use checksums
57f0ef6815800c678a0ee57a8eff1a7eee21f6cd1cdff636bd5b67e7571b5d1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Security for openvideo-ai 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page