Keep extension chains alive and save each finished segment.
The overall bar made a long queue look stuck at ~9% during the first clip, and nothing was written until the last step. Save checkpoints, use per-step progress, and stop treating a short Comfy history lag as a dropped job.
This commit is contained in:
@@ -249,9 +249,12 @@ export async function concatMp4(part1Path: string, part2Path: string, outputPath
|
||||
}
|
||||
|
||||
export async function stitchExtension(params: { part1Path: string; part2: Buffer; tmpDir: string }) {
|
||||
const part2Path = join(params.tmpDir, 'part2.mp4')
|
||||
const part2Path = join(params.tmpDir, `part2_${Date.now()}.mp4`)
|
||||
const finalPath = join(params.tmpDir, 'final_stitched_video.mp4')
|
||||
writeFileSync(part2Path, params.part2)
|
||||
if (!existsSync(part2Path) || !params.part2.length) {
|
||||
throw new Error('Extension segment was missing before stitch')
|
||||
}
|
||||
try {
|
||||
await xfadeStitch(params.part1Path, part2Path, finalPath)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user