forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on ef5832fea151ca30db92b142c8de131c5f43fc49Filtered to crates/engine/src/edith.rsClear filter

2026-08-20

✨ feat(engine): clips can be moved, scaled, rotated and cropped (edith 20)Ahmet Kaan Gümüş · 684b8a4
✨ feat(engine): clips can be moved, scaled, rotated and cropped (edith 20)

Per-clip TransformParams (position, scale, 90-degree rotation, crop)
shared through a colour-style table, applied in both the playback
preview and the export compositor, persisted as the edith 20 dialect;
v19 files load untransformed.

2026-08-19

✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)Ahmet Kaan Gümüş · 8369d8e
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)

transition_out frames on a video clip dissolve it into the adjacent
next clip; split keeps the tail's transition clamped and zeroes the
head; v18 files load with hard cuts, v19 round-trips bit-exactly.
Blending (playback and export) lands separately.
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18Ahmet Kaan Gümüş · 6d0747c
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18

Clip carries fade_in/fade_out, an equal-power gain envelope mixed into
playback and export, a crossfade() op that sets both edges of two
adjacent audio clips, and split's rule that only the kept edge keeps its
fade. The project file format bumps to edith 18 to carry the two new
fields; a v17 (or older) file loads with every clip's fades at zero.

Fixes a stray fade_in/fade_out struct-literal fragment left outside any
Clip literal in Player::trimmed (crates/app/src/player/timeline_edit.rs),
which was a syntax error breaking the whole app crate's build.

Adds unit coverage for Fade::gain_at's boundary/midpoint curve, the
split edge rule, crossfade's adjacency refusal, the Clip size-lock
test (40 -> 48 bytes), and a v17-loads-zero-fades / v18-round-trips
edith.rs test.
✨ feat(engine): a project can name its own sample rateAhmet Kaan Gümüş · 31981de
✨ feat(engine): a project can name its own sample rate

.edith goes to v17 with an optional samplerate line; the session carries
it, save/load round-trip it, and the one audio-open seam every consumer
shares (open_multi_streams_speed_at) conforms all segments to the named
rate — playback rebuild and both export encoders inherit it for free.
Proxies keep their film's own rate. A v16 file loads with the rate
unset, meaning derived-from-source as before.

2026-08-15

🐛 fix(timeline): grouped caption edits reseek, and the link counter clears caption idsAhmet Kaan Gümüş · 25855e8
🐛 fix(timeline): grouped caption edits reseek, and the link counter clears caption ids

A grouped caption's drag and trim move the group's clips with it -- a
timeline->source change -- so PlaybackSession::move_sub and trim_sub
now invalidate Dirty::Both when the caption is grouped with clips (the
check delete_sub already made, now shared as caption_grouped_with_clips),
and the app pays the reset_after_reseek a clip's drag and trim pay on
the same paths.

The link counter a load seeds now sits past every id the file names:
from_parts chains the subs a lane already holds, and with_subs -- the
door a load's placements actually come through, after from_parts --
raises the counter past the ids its captions carry. A hand-grouped
caption holding the file's highest id could have had it re-issued to
the next group that asked, silently grouping it with clips it never
met.

A palette drop onto a subtitle lane renumbers that lane alone; the
picks it held now follow the discipline of every other renumbering
edit -- kept off the lane, re-read for the marked caption, other lanes'
picks untouched. Also folds in the v16 caption-group round-trip test
that had been left out of the previous commit.
✨ feat(engine): offset-preserving groups over clips and captionsAhmet Kaan Gümüş · 48cacb6
✨ feat(engine): offset-preserving groups over clips and captions

The engine half of manual clip grouping: SubClip gains a link id, the
group invariant becomes one-placement-per-lane (span equality dropped),
group_all builds a hand group over clips and captions with mates riding
along, splits keep the left group and share one fresh id on the right
(captions included), deletes ripple each media member's own span on its
own lane and lift caption members, grouped caption drags and group
trims move every member by one delta clamped to each member's own
walls, and the save format grows an optional 6th sub field as v16.

