Open OriX0 opened 1 year ago
Some hints:
run
/save
callsA very crude example:
const videoPath = '1.mp4';
const baseCommand = ffmpeg()
.addInput(videoPath)
.outputOptions("-y")
.setDuration(10)
.withVideoCodec("copy")
const first = baseCommand.clone()
.setStartTime("00:00:30")
.output("output1.mp4")
const second = baseCommand.clone()
.setStartTime("00:01:00")
.output("output2.mp4")
first
.on("end", function (err) {
console.log("first end");
if (!err) {
console.log("first conversion Done");
}
second
.on("end", function (err) {
console.log("second end");
if (!err) {
console.log("second conversion Done");
}
})
.on("error", function (err) {
console.log("second error: ", err);
})
.run()
})
.on("error", function (err) {
console.log("first error: ", err);
})
.run()
Version information
Code to reproduce
I need to edit a video multiple times, which means there are multiple startTimes and durations. But I don't know what to do. When I run the following code, I can only handle the first one, and then the processor goes crazy and gets stuck. I think it should be a resource occupation, but I don't know how to make a release.
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
Normal speed operation
Observed results
the processor goes crazy and gets stuck
Checklist