forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 2e2ed698a69459f7ce472eabcbc01b00a0916d3fFiltered to scripts/gen_fixtures.shClear filter

2026-08-10

✨ 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.
🐛 fix(engine): NTSC frame rates survive the sample tableAhmet Kaan Gümüş · 3f81ef8
🐛 fix(engine): NTSC frame rates survive the sample table

`mp4 0.14`'s `Mp4Track::frame_rate` divides the sample count by whole
milliseconds before the float cast, so 24000/1001 read back as a flat
23.0: the picture the audio-sample master clock asked for was 4 % out and
the drift grew with the film — five minutes of it by the end of a
two-hour one. The frame rate now comes off the stts totals in f64, which
is exactly `timescale / delta` for a constant table and an average for a
spread one.

The same truncation lived at the writing end (a 90 kHz clock cannot count
23.976 fps in whole ticks), so the muxer picks a timescale that can:
90 kHz wherever it divides exactly — every integer rate, so those exports
are byte for byte what they were — and `round(fps * 1001)` over 1001
ticks otherwise, which is exact for the whole NTSC family. The hardware
encoder gets that same rational instead of a rounded `fps * 1000`.

The video edit list is honoured now too, the way the audio one always
was — but only what it really trims: a `media_time` equal to the first
`ctts` offset is the B-frame composition delay, not a cut, and reading it
as one throws two real frames away.

A file whose audio we cannot decode at all (an AC-3 remux) played silent
with the reason on stderr; the session carries it now and the window says
NO AUDIO in its notice bar.
✨ feat(engine): every audio stream is listed, and any one of them opensAhmet Kaan Gümüş · dff7d84
✨ feat(engine): every audio stream is listed, and any one of them opens

A remux carries one audio track per language; the engine took whichever
AAC track a HashMap handed it first and there was no way to ask for
another.

- probe_streams() describes every audio track in file order, undecodable
  ones included (decodable: false) so a picker can grey them rather than
  hide them
- open_multi_streams() takes (path, stream) per source; the old
  open_multi_segments is a wrapper pinning stream 0, so no caller moved
- stream ids come from moov.traks, not the tracks HashMap: "stream 0" was
  a different track run to run on a multi-track file
- a named stream that is missing or not AAC is an Err; stream 0 stays the
  silent source it always was, because a file we cannot decode the audio
  of still has a picture worth editing
- assets/test_multiaudio.mp4: video + AAC stereo + AAC mono (fra) + AC-3,
  which covers the picking, the language and the greyed row

2026-08-09

🔧 chore: add A/V test fixture to gen_fixturesAhmet Kaan Gümüş · fc06b75
🔧 chore: add A/V test fixture to gen_fixtures

Stereo AAC with distinct L/R frequencies (440/880 Hz) so channel
mapping mistakes are audible; 1 Hz volume pulse makes A/V drift
visible against the burned-in frame counter.
🎉 feat: MVP decode pipeline — mp4 → H.264 → gpui previewAhmet Kaan Gümüş · 0acbf8d
🎉 feat: MVP decode pipeline — mp4 → H.264 → gpui preview

- engine: mp4 demux → Annex-B, rusty_h264 software decode, BT.601
  I420→BGRA; decode on worker thread behind a bounded channel
- engine-hw: optional VA-API decode plugin (cros-codecs) behind a
  C ABI, dlopen'd at runtime with silent software fallback; the app
  binary keeps zero libva/gbm/drm linkage so it runs on any distro
- app: gpui window, per-frame RenderImage swap + drop_image
- vendor/: cros-libva + cros-codecs with 3 LOCAL PATCH fixes (libva
  1.23 struct init, radeonsi 64x64 min context, pub surface()) —
  upstream is dormant, so vendor/ is adopted code, not a temp fork
- fixtures are gitignored; scripts/gen_fixtures.sh regenerates them