App half (Selection refactor, ctrl+click, ctrl+A, oracle/menu, marks)
follows.

2026-08-14

✨ feat(engine): the words a project places are in the file it savesAhmet Kaan Gümüş · df4020f
✨ feat(engine): the words a project places are in the file it saves

The `.edith` grows a `sub` line -- `sub <lane> <start> <frames> <track>
<in> <out>` -- and a bare `sub <lane>` for a subtitle lane holding
nothing, written in the lane's own place among the video and audio ones
so the display order a load rebuilds is the one that was saved. Both of
a caption's clocks are on the line: the placement in timeline frames
like everything else, the window in the microseconds its cues are timed
in. MAGIC is `edith 15`.

`Project::without_orphan_sources` stops filtering the subtitle lanes out
of its `Parts` and `Project::lane_gains` stops filtering them out of its
gains -- the two are zipped by `edith::emit`, so they were only ever
allowed to filter in step, and now neither does. What is *on* those
lanes travels beside them in the new `Project::lane_subs`, one list per
lane exactly as the gains are, and comes back through
`Project::with_subs`, which is `from_parts` for words: it refuses a
caption on a lane that is not a subtitle lane, an empty span or window,
a track the palette does not have, a span past the last frame there is,
and a lane that overlaps itself. The parser refuses the same file by
line number.

A v14 project is one that named subtitle files and could place none of
them: it loads with its palette whole and no subtitle lane at all, which
is what it always meant, and re-saves as v15 having invented neither.

Also fixes a version-bump straggler in tests/silence.rs, which asserted
`edith 13` against a `edith 14` writer and was red before this change.
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pinAhmet Kaan Gümüş · 50af5b5
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pin

The export card gains an Encoder row: Auto, Hardware or Software, three rows in a
list like every other setting with more than two values -- `e` steps it, a click
opens the list, and the planned line under the rows re-probes and says which seat
it measured.

Auto is what every export did before (the GPU where there is one). Hardware is
the GPU or a refusal in words -- `Enc::open` refuses before the muxer exists, so
nothing is written -- and it is now the only door to the plugin's AV1 seat, which
`VE_HW_AV1=1` used to guard: an env pin nobody exporting a film would ever find.
A person who picks it for AV1 gets a plain row naming what happened on this box's
driver, and the pick still stands.

Software forces the CPU encoder, which also takes the zero-copy path off the
table by construction (`Enc::dma_want` answers only for the two hardware seats).

Kept with the project: `.edith` gains an `encoder` line at v14, written only when
it is not Auto, and a v13 file loads as Auto.

- engine: `ExportSettings::force_sw` -> `seat: EncoderSeat`; `hw_seat` returns the
  refusal instead of falling back; `planned_video` says `NO_HW_SEAT` where it would
- app: `Pick::Encoder`/`Choice::Encoder`, card row, `e` in the card's own keyboard
  and in the keys menu (`FIXED`)
- tests: the backends sweep runs all three seats (the AV1 hardware seat excepted,
  as before), and asserts the refusal is only what a missing seat produces
✨ feat(engine): subtitles become a third lane kind, placed like everything elseAhmet Kaan Gümüş · ec66e07
✨ feat(engine): subtitles become a third lane kind, placed like everything else

`LaneKind::Subtitle` joins the lane list, holding `SubClip`s -- a
`[in_us, out_us)` window of one of the project's subtitle tracks (the flat
`subtitles` list stays the palette) placed at a timeline frame. A caption is
therefore added, ordered, labelled `S1`, snapshotted, rippled, razored and
undone by the machinery every clip already goes through: an undo step is the
lane list, so subtitles joined the history without one of their own.

