0.1.3 • Published 4 months ago

@secondphantom/ffmpeg-fast-concat v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Ffmpeg Fast Concat

You can concat videos by ffmpeg

Install

npm i @secondphantom/ffmpeg-fast-concat

Usage

const ffmpegFastConcat = new FfmpegFastConcat({
      tempDir: 'tempDir',
});

const concatVideosDto: ConcatVideosDto = {
    inputVideoPaths: ['input_1.mp4','input_2.mp4'],
    outputVideoPath: 'output.mp4',
    transition: {
      duration: 500,
      name: "fade",
    },
  };

const outputFilePath = await ffmpegFastConcat.concat.videos(concatVideosDto);
    

API

Constructor

constructor input

tempDir
  • Type: string
  • Required: true

tempDir is absolute path

concurrency
  • Type: number
  • Required: false
  • Default: 4

concat

videos(input)

input
interface Transition {
  name: string;
  duration: number;
}

type ConcatVideosDto = {
  inputVideoPaths: string[];
  outputVideoPath: string;
  transition: Transition;
};
inputVideoPaths
  • Type: Array<string>
  • Required: true
outputVideoPath
  • Type: string
  • Required: true
transition
transition.name
  • Type: string
  • Required: true

FFmpeg xfade

transition.duration
  • Type: number
  • Required: true
return

output file path

Related

0.1.3

4 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago