tnfe / FFCreator

A fast video processing library based on node.js (一个基于node.js的高速视频制作库)

Home Page:http://tnfe.github.io/FFCreator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating outputDir with the FFCreator instance

khatiwadaaj opened this issue · comments

const cacheDir = join(__dirname, "../cache/");
const outputDir = join(__dirname, "../video/");

// create creator instance
const width = 1080;
const height = 1920;
const creator = new FFCreator({
cacheDir: cacheDir,
outputDir: outputDir,
width: width,
height: height,
// log: true,
highWaterMark: "8mb",
parallel: 1,
fps: 30,
});

I have something like this, but it always creates the videos in / directory of where my index.js of project is.
Am I missing something?
Please direct me towards anything that is helpful.

Please use output.

const output = join(__dirname, "../video/video.mp4");

// create creator instance
const width = 1080;
const height = 1920;
const creator = new FFCreator({
  cacheDir: cacheDir,
  output: output,
  width: width,
  height: height,
  // log: true,
  highWaterMark: "8mb",
  parallel: 1,
  fps: 30,
});

mark

output: output,
width: width,

请问下 output 和outputDir ,分别是啥作用,以及有啥区别?我看example中使用outputDir就能正常输出在对应目录,而我就是在当前目录生成。不知道啥原因。