short-video-maker
gyoridavid · gyoridavid/short-video-maker
Máy chủ MCP và REST API này cho phép các tác nhân AI tự động tạo video ngắn cho các nền tảng như TikTok, Instagram Reels và YouTube Shorts.
Creates short videos for TikTok, Instagram Reels, and YouTube Shorts using the Model Context Protocol (MCP) and a REST API.
Xem trước
Bạn có thể làm gì với nó
- Tạo video ngắn hàng ngày cho các chiến dịch marketing dựa trên đầu vào văn bản.
- Tự động hóa việc tạo nội dung cho sự hiện diện video của thương hiệu cá nhân mà không cần chỉnh sửa thủ công.
- Tạo video tóm tắt các bài viết hoặc báo cáo dài để tiêu thụ nhanh chóng.
Kiểm tra an toàn
Dùng được, nhưng nên đọc ghi chú trước.
- ●Hơn một năm không cập nhật.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
📚 Join our Skool community for support, premium content and more!
Be part of a growing community and help us create more content like this
Description
An open source automated video creation tool for generating short-form video content. Short Video Maker combines text-to-speech, automatic captions, background videos, and music to create engaging short videos from simple text inputs.
This project is meant to provide a free alternative to heavy GPU-power hungry video generation (and a free alternative to expensive, third-party API calls). It doesn't generate a video from scratch based on an image or an image prompt.
The repository was open-sourced by the AI Agents A-Z Youtube Channel. We encourage you to check out the channel for more AI-related content and tutorials.
The server exposes an MCP and a REST server.
While the MCP server can be used with an AI Agent (like n8n) the REST endpoints provide more flexibility for video generation.
You can find example n8n workflows created with the REST/MCP server in this repository.
TOC
Getting started
Usage
Info
- Features
- How it works
- Limitations
- Concepts
- Troubleshooting
- Deploying in the cloud
- FAQ
- Dependencies
- Contributing
- License
- Acknowledgements
Tutorial with n8n
Examples
<video src="https://github.com/user-attachments/assets/1b488e7d-1b40-439d-8767-6ab51dbc0922" width="480" height="270"></video>
<video src="https://github.com/user-attachments/assets/bb7ce80f-e6e1-44e5-ba4e-9b13d917f55b" width="270" height="480"></video>
Features
- Generate complete short videos from text prompts
- Text-to-speech conversion
- Automatic caption generation and styling
- Background video search and selection via Pexels
- Background music with genre/mood selection
- Serve as both REST API and Model Context Protocol (MCP) server
How It Works
Shorts Creator takes simple text inputs and search terms, then:
- Converts text to speech using Kokoro TTS
- Generates accurate captions via Whisper
- Finds relevant background videos from Pexels
- Composes all elements with Remotion
- Renders a professional-looking short video with perfectly timed captions
Limitations
- The project only capable generating videos with English voiceover (kokoro-js doesn’t support other languages at the moment)
- The background videos are sourced from Pexels
General Requirements
- internet
- free pexels api key
- ≥ 3 gb free RAM, my recommendation is 4gb RAM
- ≥ 2 vCPU
- ≥ 5gb disc space
Concepts
Scene
Each video is assembled from multiple scenes. These scenes consists of
- Text: Narration, the text the TTS will read and create captions from.
- Search terms: The keywords the server should use to find videos from Pexels API. If none can be found, joker terms are being used (
nature,globe,space,ocean)
Getting started
Docker (recommended)
There are three docker images, for three different use cases. Generally speaking, most of the time you want to spin up the tiny one.
Tiny
- Uses the
tiny.enwhisper.cpp model - Uses the
q4quantized kokoro model CONCURRENCY=1to overcome OOM errors coming from Remotion with limited resourcesVIDEO_CACHE_SIZE_IN_BYTES=2097152000(2gb) to overcome OOM errors coming from Remotion with limited resources
docker run -it --rm --name short-video-maker -p 3123:3123 -e LOG_LEVEL=debug -e PEXELS_API_KEY= gyoridavid/short-video-maker:latest-tiny
Normal
- Uses the
base.enwhisper.cpp model - Uses the
fp32kokoro model CONCURRENCY=1to overcome OOM errors coming from Remotion with limited resourcesVIDEO_CACHE_SIZE_IN_BYTES=2097152000(2gb) to overcome OOM errors coming from Remotion with limited resources
docker run -it --rm --name short-video-maker -p 3123:3123 -e LOG_LEVEL=debug -e PEXELS_API_KEY= gyoridavid/short-video-maker:latest
Cuda
If you own an Nvidia GPU and you want use a larger whisper model with GPU acceleration, you can use the CUDA optimised Docker image.
- Uses the
medium.enwhisper.cpp model (with GPU acceleration) - Uses
fp32kokoro model CONCURRENCY=1to overcome OOM errors coming from Remotion with limited resourcesVIDEO_CACHE_SIZE_IN_BYTES=2097152000(2gb) to overcome OOM errors coming from Remotion with limited resources
docker run -it --rm --name short-video-maker -p 3123:3123 -e LOG_LEVEL=debug -e PEXELS_API_KEY= --gpus=all gyoridavid/short-video-maker:latest-cuda
Docker compose
You might use Docker Compose to run n8n or other services, and you want to combine them. Make sure you add the shared network to the service configuration.
version: "3"
services:
short-video-maker:
image: gyoridavid/short-video-maker:latest-tiny
environment:
- LOG_LEVEL=debug
- PEXELS_API_KEY=
ports:
- "3123:3123"
volumes:
- ./videos:/app/data/videos # expose the generated videos
If you are using the Self-hosted AI starter kit you