It carries no `Clip` at all, and that is what keeps the media paths free of it:
`Project::lane` hands back an empty slice, so trim/set_eq/set_color/set_fit/
set_speed/lift/delete_in refuse it by the bounds check they already had, the
composite and the mix never look at it, and the three doors that could still put
a picture on one -- `from_parts`, `place`, `append_clip` -- say so by name.

Ops: `place_sub` (refuses an overlap rather than overwriting -- words that lost
are simply gone), `move_sub`, `trim_sub`/`trim_sub_room` (clamped like a media
trim; the window follows the edge), `lift_sub`, and `sub_lane_cues`, which maps
a lane to cues clipped to each window and shifted onto the timeline -- the twin
of `export::timeline_cues` for a track that is placed rather than carried.

Ripple, paste-room, split and regroup cut the windows by *proportion*, so none
of that arithmetic needs a frame rate; only a trim and the mapping take one.

Not here, on purpose: persistence (`Parts` has no line for a `SubClip`, so a
save leaves the lanes out -- named at the filter) and any UI.
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrivesAhmet Kaan Gümüş · 269b0c2
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrives

A project now says whether an import makes a proxy by itself. On is the
default and the line left out, so every project that came before behaves
exactly as it did; off makes nothing at all, and turning Proxies on is
what asks for the ones the project is missing -- the only ask there is,
since no per-source item exists.

The file grows an `autoproxy` line and the version goes to 13: a v12
project makes them by itself, which is all any project could do.

The switch is a button beside Proxies in the PROJECT panel, ctrl+o, and
a row on the actions card -- the three doors together, as the two
sync tests require.

2026-08-13

✨ feat(engine): the picture may come off the stand-in, the delivery never doesAhmet Kaan Gümüş · 79c69dd
✨ feat(engine): the picture may come off the stand-in, the delivery never does

One switch for the project, saved with it as the v12 `proxy` line, and
one place that reads it: the span open asks `picture_path`, which hands
back the stand-in where the cache has one and the film itself
everywhere else. The sound is opened elsewhere and is always the film's;
`export` reads the project's own sources and knows nothing of proxies,
so a delivery cannot come off one -- and both sides now say out loud
which file they read (`export source:` / `picture: proxy`), so that is a
grep rather than a belief.

*Which* films have a stand-in is deliberately not saved: a proxy is
found by the film's own path, length and modification time, so the cache
is the single answer and a project file cannot go stale about it. A v11
project loads unchanged and is cut on its films, which is all it could
ever do.

2026-08-12

✨ feat(subtitles): as many tracks as you want, embedded in the exportAhmet Kaan Gümüş · 28e2853
✨ feat(subtitles): as many tracks as you want, embedded in the export

Subtitle tracks now work the way audio and video tracks do: add as many
as you like, remove any of them, and every track with cues on the
timeline is written into the exported file.

Add and remove
- "+ S" beside "+ V"/"+ A" imports every subtitle track in a picked
  file; each row carries its own "x". Pointer and keyboard doors share
  one implementation and refuse identically, before any chooser opens.
- Project::remove_subtitles / PlaybackSession::remove_subtitles, with
  the index fixup in one place so a removal cannot repoint the overlay.

Embedded in the output
- ExportSettings.subtitles is a list; the Matroska muxer writes N tracks
  from number 3 up, ceiling derived from the encoding (0x7F -
  SUB_TRACK_FIRST) because track 127 is the all-ones VINT our own reader
  maps to "unknown" and would silently lose.
- mp4 carries them too, as real tx3g timed text. The old "an mp4 carries
  none" was a false refusal: mp4 0.14 has MediaConfig::TtxtConfig all
  along. Samples are built from cue boundaries, so gaps are empty
  samples and the track spans the film.
- of_mp4 reads them back, so edith re-imports its own output. Verified
  against a file ffmpeg muxed, which writes mdhd in microseconds where
  we write milliseconds.
- The export set is derived from timeline_cues per call, so it cannot
  desync; the card names a track it leaves off, and counts past the
  width budget rather than eating the card.

