Unable to start timecut process due to bug with setting up the folder for frameCache
richardabear opened this issue · 1 comments
richardabear commented
An error pops up when I try and create a new video with the ff config:
const uuid = v4();
const tempFolderName = "./videos/" + uuid;
await fs.mkdirSync(tempFolderName);
const output = "./videos/" + uuid + ".mp4";
garbageCollector.addFile(output);
garbageCollector.addFolder(tempFolderName);
const data = stack.videoData;
timecut({
url: data.url,
viewport: data.viewport,
fps: data.fps, // saves 30 frames for each virtual second
duration: data.duration, // for 20 virtual seconds
frameCache: uuid,
quiet: true,
output,
frameProcessor: (buffer, currentFrame, totalFrames) => {
const progress = currentFrame / totalFrames;
parentPort.postMessage({
key: "progress",
progress,
});
},
// of the current working directory
})
err: Error: ENOENT: no such file or directory, scandir '/var/www/encoder/videos/70a9555f-e407-46a8-b7bd-980fd0011422/timecut-temp-1607066744976'
at Object.readdirSync (fs.js:955:3)
at deleteFolder (/var/www/encoder/node_modules/timecut/index.js:51:6)
at /var/www/encoder/node_modules/timecut/index.js:194:9
at processTicksAndRejections (internal/process/task_queues.js:97:5)
as you can see its trying to create a video inside of timecut-temp-1607**** which i think is wrong because this is the actual name of the file itself? the folder should just be 70a***
richardabear commented
Update: this was not actually caused by anything on timecut, however perhaps we can add better error logging for when this happens. Apparantly, on one of my ubuntu instances I had forgotten to properly install chromium, but was able to install puppeteer