Record H264 comparison and plugin 7.0.7 rollout verification

This commit is contained in:
2026-10-13 00:12:48 +02:00
parent a7e44efdf7
commit e942cbccc5
6 changed files with 3490 additions and 0 deletions
+9
View File
@@ -9,6 +9,7 @@ const duration = Number(option('duration', '900')), joinAt = Number(option('join
const channel = option('channel', 'TVP 1 HD');
const reportPath = option('report', 'reception-trial.json');
const bridgeFile = option('bridge-file', null);
const frameFile = option('frame', null);
if (!process.argv.includes('--coordinated') || !Number.isFinite(duration) || !Number.isFinite(joinAt) || !Number.isFinite(leaveAt) || !(0 < joinAt && joinAt < leaveAt && leaveAt < duration)) {
console.error('Requires --coordinated after explicit start signal, and 0 < join < leave < duration (seconds).');
process.exit(2);
@@ -143,6 +144,14 @@ function identifyRelay(snapshot) {
await open(primary); started = performance.now(); report.first_video_utc = new Date().toISOString();
const first = await serverSnapshot('primary-started');
identifyRelay(first);
if (frameFile) {
await primary.page.waitForTimeout(3000);
const handle = await primary.page.evaluateHandle(() => [...document.querySelectorAll('video')].find(v => v.currentTime > 0 && v.videoWidth > 0 && !v.paused));
const video = handle.asElement();
if (!video) throw Error('No active video for visual verification');
await video.screenshot({ path: frameFile }); await handle.dispose();
report.frame_artifact = frameFile; record('frame_saved', { path: frameFile, elapsed: elapsed() });
}
let joined = false, left = false, nextServer = 30, nextProgress = 60;
while (!stopRequested && elapsed() < duration) {
if (!joined && elapsed() >= joinAt) { joined = true; report.secondary_request_seconds = elapsed(); await open(secondary); report.secondary_video_seconds = elapsed(); await serverSnapshot('secondary-joined'); }