๐Ÿ‹

ezffmpeg

๐ŸŽฅ

Edit videos without having to use ffmpeg

Features

๐ŸŽฌ Easy Concatenation

Combine multiple videos and audio files with ease

๐Ÿ”„ Auto iPhone Rotation

Automatically handles iphone's video rotation and orientation

๐Ÿ’ฌ Text Overlay

Add beautiful text overlays with full customization

๐Ÿ“ฆ Zero Dependencies

No external dependencies required, just ffmpeg installed on your system

๐Ÿ“ Easy Video Scaling

Automatically scales and pads videos to match your desired dimensions

โฑ๏ธ Position & Timing

Precise control over video positioning and timing in your final output

Setup

1

Install and initialize

Create a new instance with your desired dimensions

const ezffmpeg = require('ezffmpeg');

const project = new ezffmpeg({
  width: 1080,
  height: 1920
});
2

Load your clips

Add videos, audio, and text with precise timing

await project.load(clips);
3

Export your video

Generate your final video with one command

await project.export({
  outputPath: 'output.mp4'
});

Example

example.js
const ezffmpeg = require('ezffmpeg');

const project = new ezffmpeg({
  width: 1080,
  height: 1920
});

// Load and concatenate videos
async function loadAndExportVideos() {
  await project.load([
    {
      type: 'video',
      url: 'train.mp4',
      position: 0,
      cutFrom: 1,
      end: 8,
    },
    {
      type: 'video',
      url: 'forest.mp4',
      position: 8,
      end: 12,
    },
    {
      type: 'video',
      url: 'river.mp4',
      position: 12,
      end: 16,
    },
    {
      type: 'audio',
      url: 'music.mp3',
      position: 1,
      end: 18
    },
    {
      type: 'text',
      text: 'summer vlog',
      fontSize: 48,
      fontColor: 'white',
      position: 3,
      end: 8
    },
    {
      type: 'text',
      text: 'hope you like ezffmpeg!',
      fontSize: 48,
      fontColor: 'white',
      position: 16,
      end: 18,
    }
  ]);

  await project.export({
    outputPath: 'output.mp4'
  });
}

loadAndExportVideos();
Videos from @kanenori and audio from @vividillustrate on Pixabay
GitHub API Documentation Twitter