Language and title
- SubtitleTrack carries language and name apart; the guess-them-back
  heuristic is gone. LanguageBCP47 is read and mapped to a 3-letter code
  (ffmpeg reads no BCP-47 at all, so writing it would have made the
  language invisible). A 17-track subtitle library file and a
  dual-language one no longer read "und".

Media bitrate in properties
- engine::probe_bitrate opens no decoder; all three numbers share the
  container's duration, so total >= video + audio holds by construction.
  Within 0.004% of ffprobe across the library.
- Both properties cards show it; a dual-audio file says which of how
  many. The line picks one unit off its smallest stated component, so a
  real value never renders as 0.00.

Off the render thread
- The subtitle walk moved to the background executor at every door:
  1324ms -> 0.1ms on a 3.1GB film, 234ms -> 5.0ms on a 25.4GB/35-track
  one. (The media walk is still on the render thread; separate slice.)

False refusals removed
- .mks and .mka were refused while the compiled-in Matroska reader
  parses them; is_matroska now takes the standard's closed set.
- The audio-only "sound alone" sentence was unreachable when every pick
  was a bitmap track.

Subtitle-free exports stay byte-identical: 294a8b0c (hevc mkv),
8c16b8b1 (default mp4).

2026-08-11

✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for youAhmet Kaan Gümüş · 09671f7
✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for you

BT.2446 Method A's assumed mastering peak was a constant in the module: 400
cd/m^2, one exposure decided for everybody. It is a matter of taste, not of
correctness -- a reference rendition and a vivid one are both honest pictures of
the same film -- so it becomes a project setting with three renditions through
the very same curve, which is what keeps the hues right whichever is picked:

  Reference  1000 nits, chroma 1.0   the published conversion (diffuse white 166)
  Standard    400 nits, chroma 1.0   display-referred, as bright as a player
  Vivid       250 nits, chroma 1.10  brightest, and a tenth more colour

The chroma gain is a scale about 128 in the SDR codes, after the map and clamped
to the legal range: a grey stays exactly grey at any gain, and at 1.0 it is a
clamp the maths cannot reach, so the other two presets are byte for byte what
Method A produced. HLG's OOTF gain is guarded at black -- below a 1000 cd/m^2
peak the system gamma is under 1, and the 0 * inf that follows byte-cast to 0
and put a hole where black belongs.

The preset lives on the Project beside the limiter (a setting, not an undo step),
reaches the decode workers and the export through the same value, and is saved as
a `tonemap` line in edith 11 -- left out when it is the default, so a project
holding no HDR media is the bytes it was, and a v10 file loads as the reference
rendition, which is the only one it ever had. Picking one rebuilds the picture
under the playhead the way a resize does; an SDR project is unmoved.

The panel names it beside the resolution and the rate -- the third thing that is
the project's rather than the media's -- and a click opens the three renditions
with the one in force marked. No stroke: this is a list to look at.
🧹 test(scratch): a fixture directory is deleted by the test that made itAhmet Kaan Gümüş · 5c39124
🧹 test(scratch): a fixture directory is deleted by the test that made it

Every suite here made its own directory under /tmp with a name and a
process id and then walked away from it: 2907 `ve_*` directories, 6.4G of
a 16G tmpfs, none of them reclaimable by anything but a person with `rm`.

`engine::scratch::Scratch` is the one place a throwaway path comes from
now -- a directory, or the single file inside one -- and `Drop` is what
takes it back. That is the whole reason it is a guard rather than a
cleanup call at the end of a test: unwinding runs `Drop`, so the *failing*
tests, which are exactly the ones that used to leave the most behind,
clean up like the passing ones.

It derefs to a `Path`, so the call sites did not have to change: the
helpers that handed back a `PathBuf` hand back one of these. The prefixes
stay what they were, so a directory is still recognisable while a test is
stopped in it.

