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.0rc1.tar.gz (226.8 kB view details)

Uploaded Source

Built Distribution

mosaico-0.1.0rc1-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mosaico-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 f421486fd1587a6e8a1ab09453908af74bbe09f0f866ece861dd6462584cc888
MD5 547e9c1535047b7a9c4e14a3ce34749f
BLAKE2b-256 3523aafdf944257cbf59a2effeac4f45e92562a9ae65f13b6ea62cac7e50e708

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mosaico-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 0255b3286f42c55f52e659bb4d79ffaf9f83021d86027608493ac4d6a9bf9b03
MD5 2ca61f11477c2d3184a5b1eedfefa896
BLAKE2b-256 c3400babba5b1d3ed42276f293e67aa312a47e7ac452f65f9149595490202f46

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