Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit bd87090e51b8be61de4b9157b7a9c1136626ff40
parent ef9f9aab9a0fb459da7512ff291aa12801c6c9af
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 21 Nov 2026 20:55:19 -0500

record-live: provenStart is what was recorded, not the flag passed; an audio-only part is never taken as inside

REVIEW-LF-2:
- 1: a part is marked proven from the start by what it records. YouTube's
  from-start generator formats only on a stream under 120 h old (its start
  time, else an ended stream's duration). Any other --live-from-start
  (Rumble, Twitch: ffmpeg at the DVR playlist's first LISTED segment) only
  when this run's playlist read listed the start, and only for the first
  attempt: a run that began after the window slid neither replaces a stored
  container nor removes run 1's part.
- 2: the Kick VOD part is marked after its poll, only when the poll's first
  segment is the platform's first.
- 4: containment and the covered removal compare like with like: a part
  with a picture only inside a picture part not merged here, an audio-only
  part only inside an audio-only one (a part with both may hold less sound
  than its length); a probe that fails is "not known": never contained.
- 6: a source-media file no pointer names says what the person should do.
- Docs: the definition of proof in OPERATING.md and the LivePart comment.

Tests: the Rumble slide (both shapes), a YouTube stream past 120 h, a
Kick VOD whose poll began at segment 40, the audio-only mirror case, a
pointer whose file is gone (with and without a source-media file), the two
note-7 guards; "1.1" now expects the audio-only part kept.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
MOPERATING.md | 3++-
Mcommon/controller/recordLive.test.ts | 171+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
Mcommon/controller/recordLive.ts | 65++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
Mcommon/lib/liveCapture.ts | 11+++++++----
4 files changed, 226 insertions(+), 24 deletions(-)

diff --git a/OPERATING.md b/OPERATING.md @@ -1453,7 +1453,8 @@ pnpm ops keep-videos --json '{"slug":"example-rumble","ids":["v1abcde"],"note": VOD that covers the stream removes the channel's live-edge part; one that does not keeps it. A part not from the start (a live-edge part, one no row describes) goes only when the landed file is from the start and at least the ENDED stream's own duration less 60 s — never on a coverage by the clock. Only a part PROVEN to begin at the start - (yt-dlp `--live-from-start`, a platform VOD read from its first segment: `provenStart`) counts as from the start for + (`provenStart`: YouTube's from-start generator on a stream under 120 h old; on Rumble, Twitch and the rest only a + first attempt whose playlist read still listed the start; a Kick VOD whose poll began at its first segment) counts as from the start for a removal, a replacement or the coverage; an index-0 part, the browser path and a part of a row written before the mark do not. A part with a picture is never "inside" an audio-only landed part, nor one merged here from separate streams. A stored container that cannot be read, or a `source-media` file no pointer names, counts as stored. **A recording already in the store** (an earlier run's landing, a shutdown's included) is replaced diff --git a/common/controller/recordLive.test.ts b/common/controller/recordLive.test.ts @@ -903,7 +903,7 @@ test("1.1: an earlier run's longer from-start part lands, and this run's live-ed assert.equal((await readdir(store())).filter((n) => n.startsWith(`.${id}.`)).length, 1, "an acknowledgement removes nothing"); }); -test("1.1: of this run's own parts, a shorter from-start part is inside the landed one and goes", async () => { +test("1.1: of this run's own parts, a shorter audio-only from-start part is kept beside the landed one (its sound is not proven inside)", async () => { const id = "exmplkeep02"; // Attempt 1 records audio only for 45 s (one stream missing: retried), // attempt 2 records both from the start. @@ -917,9 +917,11 @@ test("1.1: of this run's own parts, a shorter from-start part is inside the land }); assert.equal((await run).status, "landed"); assert.equal(calls.length, 2); - assert.deepEqual((await readdir(store())).filter((n) => n.startsWith(`.${id}.`)), []); + // The audio-only part is NOT taken as inside the landed one: that file's + // own sound may be shorter than its length (REVIEW-LF-2 4) — kept, listed. + assert.deepEqual((await readdir(store())).filter((n) => n.startsWith(`.${id}.`)).map((n) => /\.f140\.m4a$/.test(n)), [true]); const row = (await rowOf(id))[0]!; - assert.equal(row.keptParts, undefined); + assert.equal(row.keptParts?.length, 1); assert.equal(row.missingStream, undefined, "the second attempt has both"); assert.equal(row.parts[0]!.missingStream, "video"); assert.equal(row.parts[0]!.failureClass, "partial"); @@ -1248,10 +1250,12 @@ test("landing: a live-edge part goes only when the landed file is from the start // The VOD's length against the ended stream's duration: by the clock // nothing is proven; with a duration the live-edge part goes at exactly // duration - 60 s, not a second short (the tolerance, 100 s here, covers both). - for (const [uuid, duration, vod, gone] of [ - ["01a164b1-0c18-723a-a785-f9637c98bbb1", null, 5000, false], - ["01a164b1-0c18-723a-a785-f9637c98bbb2", 10000, 9940, true], - ["01a164b1-0c18-723a-a785-f9637c98bbb3", 10000, 9939, false], + // (A VOD whose poll did not begin at segment 0 is not proven: kept.) + for (const [uuid, duration, vod, gone, firstSeq] of [ + ["01a164b1-0c18-723a-a785-f9637c98bbb1", null, 5000, false, 0], + ["01a164b1-0c18-723a-a785-f9637c98bbb2", 10000, 9940, true, 0], + ["01a164b1-0c18-723a-a785-f9637c98bbb3", 10000, 9939, false, 0], + ["01a164b1-0c18-723a-a785-f9637c98bbb4", 10000, 9990, false, 40], ] as const) { let reads = 0; const meta = { id: uuid, extractor: "kick:vod", uploader_id: "synthc", release_timestamp: Math.floor(Date.now() / 1000) - (duration ?? 5000), formats: [{ protocol: "m3u8_native", height: 360, url: "https://stream.kick.com/y/360p30/playlist.m3u8" }] }; @@ -1279,7 +1283,7 @@ test("landing: a live-edge part goes only when the landed file is from the start }, poll: async (o) => { await writeFile(o.output, `format=mpegts;seconds=${vod};`); - return { segments: 500, seconds: vod, gaps: 0, firstSeq: 0, ended: "the VOD has not grown" }; + return { segments: 500, seconds: vod, gaps: 0, firstSeq, ended: "the VOD has not grown" }; }, land, freeBytes: async () => 1e15, @@ -1434,3 +1438,154 @@ test("LF 9: with an empty store a short from-start partial lands and does not su assert.equal(rows.find((r) => r.status === "landed")!.coverage?.covers, false); assert.equal(rows.find((r) => r.status === "failed")!.needsAttention, true); }); + +// --- REVIEW-LF-2 ------------------------------------------------------------------ + +// Rumble: `--live-from-start` is ffmpeg at the DVR playlist's first LISTED +// segment. A run whose playlist read still lists segment 1 is from the start; +// one that began after the window slid is not. +const DVR_SLID = "#EXTM3U\n#EXT-X-TARGETDURATION:2\n#EXT-X-MEDIA-SEQUENCE:151\n#EXTINF:2,\nm_151.ts\n#EXTINF:2,\nm_152.ts\n"; +async function rumbleRun(id: string, o: { dvr: string; seconds: number; duration: number; stop?: "shutdown" }) { + const ac = new AbortController(); + let reads = 0; + const meta = { ...RUMBLE_META, id, live_status: "is_live", timestamp: Math.floor(Date.now() / 1000) - o.duration }; + return recordLiveRun({ + paths, + request: { slug: SLUG, url: `https://rumble.com/${id}-show.html` }, + plan: { url: `https://rumble.com/${id}-show.html`, platform: "rumble", id }, + channelConfig: CONFIG, + cookiePolicy: NO_COOKIES, + onLog: () => {}, + signal: ac.signal, + deps: { + refresh: async (cwd: string, args: string[]) => { + reads++; + const out = args[args.indexOf("-o") + 1]!; + const m = reads === 1 ? meta : { ...meta, live_status: "was_live", duration: o.duration }; + await writeFile(path.join(cwd, path.dirname(out), "metadata.info.json"), JSON.stringify(m)); + return { exitCode: 0, stderrTail: "", archiveLine: null, formatLine: null }; + }, + fetchText: async () => o.dvr, + spawn: async ({ args }) => { + await writeFile(args[args.indexOf("-o") + 1]!, `format=mpegts;seconds=${o.seconds};`); + if (o.stop) { + ac.abort(); + return { exitCode: null, stderrTail: "", signalled: true }; + } + return { exitCode: 0, stderrTail: "", signalled: false }; + }, + land, + freeBytes: async () => 1e15, + handoff, + shuttingDown: () => o.stop === "shutdown", + }, + }); +} +const rumbleStored = async (id: string) => { + const { savedVideoPath } = await import("../lib/savedVideo"); + const p = await loadSavedVideo(path.join(CORPUS, "channels", SLUG, "data", id)); + return p ? ((await fakeProbe(savedVideoPath(p)))?.seconds ?? null) : null; +}; +const rumbleLeft = async (id: string) => (await readdir(path.join(paths.savedVideosDir, SLUG)).catch(() => [] as string[])).filter((n) => n.startsWith(`.${id}.`)); + +test("LF2 finding 1 (Rumble): a from-start run that began after the DVR window slid is not proven — it never replaces the stored start nor removes run 1's part", async () => { + // (a) Run 1 from the true start, landed by a shutdown; run 2 after the slide "covers" by length. + const a = "v7lfslid1"; + await rumbleRun(a, { dvr: DVR, seconds: 3600, duration: 10000, stop: "shutdown" }); + assert.equal(await rumbleStored(a), 3600); + await assert.rejects(rumbleRun(a, { dvr: DVR_SLID, seconds: 9950, duration: 10000 }), /not landed/); + assert.equal(await rumbleStored(a), 3600, "the stored start stays"); + // (b) Run 1's part in staging (its row: proven); run 2 after the slide lands, run 1's part is kept. + const b = "v7lfslid2"; + const stem = `.${b}.live-2026-11-20T01-00-00-000Z.ytdlp`; + await mkdir(path.join(paths.savedVideosDir, SLUG), { recursive: true }); + await writeFile(path.join(paths.savedVideosDir, SLUG, `${stem}.ts`), "format=mpegts;seconds=3600;"); + const { upsertLiveRecordingRow } = await import("../lib/liveRecordings-server"); + await upsertLiveRecordingRow(paths, SLUG, { + id: b, url: `https://rumble.com/${b}-show.html`, platform: "rumble", startedAt: "2026-11-20T01:00:00.000Z", status: "interrupted", + fromStart: true, attempts: 1, mustKeep: false, + parts: [{ method: "ytdlp", url: "u", fromStart: true, provenStart: true, startedAt: "2026-11-20T01:00:00.000Z", stem }], + } as never); + const s = await rumbleRun(b, { dvr: DVR_SLID, seconds: 9950, duration: 10000 }); + assert.equal(s.status, "landed"); + assert.ok((await rumbleLeft(b)).some((n) => n === `${stem}.ts`), "run 1's part is kept"); +}); + +test("LF2 finding 1 (YouTube): a from-start run of a stream older than 120 h is not proven (the generator starts 120 h back)", async () => { + const id = "exmpllf120h"; + await landedAtShutdown(id, 3600); + const old = Math.floor(Date.now() / 1000) - 121 * 3600; + // 7200 s of a stream whose ended duration is 7210 s: it "covers" and is longer than the stored hour. + const r = await incidentRun( + id, + async (args) => { + await writeFile(`${outOf(args)}.mp4`, "format=mov,mp4;seconds=7200;"); + return okExit; + }, + { meta: { ...YT_META(id), release_timestamp: old, live_status: "post_live", duration: 7210 } }, + ); + await assert.rejects(r.run, /not landed/); + assert.equal(await storedSeconds(id), 3600); +}); + +test("LF2 note 3: a pointer whose file is gone is 'stored, unknown' when the store folder holds a source-media file; with the folder empty or absent it is an empty store", async () => { + const { savedVideoDir } = await import("../lib/savedVideo"); + // (a) The pointer names source-media.mp4 (gone); source-media.mkv is there. + const a = "exmpllfptr1"; + await landedAtShutdown(a, 3600); + const dirA = savedVideoDir(paths, YT_CONFIG, YT_SLUG, a); + const named = (await readdir(dirA)).find((n) => n.startsWith("source-media."))!; + await rm(path.join(dirA, named)); + await writeFile(path.join(dirA, "source-media.mkv"), "format=matroska;seconds=5000;"); + const ra = await incidentRun(a, writesAfter(0), { meta: { ...YT_META(a), release_timestamp: Math.floor(Date.now() / 1000) - 590 } }); + await assert.rejects(ra.run, /not landed/); + assert.ok((await stat(path.join(dirA, "source-media.mkv"))).size > 0); + // (b) The pointer names a file that is gone, the folder empty: lands as an empty store. + const b = "exmpllfptr2"; + await landedAtShutdown(b, 3600); + const dirB = savedVideoDir(paths, YT_CONFIG, YT_SLUG, b); + await rm(dirB, { recursive: true, force: true }); + const rb = await incidentRun(b, writesAfter(0), { meta: { ...YT_META(b), release_timestamp: Math.floor(Date.now() / 1000) - 590 } }); + assert.equal((await rb.run).status, "landed"); +}); + +test("LF2 note 4: an audio-only part is not 'inside' a longer part whose own audio may be shorter", async () => { + const id = "exmpllfaud1"; + const ac = new AbortController(); + const { run } = await incidentRun( + id, + async (args, n) => { + if (n === 1) { + // Only its audio (1 h), then the video failed. + await writeFile(`${outOf(args)}.f140.m4a`, "format=mp4;seconds=3600;v=none;"); + return { exitCode: 1, stderrTail: "1: ERROR: The downloaded file is empty\n", signalled: false }; + } + // Both, 4 h on the container's length (its audio may be shorter) — a Cancel. + await writeFile(`${outOf(args)}.mp4`, "format=mov,mp4;seconds=14400;"); + ac.abort(); + return { exitCode: null, stderrTail: "", signalled: true }; + }, + { signal: ac.signal, request: { doNotClean: false, note: undefined } }, + ); + await run; + assert.ok((await left(id)).some((n) => /\.f140\.m4a$/.test(n)), "the audio-only part is kept"); +}); + +test("LF2 note 7: with a container stored, a zero-byte file and a fragments-only part's .ytdl are not removed by a run that lands nothing", async () => { + const id = "exmpllfg7a1"; + await landedAtShutdown(id, 3600); + await mkdir(store(), { recursive: true }); + const zero = path.join(store(), `.${id}.live-2026-11-20T02-00-00-000Z.ytdlp.f18.mp4`); + await writeFile(zero, ""); + const frag = `.${id}.live-2026-11-20T03-00-00-000Z.ytdlp.f18.mp4`; + await writeFile(path.join(store(), `${frag}-Frag7`), "bytes of a fragment"); + await writeFile(path.join(store(), `${frag}.ytdl`), JSON.stringify({ downloader: { current_fragment: { index: 7 } } })); + const r = await incidentRun(id, async (args, n) => { + if (n <= 3) return failEmpty; + await writeFile(`${outOf(args)}.mp4`, "format=mov,mp4;seconds=2000;"); + return okExit; + }); + await assert.rejects(r.run, /not landed/); + assert.ok(await stat(zero).then(() => true, () => false), "the zero-byte file stays"); + assert.ok(await stat(path.join(store(), `${frag}.ytdl`)).then(() => true, () => false), "the .ytdl stays"); +}); diff --git a/common/controller/recordLive.ts b/common/controller/recordLive.ts @@ -65,6 +65,7 @@ import { classifyAttempt, extractionRefused, ffmpegLiveArgs, + firstSequenceOf, formatUnavailable, lastErrorLine, liveAttemptSchedule, @@ -1085,18 +1086,38 @@ async function recordLiveRunInner( // the same thing for a DVR playlist); "index0": `--no-live-from-start` with // ffmpeg told index 0 — for an extractor that does not mark a format from // the start; "now": the live edge. + // YouTube's from-start formats come from the extractor's own fragment + // generator (`http_dash_segments_generator`), which begins at fragment 0 + // for a stream under 120 h old (extractor/youtube/_video.py MAX_DURATION). + const dashGenerator = + Array.isArray(meta?.formats) && (meta!.formats as Record<string, unknown>[]).some((f) => /http_dash_segments_generator/.test(String(f.protocol ?? ""))); + const startProvable = (first: boolean): boolean => { + if (dashGenerator) { + // Its age: from its start time, else (an ended stream) its duration. + const age = streamStartSec !== null ? now().getTime() / 1000 - streamStartSec : typeof meta?.duration === "number" ? (meta.duration as number) : null; + return age !== null && age < 120 * 3600; + } + return first && record.reach?.fromStart === true; + }; const ytdlpPart = async ( url: string, tag: string, mode: "from-start" | "index0" | "now", extraNote = "", + // The run's first attempt, made with no wait before it. + firstAttempt = false, ): Promise<RecorderOutcome> => { const file = separate ? stemPath(tag) : partPath(tag); const part = begin("ytdlp", url, file, mode !== "now"); if (mode === "index0") part.index0 = true; - // Proven from the stream's start: yt-dlp `--live-from-start` (the - // extractor's own generator from fragment 0). - if (mode === "from-start") part.provenStart = true; + // PROVEN from the stream's start — a fact about what is recorded, not the + // flag passed (REVIEW-LF-2 1): YouTube's from-start formats are the + // extractor's own generator from fragment 0, on a stream under 120 h old + // (past it the generator starts 120 h back); any other `--live-from-start` + // (Rumble, Twitch: ffmpeg at the DVR playlist's first LISTED segment, a + // window that slides) only when THIS run's playlist read listed the + // start, and only for the first attempt (a wait lets the window slide). + if (mode === "from-start" && startProvable(firstAttempt)) part.provenStart = true; await save(); const args = ytdlpLiveArgs({ url, @@ -1158,8 +1179,6 @@ async function recordLiveRunInner( if (vodFmt) { const file = partPath("vod"); const part = begin("vod-poll", vodFmt.url, file, true); - // The platform's VOD of the stream, read from its first segment. - part.provenStart = true; await save(); poll = (deps.poll ?? pollEventPlaylist)({ playlistUrl: vodFmt.url, @@ -1171,6 +1190,9 @@ async function recordLiveRunInner( ...(deps.fetchBytes ? { fetchBytes: deps.fetchBytes } : {}), }).then(async (r) => { finish(part, `${r.segments} segment(s) from ${r.firstSeq ?? "?"}, ${r.gaps} gap(s); ${r.ended}`); + // Proven from the start only when the poll's first segment is the + // platform's first (REVIEW-LF-2 2). + if (r.firstSeq !== null && r.firstSeq <= firstSequenceOf("kick")) part.provenStart = true; await save(); }); } else { @@ -1205,7 +1227,7 @@ async function recordLiveRunInner( const n = (record.attempts ?? 0) + 1; const mode = step.mode === "live-edge" ? "now" : index0 ? "index0" : "from-start"; const tag = `ytdlp${mode === "index0" ? "-index0" : ""}${mode === "now" && fromStart ? "-edge" : ""}${n > 1 && !(mode === "index0" && n === 2) ? `-a${n}` : ""}`; - const o = await ytdlpPart(plan.url, tag, mode, mode === "index0" ? "--no-live-from-start + -live_start_index 0; " : ""); + const o = await ytdlpPart(plan.url, tag, mode, mode === "index0" ? "--no-live-from-start + -live_start_index 0; " : "", n === 1); const last = parts[parts.length - 1]!; const bytes = await bytesOf(last.stem); const missing = separate && !o.signalled && bytes > 0 ? await missingStreamOf(last.stem) : null; @@ -1367,7 +1389,14 @@ async function recordLiveRunInner( ); if (names === null) return { kind: "unknown", why: "the store's folder cannot be read" }; const sm = names.find((n) => n.startsWith("source-media.")); - return sm ? { kind: "unknown", why: `${sm} is in the store with no pointer naming it` } : { kind: "empty" }; + return sm + ? { + kind: "unknown", + why: + `${sm} is in the store with no pointer naming it (a landing stopped between the file and its record?) — ` + + "compare it with the staged parts and land or remove it by hand; until then nothing of this stream lands", + } + : { kind: "empty" }; }; // With a container stored, no file of a part is removed before the landing // decides (the zero-byte files, a fragments-only group's state). @@ -1376,7 +1405,7 @@ async function recordLiveRunInner( const partOf = new Map(parts.map((p) => [p.stem, p.part])); // video: it holds a picture; merged: record-live merged it from separate // streams here (its length is the longer stream's). - type Candidate = { file: string; seconds: number | null; part?: LivePart; group: LivePartFiles; video: boolean; merged: boolean }; + type Candidate = { file: string; seconds: number | null; part?: LivePart; group: LivePartFiles; video: boolean | null; merged: boolean }; const candidates: Candidate[] = []; const unlandable: string[] = []; const unlandableGroups: { group: LivePartFiles; why: string; part?: LivePart }[] = []; @@ -1400,7 +1429,9 @@ async function recordLiveRunInner( unlandable.push(`${g.stem}: ${got.error}`); unlandableGroups.push({ group: g, why: got.error, ...(part ? { part } : {}) }); } else if (got) { - const video = Boolean((await probe(got.file, landSignal).catch(() => null))?.videoCodec); + // null: the probe failed — not known, so never "contained" (REVIEW-LF-2 4). + const pv = await probe(got.file, landSignal).catch(() => null); + const video = pv ? Boolean(pv.videoCodec) : null; candidates.push({ file: got.file, seconds: got.seconds, group: g, video, merged: got.merged === true, ...(part ? { part } : {}) }); } else { @@ -1434,7 +1465,8 @@ async function recordLiveRunInner( }); }; // Every part that is not the landed one, and why it would be kept. - type Other = { group: LivePartFiles; why: string; seconds?: number | null; part?: LivePart; extra?: string[] }; + // video: what the candidate holds (undefined: not a candidate, not probed). + type Other = { group: LivePartFiles; why: string; seconds?: number | null; part?: LivePart; extra?: string[]; video?: boolean | null }; const others: Other[] = []; for (const u of unlandableGroups) others.push({ group: u.group, why: `not landable as it is: ${u.why}`, ...(u.part ? { part: u.part } : {}) }); for (const g of empty) { @@ -1508,7 +1540,13 @@ async function recordLiveRunInner( best.part !== undefined && proven(c.part) && proven(best.part) && - !(c.video && (!best.video || best.merged)) && + // Same kind only, as per-stream lengths are not known: a picture part + // inside a picture part not merged here; an audio-only part only inside + // an audio-only one (a part with both may hold less sound than its + // container's length, which is its longer stream's). + c.video !== null && + best.video !== null && + ((c.video && best.video && !best.merged) || (!c.video && !best.video)) && c.seconds !== null && best.seconds !== null && c.seconds <= best.seconds; @@ -1534,6 +1572,7 @@ async function recordLiveRunInner( seconds: c.seconds, ...(c.part ? { part: c.part } : {}), extra: [c.file], + video: c.video, }); } if (separate && !record.missingStream) { @@ -1573,6 +1612,10 @@ async function recordLiveRunInner( const placeOf = new Map(placeRows.filter((r) => r.id === id).flatMap((r) => r.parts).filter((x) => x.stem).map((x) => [x.stem!, x])); const endedDuration = cov.basis === "duration" ? cov.streamSeconds : null; const mayHoldEnd = (o: Other): boolean => { + // An audio-only part beside a landed file with a picture: that file's + // own sound may be shorter than its length (REVIEW-LF-2 4) — kept. + if (o.video === false && best.video !== false) return true; + if (o.video === null) return true; const p = o.part ?? placeOf.get(o.group.stem); if (proven(p)) return false; return !(landedFromStart === true && best.seconds !== null && endedDuration !== null && best.seconds >= endedDuration - 60); diff --git a/common/lib/liveCapture.ts b/common/lib/liveCapture.ts @@ -452,10 +452,13 @@ export type LivePart = { // Recorded `--no-live-from-start` with ffmpeg at the playlist's first listed // segment: from the start only if the playlist reaches it. index0?: boolean; - // Proven to begin at the stream's start: yt-dlp `--live-from-start`, or a - // platform VOD read from its first segment. A part without it (index-0, the - // browser path, rows written before the mark) is never taken as holding - // the start for a removal or a replacement. + // Proven to begin at the stream's start, by what was recorded: YouTube's + // from-start generator on a stream under 120 h old; another platform's + // `--live-from-start` only when that run's first playlist read listed the + // start; a platform VOD whose poll began at its first segment. A part + // without it (index-0, the browser path, a later attempt, rows written + // before the mark) is never taken as holding the start for a removal or a + // replacement. provenStart?: boolean; };