Nothing about what a test *does* moved -- only where its fixtures live and
when they die. Driven: the whole engine suite and the app's own tests run
with the count of `/tmp/ve_*` before equal to the count after.
🩹 fix(subtitles): the grafts off the losing PGS laneAhmet Kaan Gümüş · bf65371
🩹 fix(subtitles): the grafts off the losing PGS lane

- The overlay is a flex box with the canvas as its one growing item,
  fitted (Contain) the way the picture under it is: size_full inside an
  absolutely placed box has nothing to be a percentage of, and Fill put
  every cue somewhere the disc did not.
- One way out of subtitle_overlay, and it lets the drawn picture go on
  the way: the toggle going off leaked an 8 MB atlas tile per press.
- A track is pictures because of its codec id, not because its first cue
  happens to be one: an all-erase or empty PGS track passed for text and
  an export promised words it has none of.
- The sup handed to the decoder stops at the end of the first display
  set that composes something, so a muxer packing the erase into the
  same block no longer blanks the cue.
- The film-gated session test: the row a click picks, the map a repaint
  asks for twice (under 16 ms warm), the picture it draws.
✨ feat(rate): the project frame rate is a list to pick fromAhmet Kaan Gümüş · d2e25cc
✨ feat(rate): the project frame rate is a list to pick from

The panel could only ever read the rate out. Now it opens the rates the
way the resolution button opens the sizes -- 23.976 through 60 with the
media's own cycled in and the one in force marked -- and picking one
conforms the whole timeline to it.

PlaybackSession::set_frame_rate maps every frame number on every lane
through one Rate (Project::retime), so a take keeps its seconds, its
footage and its sync while being counted on the new grid; every source is
re-read through a Rate against it and an export comes out at it. The v9
fps line now governs a video-scaffolded project too, so a project cut at
24 reopens at 24 instead of at the media's 30 with every clip number
still counted in 24ths.
✨ feat(engine): subtitles come in with the film or beside itAhmet Kaan Gümüş · f4b5fd8
✨ feat(engine): subtitles come in with the film or beside it

A subtitle track was a track this engine walked past: the Matroska track
walk kept video and audio and dropped type 0x11, and a `.srt` next to the
media was a file with no door. Now both arrive as the same thing -- a
list of timed cues -- and a project keeps them.

`subtitle`: the cue model plus the two ways in. Standalone `.srt`,
`.vtt` and `.ass`/`.ssa` go through `oxideav-subtitle` and `oxideav-ass`
rather than through a fresh parser here; an embedded track carries its
timing on the block and its text in it, so each codec is put back into
the shape its own parser reads -- which is what makes an embedded track
and the file it was muxed from come back as the same cues.

What cannot be read is refused by name and still listed: the four PGS
tracks of a BluRay remux are four rows saying they are pictures, not an
empty list and not a file that would not open. A `.srt` that has gone
missing since the save is the same story, and a re-save keeps its row.

`.edith` 10 writes `subtitle <track> <path>` -- the reference only, the
cues stay in the file they came from. v9 and every older dialect load as
the projects with no subtitles that they are.
✨ feat(mix): every track has its own volume and the mix has a ceilingAhmet Kaan Gümüş · dc7d07d
✨ feat(mix): every track has its own volume and the mix has a ceiling

A fader per audio track and one master limiter over the sum of them, both
applied where the lanes are added and nowhere else -- so what an export
writes is what the room heard, by construction rather than by two call
sites agreeing.

A track's fader moves everything on it, every frequency: it is not the
equalizer (one take, one band) and not the panel's volume (this machine's
monitoring, which no file carries). The limiter is lookahead, soft-knee
and per sample: the peak of an exported file is a measurement, not a hope,
and the hard clamp stays behind it as the backstop.

Flat settings are still the bit-exact passthrough: one lane at unity with
the limiter off never opens a mixer thread, and an mp4 of such a timeline
is still a packet copy. A mixed one re-encodes, and the card says so
before the export starts.

