mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 01:50:47 -04:00
fix ffmpeg error
This commit is contained in:
@@ -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}`);
|
||||||
}
|
}
|
||||||
|
if (cameraEntries.length === 1) {
|
||||||
|
filterParts.push('[v0]null[v]');
|
||||||
|
} else {
|
||||||
filterParts.push(
|
filterParts.push(
|
||||||
`${cameraEntries.map((_, i) => `[v${i}]`).join('')}` +
|
`${cameraEntries.map((_, i) => `[v${i}]`).join('')}` +
|
||||||
`xstack=inputs=${cameraEntries.length}:layout=${layoutParts.join('|')}:fill=black[v]`,
|
`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', [
|
||||||
|
|||||||
Reference in New Issue
Block a user