Open ixqbar opened 1 year ago
同问, outputDir无效,output设置文件路径无效。请问楼主解决了吗?
同问, outputDir无效,output设置文件路径无效。请问楼主解决了吗?
output: '../dist/x1.mp4',
`utils.removeFileToPath(e.output, ${outputDir}/${videoTitle || e.output})
exports.removeFileToPath = function (sourcePath, destinationPath) { console.log('removeFileToPath:', sourcePath, destinationPath) // const sourcePath = './file.txt'; // const destinationPath = './destination/newfile.txt'; // fs.rename(sourcePath, destinationPath, (err) => { // if (err) throw err; // console.log('File moved and renamed successfully!'); // }); // 创建读取流 const readStream = fs.createReadStream(sourcePath) // 创建写入流 const writeStream = fs.createWriteStream(destinationPath) // 执行复制操作 readStream.pipe(writeStream) // 监听复制完成事件 readStream.on('close', () => { // 删除源文件 fs.unlinkSync(sourcePath) console.log(文件已移动到 ${destinationPath}) }) }`
也没有使用 FFCreatorCenter, 只能通过output设置