forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 978e6857d64772912559c8d8a4e6ee7cd309bdccFiltered to crates/engine/src/waveform.rsClear filter

2026-08-13

chore: rename ponytail: comment marker to corner-cut:Ahmet Kaan Gümüş · 9ba8e0a
chore: rename ponytail: comment marker to corner-cut:

Marker convention renamed after uninstalling the ponytail plugin;
semantics unchanged (deliberate corner-cut, known ceiling + upgrade path).
Token-only rename, 81 comment lines, no code change.
⚡ perf(waveform): a film's envelope is read by several handsAhmet Kaan Gümüş · 50e3988
⚡ perf(waveform): a film's envelope is read by several hands

Importing a source decodes its whole audio track for the lane's waveform, and
on a film that is the longest thing an import waits for: 22.7 s of one core for
a 2 h 39 m 5.1 E-AC-3 mkv, 3.8 s for a 2 h stereo AAC mp4. It is linear in
length and nothing about it was parallel, though `open_multi_streams` has
always taken a window per call and seeked to it.

So a source long enough to pay for the extra opens is cut into windows -- one
per minute, capped at the machine's cores and at eight -- decoded side by side
and stitched. The first window is the session that was opened to learn the
length, so a split costs `jobs - 1` opens and not `jobs`. Joining is safe
because the fold is min/max into absolutely-numbered buckets: the chunk that
straddles a joint is folded into both windows and cannot be double-counted.

The 2 h 39 m mkv's 22.7 s becomes 4.6 s and the 2 h mp4's 3.8 s becomes 1.2 s,
bucket count identical either way. A clip under two minutes is read exactly as
it was, on the calling thread. `bench waveform <file>` is the metric.

2026-08-11

✨ fix(waveform): a film in an mkv paints its wave, and a failure says soAhmet Kaan Gümüş · ffb3105
✨ fix(waveform): a film in an mkv paints its wave, and a failure says so

A 5.1 AAC track decodes through rusty_aac, whose IMDCT ran as an 8 MB
cosine matrix -- 88% of decode time and 2x realtime, so a two-hour film
needed an hour of background decode before its lane had anything to
draw. The same file has an N/4-point FFT already, for the encoder: the
IMDCT is a DCT-IV read at an offset, so both directions now share
dsp::dct4. 40x on the fixture, 141 s for the film.

And a decode that fails is no longer a silent file: peaks() errors reach
the lane as Wave::Failed with a band that says "audio unreadable", the
reason goes to the log, and the Matroska opener logs what it swallows.

2026-08-10

Merge S5a audio-file import into stream-picker mainAhmet Kaan Gümüş · 1bb8ee2
Merge S5a audio-file import into stream-picker main

Both sides taught `audio` a new axis and they meet on one type: S5a made
`Track` an enum over the mp4/AAC reader and symphonia's, main gave every
reader a `(path, stream)` address. The merged `Track::open(path, stream)`
keeps both -- the stream index lives inside `AacTrack::open`, and a
standalone audio file, which has exactly one track by construction, refuses
any stream above 0 rather than quietly serving the only one it has.

- `AudioProbe` is S5a's `{sample_rate, channels}`: equality is playability,
  so an mp3 may share a timeline with mp4s. Copyability is a separate
  refusal, at export, and stays AAC-only through `copy_track`.
- `probe_streams` reads a standalone file through symphonia instead of
  walking it as an mp4 -- an ALAC .m4a parses as an mp4 whose only audio
  track is not AAC, so the mp4 walk would call it undecodable where
  symphonia decodes it.
- Which lane a source lands on is decided once, in `place_stream_at`: a
  file with no picture is placed on the audio lane alone, everything else
  is pasted as a grouped take. The front-end only owes the refusal notice.
- `unsupported()` and the NTSC/VP9 work are untouched; `is_audio` files
  never reach the former, since a song cannot open a timeline at all.
✨ 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.

2026-08-09