Automate video creation from research to rendering
AI Vídeo Engine is a Node.js toolkit that orchestrates multiple LLMs, text-to-speech, and Remotion compositions to create engaging short videos for social media.
See examples: YouTube @codestackme | TikTok @codestackme
- Requirements
- Installation
- Environment variables
- Pre-requisites
- Available scripts
- Usage examples
- Contributing
- Node.js v20 (see
.nvmrc) - pnpm
- FFmpeg installed and in your
PATH - Modal services for audio alignment:
pnpm installCreate a .env file at the project root. Required variables are validated in src/config/env.ts:
- AI Models:
GEMINI_API_KEY,OPENAI_API_KEY,ANTHROPIC_API_KEY - Search & Email:
GOOGLE_SERP_API_KEY,GOOGLE_SERP_ID,GMAIL_CLIENT_ID,GMAIL_CLIENT_SECRET,GMAIL_REFRESH_TOKEN - Audio Services:
MFA_BASE_URL,MFA_API_KEY,AENEAS_BASE_URL,AENEAS_API_KEY,ELEVENLABS_API_KEY - Script Management:
NOTION_TOKEN,NOTION_DEFAULT_DATABASE_ID,NOTION_NEWS_DATABASE_ID
- Download background videos (mp4 files) and place them in
public/assets/. These will be used randomly in video compositions. - Replace
public/assets/cody.pngand images insrc/video/Felippe.tsxwith your own profile pictures.
Run any command with pnpm <command>:
dev:script <topic>– Generate a video script about any topic using AI research and writingdev:newsletter [file]– Convert newsletter content into video scripts (fetches from Gmail if no file provided)dev:news– Research latest news and generate video scripts automaticallydev:debate <topic1> [topic2...]– Create debate videos with opinions from multiple AI models (OpenAI, Anthropic, Gemini, Grok)
dev:video– Download scripts from Notion, align audio, and render all video compositionsdev:remotion– Preview video compositions in the browser using Remotion Studio
dev:metrics– Fetch and display TikTok analytics metricsdev:output– Download finished videos and thumbnails from Notion
Generate a video from a topic:
pnpm dev:script "Artificial Intelligence"
pnpm dev:videoCreate a debate video:
pnpm dev:debate "Should AI replace developers?" "Future of remote work"
pnpm dev:videoProcess newsletter into video:
pnpm dev:newsletter
pnpm dev:videoPreview compositions:
pnpm dev:remotionContributions are welcome! If you spot a bug or want to add features:
- Fork this repository and create a new branch for your changes.
- Install dependencies with
pnpm install. - Commit your work and open a pull request describing what you've done.
Feel free to open issues for questions or ideas.