Both belong to the project, so `.edith` is v9: `fps`, `limiter` and `gain`
lines, every older dialect still loading flat. The rate line pays an old
debt with it -- a timeline of nothing but stills and songs now comes back
at the rate it was cut at instead of the one its scaffold implied.

UI: the mix card (f, or an audio track's own header), rows with steppers
and hold-to-run arrows, and the track's level on its header.

2026-08-10

✨ feat(timeline): clips play at a speed of their ownAhmet Kaan Gümüş · f8effe8
✨ feat(timeline): clips play at a speed of their own

A clip gains a rate (`Speed`, thousandths of real time, 0.25x to 4x) and
every speed question is answered at the mapping seams that were already
there: `Clip::frames` is the source range divided by the rate, `end` is
built on it, and `map`/`span_at`/`composite_span_at` walk the offset
through `Speed::source_at`. `in_frame`/`out_frame` stay *source* frames,
so a trim and a split still address the file.

The picture needs no new decoder: the span says how many source frames it
reads, and `try_frame` brings the decoder's numbers back through the same
rate -- at 2x two decoded frames land on one timeline frame and the
display's drop-when-behind policy takes it from there. The sound is
resampled per segment inside the worker playback and the audio export
already share (linear interpolation, carried across packet seams), so the
pitch moves with the rate: tape, not pitch-preserve, and the card says so.
Each segment is told how much timeline it owes and pads or trims to it,
which is what keeps a run of speeded cuts from drifting.

Rounding is where a rate could break the lane, so it does not: `Speed::fit`
never hands a trim more source than its room holds, and `Speed::split_at`
refuses a cut a slow clip's rate cannot address rather than leaving two
halves that no longer add up. The fuzz sweeps set_speed in with the rest.

- card in the eq/colour pattern, on `j` and in the clip menu; a drag is one
  undo step for the whole linked group, 1.00x reachable by hand and by `r`
- clip boxes carry a "2.00x" mark, and their width, waveform and details
  row are the timeline length
- WAV/FLAC honour it; mp4 and AV1 *refuse* by name -- that path copies AAC
  packets and a resample is not a copy (ponytail names the upgrade path)
- .edith v8 carries the rate; v7 and older load at 1.00x
- `assets/test_speed_sync.mp4`: one flash, one beep, same instant. At 2x
  they still land together, to the frame.
✨ feat(timeline): the last clip deletes and the timeline emptiesAhmet Kaan Gümüş · 9a6ef81
✨ feat(timeline): the last clip deletes and the timeline empties

The never-empty-TIMELINE invariant is gone: an emptied timeline is now a
state of the model, not an edge case a refusal kept unreachable. Emptiness
is honest all the way down -- `PlaybackSession::span` is an `Option<Span>`
whose `None` *is* the empty timeline, and `start_span` feeds it one black
frame, so the viewer shows the nothing that is there rather than the last
picture of the clip that was deleted.

* `Project::lift` and `Project::ripple_delete` refuse only what is not an
  edit (a bad index, an empty range, a delete with nothing left to take --
  the last so a no-op still costs no undo step);
* `Project::from_parts` and the `.edith` loader take an all-empty project
  and refuse a *laneless* one instead, which is the invariant that was
  really being defended;
* `without_orphan_sources` keeps source 0 when no clip names anything: it
  carries the frame rate the timeline counts in, and pruning it wrote a
  project that could not be loaded back;
* the app's two "the timeline cannot be emptied" notices are gone, and an
  export of an empty timeline is refused by name instead of writing a file
  of no frames.

The never-empty-CLIP invariant (len >= 1) is untouched.
🐛 fix(engine,ui): paste respects lane kinds; bounds and rebind capture hardenedAhmet Kaan Gümüş · 11603ec
🐛 fix(engine,ui): paste respects lane kinds; bounds and rebind capture hardened

Four bugs a hunter sweep found, each with the door it comes in through:

- `Project::paste` put the clipboard clip in the first lane of *every* kind,
  so an audio-only clip copied off A1 landed on V1 too: a wav as a video
  source, a decode that fails, and a save the next open refuses. It now asks
  the source what it is, the same question `place_stream_at` asks an import,
  and reaches A1 only when there is no picture.
- The `resolution` line was applied unbounded while the keystroke capped at
  8K, so a crafted `resolution 4294967295 4294967295` panicked `open_black`
  with a capacity overflow. One bound now (`engine::is_resolution`) with both
  doors asking it, and the load door refuses by line like every other
  malformed line.
- `open_room` shifted starts unbounded, and the file format permits a clip
  ending at the very last frame: a paste wrapped it round to the front of the
  lane -- a debug panic, or in release an overlap no reload accepts. The edit
  door refuses the paste that would push anything past `u32::MAX`; the load
  bound stays where it is, since the wrap was the edit's to prevent.
- A rebind captured whatever gpui reported, so shift+= wrote `play +` and the
  next load threw the *whole* keybindings file away, losing every other
  rebind. Capture now takes only a chord the file can spell and read back, and
  a line the parser cannot use costs that line alone -- the magic line is the
  only thing that still refuses the file.
✨ feat(engine): project resolution stands apart from media resolutionAhmet Kaan Gümüş · 19e294a
✨ feat(engine): project resolution stands apart from media resolution

A timeline had one resolution because its first source did: import refused
anything else by name, and there was nowhere to say otherwise. A project now
carries its own picture size and every clip is composed onto it, so media of
different resolutions share a timeline the way they do in any editor.

* scale::Composer is the one definition of that composition -- fit_rect,
  scale_i420, compose_i420 onto a black canvas -- and both playback and export
  call it, so what is written is what was watched. A canvas of the picture's
  own size is a pass-through that allocates nothing and touches no byte.
* Grade first, place second: a grade belongs to the clip's pixels at the
  resolution they were shot at, and the letterbox bars are not the clip.
* Per-clip fit policy (fit/fill/stretch/centre), one byte inline in Clip -- it
  lands in padding the clip already had.
* .edith v7: a `resolution <w> <h>` line and a fit word per clip line. v6..v1
  still load, defaulting to source 0's picture and Fit, which is what those
  projects always meant.
* The fps refusal stays: mixing frame rates is resampling the timeline, a
  different problem, and a refusal is the honest answer until it is solved.
* UI: `p` cycles the fit policy of the clip on screen (and a clip-menu item),
  ctrl+r cycles the project resolution through the usual sizes with the media's
  own among them, and the export card says which size it writes.
✨ feat(engine): per-clip color persists in .edith v6Ahmet Kaan Gümüş · 0530fc9
✨ feat(engine): per-clip color persists in .edith v6

A clip names a colour grade the way it names an equalizer: an index into an append-only Project table, deduped on set, pruned at save, inherited by both halves of a split and carried by copy, paste and undo.

The file format grows a color <b>:<c>:<s>:<t> line and a 7th clip field; v5..v1 still load and every one of them re-saves as v6. Clip grew from 32 to 40 bytes -- the eq index fit the padding hole, the colour one did not.
✨ feat(engine): per-clip EQ persists in .edith v5Ahmet Kaan Gümüş · 782fc53
✨ feat(engine): per-clip EQ persists in .edith v5

A clip names its equalizer by index into a project-level table, the way it
already names its source: `Clip` stays `Copy`, so a split hands both halves the
same settings, a clipboard copy carries them and an undo restores whichever
index the clip had. The table is append-only within a session -- an index on a
clipboard clip or in an undo snapshot can never dangle -- and only a save prunes
it, exactly as an undone import leaves its source entry behind.

The file grows `eq <band>...` lines (freq:gain:q:shape, printed `{:?}` so every
f32 comes back bit for bit) and one more clip field naming one of them. v4, v3,
v2 and v1 still load and re-save as v5.
✨ feat(library): every audio stream is a row, and the picked one plays and exportsAhmet Kaan Gümüş · ecb5e06
✨ feat(library): every audio stream is a row, and the picked one plays and exports

A file with one audio track per language is one row per track now, not one row
per file. The engine carries the pick end to end: a source is a (file, audio
stream) pair, .edith v3 writes the stream on the source line, playback opens it
and — the trap this closes — the export copies *that* stream's packets rather
than always stream 0.

Streams that cannot go on the timeline are listed greyed with the reason
instead of hidden: a codec we cannot read, or a rate/layout that cannot share
one output device and one copied AAC track with the rest of the timeline (there
is no resampler here and no AAC encoder to write a join with). place_stream_at
is the one door a row goes through, and it refuses those in the engine's own
words.

- v2 and v1 files still load: no stream field means stream 0, which is all
  those dialects could play; saving either writes v3.
- Waveform peaks are keyed by file *and* stream, so two tracks of one file
  cannot draw each other's envelope.
- Library swatches and clip tints follow the *file*, so a file's streams share
  one colour in the panel and on the lanes.
- assets/test_multilang.mp4: two AAC 44.1k stereo streams (und, fra), the shape
  real multi-language media has and the one where a second stream is placeable.
✨ feat(engine): real silent AAC for export gaps, link + overflow guardsAhmet Kaan Gümüş · 301e29b
✨ feat(engine): real silent AAC for export gaps, link + overflow guards

Grafts the losing candidate's hand-written AAC-LC silence into the
offset-placed lanes: a gap in the audio lane is copied as max_sfb=0
access units (4 bytes mono, 7 stereo, verified against our own decoder)
instead of being spent as stts duration on the packet in front of it.
That retires the 23 ms leading-gap misplacement, so every packet is one
1024-frame sample table entry again and the muxer takes no duration.

from_parts becomes the release-active untrusted door it claims to be:
per-cause errors, an end-overflow bound, and the grouping rules -- a
link id names at most one clip per lane, and a pair covers one span.
The parser bounds the same overflow by line number, `place` strips the
incoming group id, and the two lane surgeries (`clear`, `open_room`)
drop the id from what they cut, which is where duplicates came from.
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2Ahmet Kaan Gümüş · 59eb78e
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2

Project gains two lanes; a Clip now carries `start` (its timeline
placement) and `link` (group id), so a gap is simply the absence of a
placement rather than an object anyone has to keep in sync. Moves and
trims become arithmetic on start/in_frame; the lane invariant (sorted,
non-overlapping) is checked in from_parts, at the .edith parser, and
asserted after every mutation.

split cuts every lane and hands the two sides fresh group ids; regroup
is its exact inverse. delete still ripples both lanes (the app keeps its
behaviour), lift removes one placement and leaves a hole, place is the
per-lane overwrite that can make one.

A video gap plays as black frames from a worker that opens no file --
same channel, backpressure, cancel and retire path as a decoder -- and
exports as encoded black. An audio gap is synthesised zero chunks, real
ones, so the master clock keeps counting through it; on the export side
it is spent as stts duration on the packet beside it, since there is no
AAC encoder to make silence with.

.edith v2 writes one line per placement per lane; v1 files still load,
as fully-grouped gapless lanes, and save as v2.

2026-08-09

🐛 fix: relocatable relative-launch saves, fsync before renameAhmet Kaan Gümüş · 9fa0211
🐛 fix: relocatable relative-launch saves, fsync before rename

A project path with a non-canonical parent -- a bare filename from
`cd dir && edith clip.mp4`, or a directory reached through a symlink --
never matched the canonical source prefix, so every source line came out
absolute and the folder could not be moved. The save also published the
rename without an fsync, which a power loss can turn into a short file
under the real name.