Skip to content

πŸŽ₯🎡 Streamline video and audio creation with FFmpeg-powered templates. Automate editing, mix audio, customize content, and compose professional multimedia effortlessly.

License

Notifications You must be signed in to change notification settings

heristop/ffmpeg-video-composer

Repository files navigation

FFmpeg Video Composer

Node.js Version License: MIT

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.

πŸŽ₯ Demo

Check out the video sample to see ffmpeg-video-composer in action (unmute for sound):

sample.mp4

View the template descriptor

πŸš€ Features

  • 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

πŸ›  Installation

Using npm (or yarn/pnpm)

pnpm add ffmpeg-video-composer

Cloning the Repository

git clone https://github.com/heristop/ffmpeg-video-composer.git
cd ffmpeg-video-composer
pnpm i

πŸ“– Usage

Command Line Interface

pnpm compile src/shared/templates/sample.json

This generates sample_output.mp4 in the build directory.

Programmatic Usage

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'));

πŸ§ͺ Running Tests

Ensure the quality of the codebase by running the test suite:

pnpm test

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“¬ Contact

If you have any questions or feedback, please open an issue on GitHub.

About

πŸŽ₯🎡 Streamline video and audio creation with FFmpeg-powered templates. Automate editing, mix audio, customize content, and compose professional multimedia effortlessly.

Topics

Resources

License

Stars

Watchers

Forks