videos
This commit is contained in:
parent
6c6780fc60
commit
f7e0814a38
8 changed files with 206 additions and 92 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { existsSync, mkdirSync, statSync } from 'node:fs';
|
||||
import { existsSync, mkdirSync, statSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { AUTH_STATE_PATH, LEAD_IN_S, OUTPUT_DIR } from './config.js';
|
||||
import { assertHardwareWebGL, launchRecordingBrowser } from './browser.js';
|
||||
import { narrationLog } from './narration.js';
|
||||
import { cuesToVtt, narrationLog } from './narration.js';
|
||||
import { installDemoRoutes } from './routes.js';
|
||||
import type { Storyboard } from './script.js';
|
||||
import { storyboards } from './storyboard.js';
|
||||
|
|
@ -105,6 +105,11 @@ async function recordOne(storyboard: Storyboard): Promise<void> {
|
|||
console.log(
|
||||
`[${storyboard.name}] wrote ${cues.length} narration cues → ${join(dir, 'narration.json')}`
|
||||
);
|
||||
const vttPath = join(dir, 'narration.vtt');
|
||||
writeFileSync(vttPath, cuesToVtt(cues));
|
||||
console.log(
|
||||
`[${storyboard.name}] wrote ${cues.length} WebVTT captions → ${vttPath}`
|
||||
);
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue