Skip to content

feat(encode): extract and mix embedded video audio#55

Merged
LeadcodeDev merged 1 commit into
mainfrom
feat/embedded-video-audio
Jul 18, 2026
Merged

feat(encode): extract and mix embedded video audio#55
LeadcodeDev merged 1 commit into
mainfrom
feat/embedded-video-audio

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Closes #44.

Goal: a video component's soundtrack reaches the output mix — a talking-head embed no longer renders silent (its volume field existed and was never read).

  • Pure timeline math: scene_start_offsets replicates build_frame_tasks placement exactly — scene-transition overlaps and inter-view transitions unit-tested ([0.0, 1.5] with an incoming 0.5s fade; view 1 at 2.5s across a view transition)
  • ffmpeg -vn extraction honoring trim_start/trim_end/playback_rate (chained atempo for rates beyond 0.5–2.0), temp-dir cache keyed by content hash, graceful skip with warning when ffmpeg is absent
  • Synthesized AudioTracks appended before the unchanged existing mixer, wired on both encode paths (openh264 mux + ffmpeg); volume: 0 skips extraction; nested videos found through containers
  • Minimal schema touch: Clone derived on AudioTrack
  • Documented v1 limits: world views skipped (camera timeline), loop_video audio plays once

Tests: 13 new (timeline offsets ×3, atempo chains ×5, collection rules ×3, ffmpeg-gated integration with a generated sine fixture asserting start=1.2). 235 total, all green.

Verify: cargo test --workspace → 235 passed ✓ · cargo fmt --check ✓ · clippy 0 warnings ✓

Video components' soundtracks now reach the output mix — frames-only
extraction silently dropped them and the volume field was never read.

- pure scene_start_offsets replicates build_frame_tasks placement
  (transition overlaps, inter-view transitions) — unit-tested
- ffmpeg -vn extraction honoring trim_start/trim_end and playback_rate
  (chained atempo beyond the 0.5..2.0 per-instance limit), cached in
  temp_dir by content hash; no ffmpeg => warning + skip
- synthesized AudioTracks (start/end/volume) appended before the
  existing mixer on both encode paths (openh264 mux and ffmpeg)
- documented v1 limits: world views skipped, loop_video audio plays
  once
@LeadcodeDev
LeadcodeDev merged commit 272750e into main Jul 18, 2026
@LeadcodeDev
LeadcodeDev deleted the feat/embedded-video-audio branch July 18, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(encode): extract and mix embedded video audio

1 participant