The swiss army knife of lossless video/audio editing
Feature media: dark menu bar, hero with brighter clips
Claude647deb558a8f
diff --git a/script/featureMedia.ts b/script/featureMedia.tsindex 77b57877..f711e3e0 100644--- a/script/featureMedia.ts+++ b/script/featureMedia.ts@@ -65,7 +65,7 @@ await writeFile(join(configDir, 'config.json'), JSON.stringify({ windowBounds: {// The app's log, including the renderer's console. Failed actions don't fail the HTTP request, so check the screenshots and this logconst appLog = join(outDir, `${scenarioName}-app.log`);// The app path must come first: the app skips the first two arguments when run as `electron <app>` (process.defaultApp)-const app = execa('node_modules/electron/dist/electron', ['.', '--no-sandbox', '--config-dir', configDir, '--disable-networking', '--http-api', String(port)], { reject: false, env: { ELECTRON_ENABLE_LOGGING: '1' }, stdout: { file: appLog }, stderr: { file: appLog } });+const app = execa('node_modules/electron/dist/electron', ['.', '--no-sandbox', '--config-dir', configDir, '--disable-networking', '--http-api', String(port)], { reject: false, env: { ELECTRON_ENABLE_LOGGING: '1', GTK_THEME: 'Adwaita:dark' }, stdout: { file: appLog }, stderr: { file: appLog } });async function post(path: string, body?: unknown) {const response = await fetch(`http://127.0.0.1:${port}/api/${path}`, {diff --git a/script/featureMedia/scenarios.ts b/script/featureMedia/scenarios.tsindex 302ed484..21565ed1 100644--- a/script/featureMedia/scenarios.ts+++ b/script/featureMedia/scenarios.ts@@ -4,20 +4,20 @@// Keep each scenario short (10-30 s of video) and about one feature.import type { Scenario } from './types.ts';-const scenarios: Record<string, Scenario> = {- // For the website's homepage: a short silent loop of the core idea. Keep it quick, and don't use clips that need a credit- hero: {+// Mark and label three parts and merge them into one file, without the export confirmation+function heroScenario(clip: string, parts: [start: string, end: string, label: string][]): Scenario {+ return {description: 'Keep the good parts and get a new file in seconds',- clips: ['DJI_0759.MP4'],+ clips: [clip],config: { autoMerge: true, exportConfirmEnabled: false },async run({ open, action, actionWithDialog, shot, wait, startVideo }) {- await open('DJI_0759.MP4');+ await open(clip);// Wait until the thumbnails are loaded, so the loop starts on the opened fileawait wait(4000);startVideo();await shot('opened');await wait(1500);- for (const [start, end, label] of [['00:00:02', '00:00:05', 'Sea'], ['00:00:10', '00:00:13', 'Cliffs'], ['00:00:18', '00:00:22', 'Sunset']] as const) {+ for (const [start, end, label] of parts) {await action('goToTimecodeDirect', { time: start });await action('setCutStart');await wait(400);@@ -33,7 +33,13 @@ const scenarios: Record<string, Scenario> = {await wait(2500);await shot('exported');},- },+ };+}++const scenarios: Record<string, Scenario> = {+ // For the website's homepage: a short silent loop of the core idea. Keep it quick, and don't use clips that need a credit+ hero: heroScenario('DJI_0740.MP4', [['00:00:01', '00:00:04', 'Lighthouse'], ['00:00:06', '00:00:09', 'Cliffs'], ['00:00:11', '00:00:14', 'Ocean']]),+ 'hero-beach': heroScenario('DJI_0121.MOV', [['00:00:00.5', '00:00:02.5', 'Waves'], ['00:00:03.5', '00:00:05.5', 'Beach'], ['00:00:06.5', '00:00:08.5', 'Lagoon']]),'cut-segments': {description: 'Mark and label two segments to keep, play them and export',clips: ['DJI_0759.MP4'],