Skip to content

Recorded A/V clap gate exceeds 50 ms on released baseline and source-bus candidate #579

Description

@iamfatness

During #535 validation, repairing the clap harness's missing audio subscription (#578) exposed a failed recorded-content sync gate on both released main 793c452 and the candidate f92aaf9.

Same corrected harness, Windows real D3D11/Media Foundation build, fake Zoom engine emitting a paired one-frame flash and sample-timed PCM burst, 24-second Program MP4, default three-frame Program buffer, 60 fps. No builds or other tests ran during either recording. The normal installed app remained open but Zoom was offline.

  • Candidate: 8 video flashes / 8 audio bursts, video-minus-audio median -74.0 ms (range -84.6 to -66.6 ms).
  • Released baseline: 8/8, median -95.1 ms (range -103.9 to -88.0 ms).
  • Both exceed the existing 50 ms gate; no threshold was changed.
  • ffprobe reports audio/video start_time 0 for both files. The harness's initial silence failure without explicit subscription was independently reproduced on both builds.

This is a recorded headless-path finding, not yet an attribution to source-bus changes, the live Zoom SDK, or YouTube. The candidate adds no queue or retimestamping, but a passing regression suite alone cannot waive the failed content gate.

Next isolation: measure source-to-mixer PCM age, Program delay and recording timestamp origins; distinguish fake-engine timing, DSP/feed buffering and AAC/container delay using matched content traces before changing production timing. Preserve the chosen Program buffer, audio priming, image quality and 50 ms acceptance threshold. Acceptance: paired content events within the existing gate with timing evidence explaining the correction; then real-source verification.

Artifacts in cvp-535-audio: artifacts/535-clap-fixed.log, artifacts/535-baseline-clap-fixed.log. Recordings: native/build-dev/Recordings/CoreVideoPro/validate-av-clap/av-clap-20260921-163809/Program.mp4 and the released worktree's corresponding av-clap-20260921-163853/Program.mp4. This is an unranked intake finding and an unresolved #535 validation dependency.

Activity

  1. iamfatness commented on Sep 21, 2026

    @iamfatness
    OwnerAuthor

    Further isolation: a direct Media Foundation recording probe supplied matched NV12 flashes and PCM bursts at exactly 1.0 and 3.0 seconds on the same recording epoch, bypassing Zoom/runtime/mixer/feed/Program delay. Decoding the resulting MP4 measured video at 1.0/3.0 and audio at 0.999979/2.999979 seconds: about 0.021 ms difference (one sample). This controlled encoder-only path does not reproduce the 74–95 ms lag; the discrepancy is upstream of the tested mux/encoder path.

    The full candidate trace repeated the earlier result: six paired events over 18 seconds, median -73.5 ms, range -84.0 to -69.6 ms. Native source inspection found the existing steady feed primes at three 20ms blocks and keeps a two-to-five-block correction band; its comment still describes a two-block start/one-block reserve. That is a latency contributor to measure, not proof of the sole cause. Do not reduce priming or change timestamps based solely on the measured offset.

    Probe artifact: artifacts/encoder-clap-probe/matched-20260921-164510/Program.mp4, result JSON artifacts/encoder-clap-probe-result.json. The temporary diagnostic test was removed after recording the result; no production timing changes were made.

  2. added a commit that references this issue on Sep 21, 2026
  3. iamfatness commented on Sep 21, 2026

    @iamfatness
    OwnerAuthor

    Candidate 0c91afd in PR #577 corrects source-video playout timing. The old queue popped on every render tick and lost its reserve for 30 Hz input / 60 Hz rendering, while Zoom audio kept its priming cushion. New video eligibility is 60 ms after ingest observation: nominal first-sample age of three 20 ms audio blocks. It adds source-video latency; it does not shrink audio priming, change Program buffer selection or recording PTS, or downgrade pixels. Queue is bounded to 12 frames, with expired-frame accounting and unsubscribe cleanup.

    Release regression suite: 1,159 passed / zero failed, including four timing/capacity regressions. Final clap evidence (24 seconds, 8/8 events in every run, original 50 ms limit):

    • 30 fps input / 3-frame Program: median -34.7 ms, range -40.7 to -25.2 ms.
    • 60 fps / 3-frame: median -22.5 ms, range -25.9 to -15.8 ms.
    • 30 fps / 2-frame: median -10.0 ms, range -19.0 to -2.5 ms.
    • Repeat final build: median -16.4 ms, range -25.3 to -12.7 ms.

    Trace before correction measured 40-60 ms in the audio feed; the initial 40 ms video-reserve trial still failed at -52.4 ms median. Final target also accounts for the current capture block. Existing audio jitter protection remains unchanged. This is nominal arrival-based alignment, not sensor timestamps or proof of every live-source combination.

    Automated content gate now passes; issue remains OPEN pending merged fix and real-source acceptance. Installed beta is unchanged. Local logs under C:/Users/walla/cvp-535-audio/artifacts: 579-native-final.log and 579-final-clap-*.log. Source/video queue tests exercise source-rate changes, restarted frame IDs, render stalls, and 120 Hz diagnostic queue headroom. CI is rerunning on the pushed head.

  4. iamfatness commented on Sep 21, 2026

    @iamfatness
    OwnerAuthor

    All 19 CI/CodeQL checks passed on final PR head f61eb53, including Windows shell/meter/publish, Linux/macOS native, Metal, integration and TSan. Its tree matches tested/package commit 0c91afd exactly. Local Release suite 1,159/0 and all four recorded sync runs remain passing evidence. PR stays draft for the remaining real-source A/V check; #579 remains open, and the installed beta remains unchanged. A verified local test ZIP and instructions are ready under artifacts/releases/beta-2026-09-21-0c91afd.

  5. iamfatness commented on Sep 21, 2026

    @iamfatness
    OwnerAuthor

    PR #577 is merged into main as db9e703. Exact-main CI and CodeQL passed.

    Published and installed beta: https://github.com/iamfatness/CoreVideoPro/releases/tag/beta-2026-09-21-db9e703

    All 849 installed payload hashes and all six downloaded release assets verified. Installed shell/native core start successfully and produce Program frames. The automated clap gate passed 32 paired events within 41 ms; real-meeting lip-sync acceptance remains pending. This release does not close broader #535 migration or #555/#581 visual acceptance.

  6. iamfatness commented on Sep 22, 2026

    @iamfatness
    OwnerAuthor

    Owner live acceptance on 2026-09-22: lip sync looked good in their test last night. Combined with merged PR #577 (db9e703), the recorded 32-event sync gate inside 41 ms, and installed beta acceptance, this completes the remaining real-source check for this issue. Broader source-bus migration remains open in #535.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogRanked in docs/BACKLOG.md

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions