This commit is contained in:
Andras Schmelczer 2026-05-14 08:09:19 +01:00
parent a8165249a4
commit a4103b0896
64 changed files with 5376 additions and 3832 deletions

View file

@ -1,7 +1,7 @@
import { execFileSync } from 'node:child_process';
import { existsSync, statSync } from 'node:fs';
import { OUTPUT_DIR } from './config.js';
import { recordedSizeFor, type Storyboard } from './script.js';
import { publishedSizeFor, recordedSizeFor, type Storyboard } from './script.js';
import { getStoryboard } from './storyboard.js';
interface Probe {
@ -58,7 +58,10 @@ function verifyVideo(path: string, storyboard: Storyboard) {
const stream = data.streams?.[0];
if (!stream) fail(`${path} has no video stream`);
const expectedSize = recordedSizeFor(storyboard.video);
// .webm is at CSS-pixel size; .mp4 is upscaled to publishedSize.
const expectedSize = path.endsWith('.webm')
? recordedSizeFor(storyboard.video)
: publishedSizeFor(storyboard.video);
const { minDurationS, maxDurationS, outputFps } = storyboard.video;
const duration = Number(data.format?.duration ?? 0);