ffmpeg-video-composer
is a tool designed to streamline the process of video compilation and audio mixing using FFmpeg. It enables dynamic template generation, video rendering, and audio composition, making it a comprehensive solution for creating personalized multimedia content programmatically.
Check out the video sample to see ffmpeg-video-composer
in action (unmute for sound):
sample.mp4
- Dynamic video and audio template generation
- Easy video compilation and audio mixing using FFmpeg
- Flexible JSON-based template descriptor system
- CLI for quick video creation
- JSON configuration for complex project setups
- Custom project configurations support
- Audio overlay and mixing capabilities
- Automated video editing and composition
pnpm add ffmpeg-video-composer
git clone https://github.com/heristop/ffmpeg-video-composer.git
cd ffmpeg-video-composer
pnpm i
pnpm compile src/shared/templates/sample.json
This generates sample_output.mp4
in the build
directory.
import { compile, loadConfig } from 'ffmpeg-video-composer';
const projectConfig = {
assetsDir: './assets',
currentLocale: 'en',
fields: {
form_1_firstname: 'Firstname',
form_1_lastname: 'Lastname',
},
};
// Using a template descriptor object
compile(projectConfig, {
global: {
// ... (template configuration)
},
sections: [
// ... (section configurations)
],
});
// Or using a JSON file
await compile(projectConfig, await loadConfig('./src/shared/templates/sample.json'));
Ensure the quality of the codebase by running the test suite:
pnpm test
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or feedback, please open an issue on GitHub.