fix ffmpeg error

This commit is contained in:
legop3
2026-01-04 13:14:32 -05:00
parent 066f976cf4
commit b4edf72c9a
@@ -196,10 +196,14 @@ async function buildReplayVideo({ cameraId = null } = {}) {
const y = Math.floor(i / layout.cols) * tileHeight; const y = Math.floor(i / layout.cols) * tileHeight;
layoutParts.push(`${x}_${y}`); layoutParts.push(`${x}_${y}`);
} }
filterParts.push( if (cameraEntries.length === 1) {
`${cameraEntries.map((_, i) => `[v${i}]`).join('')}` + filterParts.push('[v0]null[v]');
`xstack=inputs=${cameraEntries.length}:layout=${layoutParts.join('|')}:fill=black[v]`, } else {
); filterParts.push(
`${cameraEntries.map((_, i) => `[v${i}]`).join('')}` +
`xstack=inputs=${cameraEntries.length}:layout=${layoutParts.join('|')}:fill=black[v]`,
);
}
const outPath = path.join(tmpDir, 'replay.mp4'); const outPath = path.join(tmpDir, 'replay.mp4');
await execFileAsync('ffmpeg', [ await execFileAsync('ffmpeg', [