Mosaico
Mosaico is a Python library created by Folha de S.Paulo and designed to programmatically create and manage video compositions. The tool allows journalists to quickly transform textual narratives into short videos, using artificial intelligence to assist in the process.
How It Works
Built on MoviePy, one of the most popular video editing libraries in Python, Mosaico offers a high-level interface for working with media assets, positioning elements, applying effects, and generating video scripts. With a focus on flexibility and extensibility, the library provides clean abstractions for managing different types of media, controlling positioning and layout, applying effects and animations, and integrating advanced features such as AI-based script generation, text-to-speech synthesis, and integration with popular machine learning frameworks. Its main features include script generation, asset management, a precise positioning system, an effects engine, speech synthesis, and external integrations, making it a powerful and versatile tool for programmatic video creation.
Documentation
Mosaico’s architecture is structured into modular components that interact to create complex video compositions. The Asset Reference System manages resources in large-scale projects, while the Positioning Engine offers absolute, relative, and region-based modes, performing frame-aware calculations.
The Effects Engine includes built-in effects and an extensible system for creating custom effects, supporting parameter-based configuration and composition for complex animations. Mosaico’s integrations include Haystack for document processing and script generation, LangChain for AI workflows, and speech and transcription services such as OpenAI, ElevenLabs, and AssemblyAI.
Script generation provides interfaces for custom creation and a framework for AI integration, organizing shots and scenes for direct script-to-video rendering. Project management includes video project setup and timeline management.
Customization and extensibility are fundamental features of Mosaico, designed with a modular architecture that allows for the extension of functionalities. The library includes an adapter system for external integrations and defined integration protocols.
In terms of performance, Mosaico implements memory management and parallel processing techniques to handle large-scale projects.
The technical requirements for Mosaico include Python 3.7 or higher, as well as dependencies such as MoviePy, NumPy, and Pillow. Optional dependencies may be required for specific integrations. This technical structure makes Mosaico a tool for developers and software engineers interested in creating programmatic video composition solutions.
To learn more, visit the repository on Github and check out the project documentation.
Illustrative Images