Skip to main content

Open-source video generation framework

Project description

Mosaico

Mosaico is a Python library for programmatically creating and managing video compositions. It provides a high-level interface for working with media assets, positioning elements, applying effects, and generating video scripts.

Installation

pip install mosaico

Features

  • AI-powered script generation for videos
  • Rich media asset management (audio, images, text, subtitles)
  • Flexible positioning system (absolute, relative, region-based)
  • Built-in effects (pan, zoom) with extensible effect system
  • Text-to-speech synthesis integration
  • Integration with popular ML frameworks, such as Haystack and LangChain

Quick Start

from mosaico.assets import create_asset
from mosaico.scene import Scene
from mosaico.video.project import VideoProject, VideoProjectConfig

# Create assets
image = create_asset("image", path="background.jpg")
text = create_asset("text", data="Hello World")
audio = create_asset("audio", path="narration.mp3")

# Create asset references with timing
image_ref = AssetReference.from_asset(image).with_start_time(0).with_end_time(5)
text_ref = AssetReference.from_asset(text).with_start_time(1).with_end_time(4)
audio_ref = AssetReference.from_asset(audio).with_start_time(0).with_end_time(5)

# Create scene
scene = Scene(asset_references=[image_ref, text_ref, audio_ref])

# Create project
project = (
    VideoProject(config=VideoProjectConfig())
    .add_assets([image, text, audio])
    .add_timeline_events(scene)
)

Cookbook

For common usage patterns and examples, see our Cookbook. Some examples include:

  • Creating basic videos with background and text
  • Building photo slideshows with music
  • Generating news videos from articles
  • Working with different asset types
  • Applying effects and animations
  • Using AI for script generation

Documentation

Comprehensive documentation is available here. Documentation includes:

  • Getting Started: Installation, setup, and basic usage
  • Concepts: Overview of key concepts and terminology
  • Cookbook: Examples and tutorials for common tasks
  • API Reference: Detailed reference for all classes and functions
  • Development: Information for contributors and developers
  • Roadmap: Future plans and features

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mosaico-0.1.0rc2.tar.gz (229.0 kB view details)

Uploaded Source

Built Distribution

mosaico-0.1.0rc2-py3-none-any.whl (75.9 kB view details)

Uploaded Python 3

File details

Details for the file mosaico-0.1.0rc2.tar.gz.

File metadata

  • Download URL: mosaico-0.1.0rc2.tar.gz
  • Upload date:
  • Size: 229.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.2

File hashes

Hashes for mosaico-0.1.0rc2.tar.gz
Algorithm Hash digest
SHA256 97e96ad129244224e1427f74b523f1592bccb9c34d1655882b1a37b1b45f1bd7
MD5 3f3dd30bf593a345c3b42df6022f3350
BLAKE2b-256 481eb8ec71d12ed952bc741edf1cf973109b08d12482293614858598ddfde13b

See more details on using hashes here.

File details

Details for the file mosaico-0.1.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for mosaico-0.1.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a06689b6690bb09e476b7b330d1e090a1351f907c9e74d38ff3f3db405d24be
MD5 ef66e373400dae5b68df5a9f9f2c148f
BLAKE2b-256 22af35e88852599826eaaa0205ba94a4a6e9eb6ade8464f6dd49574b247a5ffe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page