Project format — .slecture (schema 2)
A lecture is a package directory (UTI ai.spboucher.slecture). All paths in the manifest are relative to the package root.
Title.slecture/
manifest.json metadata, PDF reference, recording sessions, media segments with SHA-256, export history
events.jsonl append-only event stream, one JSON object per line
edits.json EditHistory: current edit decision list + undo and redo stacks
transcript.json optional transcript (source timeline)
pdf/source.pdf immutable copy of the imported PDF (the original file is never touched)
media/audio-<session8>-<index5>.caf 16-bit PCM mono CAF, one bounded segment each
media/camera-<session8>-<index5>.mov optional camera segments (fragmented QuickTime, video only)
cache/waveform.json loudness envelope (10 ms hop); can be rebuilt
cache/thumbnails/ reserved
exports/ reservedTimebase
MediaTime = signed 64-bit nanoseconds on the project timeline (JSON: an integer). Conversions: frames = round(ns × rate / 1e9);
CMTime uses timescale 1 000 000 000. Video frame i is at i/fps exactly (CMTime(value: i, timescale: fps)); audio sample n at n/48000.
manifest.json
schemaVersion, id (UUID), title, courseCode, sessionNumber, lectureDate, createdAt, modifiedAt, archived,
coverPage, publishingDestination, notes (page index → presenter note), pdf {path, originalName, sha256, byteCount, pageCount},
sessions[] {id, startedAt, endedAt, timelineStart, duration, recovered, segments[]}, duration, lastPage, exports[].
A segment: {id, kind audio|camera, path, index, start, duration, sampleRate, channels, frames, sha256, finalized, recovered}.
The manifest is replaced atomically (write to a temporary file, then rename). endedAt == null marks a session that did not end cleanly.
Migrations run on the raw JSON (ManifestMigrator): schema 1 → 2 renames course to courseCode and adds the newer fields.
A package with a newer schema than the app supports is refused with an explicit error and is not modified.
events.jsonl
Each line: {"seq": n, "t": ns, "wall": ms-since-1970, "e": {<kind>: {…}}}. seq increases strictly; t is timeline time; wall is
for audit only. Kinds: sessionStart{id}, sessionEnd{id}, page{index}, strokeAdded{_0: Stroke}, strokesRemoved{ids},
strokesRestored{ids}, viewport{_0:{zoom,cx,cy}}, pointer{x,y}, pointerHidden, marker{_0:{id,kind,label}}, pause{reason},
resume{gapSeconds}, camera{enabled,placement}, segment{kind,file,index}, auto{_0:{policy,action,detail}}, note{_0}.
A line that cannot be decoded (truncated tail after a crash, kind from a newer version) is skipped, counted and left in the file.
Stroke: {id, page, tool, color "#RRGGBBAA", width, begin, p:[x, y, dtMilliseconds, w, …]}. x,y are normalized to the page crop
box, origin top-left, y down. width is normalized to the page width. dt is the time since begin; w multiplies the width
(pressure). Shapes keep their anchor as the first point and the dragged corner as the following points.
A stroke drawn while nothing is being recorded is stamped at the end of the timeline with dt = 0 (it appears at once).
edits.json
{current, undoStack[], redoStack[]} of EditDecisionList: cuts[] (applied), suggestions[] (pending, never applied until approved),
splits[], muted[], fadeIn, fadeOut, crossfade, gainDB, normalizeLoudness, noiseReduction, chapters[],
ink {offsets, hidden}, cameraPlacement, cameraHidden. All times are source timeline times.
Portability
The package can be copied as is (Finder, Files, AirDrop). "Archive du projet" writes Title.slecture.zip (stored entries, ZIP64 when
needed, caches excluded); importing a package or archive always makes a copy, and gives it a new id when that id already exists.