# Reproduce the one-second encoder boundary experiment

Executed September 7, 2026 in the Codex in-app browser, whose user agent reports Chromium 152 on macOS. `browser-result.json` preserves the observed environment. Mediabunny was the existing local 1.50.8 package; FFmpeg 8.0.1 independently inspected the saved output.

This is a real browser media experiment using drawn test cards and synthetic tones. **No JoyVASA or LivePortrait model ran, no face was generated, and no neural performance or lip-sync result is claimed.** The exact function bodies come from `src/lib/editorRuntime.js` at commit `68980d142cce421eab86cd4ef26a4475a6affd56`. They match the parent package's preserved source excerpt; only the dependency import and a provenance comment were supplied by the harness.

## Inputs and retained result

- `input-A.png`, `input-B.png`, `input-C.png`: original 256 × 256 Canvas-drawn red, green and blue cards, each visibly labelled **NO AI INFERENCE**. The source timestamps supplied to the encoder were `[0, 0.5, 1]` seconds. The browser harness contains all drawing instructions; no stock portrait or image model was used.
- `tone-0.25s.wav`, `tone-6s.wav`: synthetic stereo 48 kHz PCM16, 440 Hz sine wave, identical channels. The WAV generator is in the harness. They contain no recorded person or speech. They were sent to the audio decoder separately, never to the video encoder.
- `three-cards-eight-frames.webm`: the original, unmodified browser output. VP8; 256 × 256; 1.000 second; eight frames; 21,845 bytes; zero audio tracks.
- `browser-result.json`: measured browser observations. The single encoder call took about 137 ms in this run. That includes image-bitmap creation and video packaging, excludes all model work, and is **not a neural-speed benchmark**.
- `ffprobe.json`, `frame-timestamps.json`, `verification.json`: independent inspection of the output. The decoded card sequence is `AAABBBBC` at timestamps 0, 0.125, 0.250, 0.375, 0.500, 0.625, 0.750 and 0.875 seconds. The classifier reads a background pixel away from the labels; it distinguishes the three fixture identities, not exact decoded-frame hashes. Lossy VP8 may produce slightly different pixel values for a repeated card.

The quarter-second audio returns 64,000 samples: the last 60,000 are all zero. The six-second tone also returns 64,000 samples, with nonzero tone samples in the last portion. These checks exercise padding and the four-second limit. Because this long fixture is a stationary tone, it does not independently prove which spoken phrase would be retained; the linked source loop establishes the starting sample position.

## Run locally

[Download the complete reproduction ZIP](https://ai-creator.top/resources/evidence/2026-09-07/avatar/encoder-reproduction.zip). It contains `avatar-encoder-experiment/` with the upstream `LICENSE`, original source excerpt `avatar-media-functions.js`, and the complete `encoder-trial/` directory: harness, exact extracted functions, original fixtures, captured output, results, verifier and manifest. Node.js 22 and FFmpeg must already be available. Mediabunny is a separate dependency installed in the steps below; no model weights are needed.

Unzip the package, enter its top-level directory, install the pinned dependency and start the local server:

```sh
unzip encoder-reproduction.zip
cd avatar-encoder-experiment
npm install --prefix ./runtime --no-save mediabunny@1.50.8
node encoder-trial/serve-trial.mjs "$PWD/runtime/node_modules/mediabunny" 8766
```

The dependency installation needs access to the npm registry. Once it is installed, the experiment runs locally without a model download or remote inference service. If you already have Mediabunny 1.50.8, skip installation and supply its absolute package directory to `serve-trial.mjs` instead.

Open `http://127.0.0.1:8766/` in a browser with WebCodecs and VP8 encoding. Do not open `trial.html` directly as a file or run it on the public website: its dependency and capture endpoints are supplied by the local server. The harness automatically runs and saves its inputs, video and result through the loopback server. It overwrites this experiment's known output files, so retain the original ZIP if you want to compare the published evidence with your new run.

When the page shows the JSON result, open another terminal in the same `avatar-encoder-experiment/` directory and run:

```sh
node encoder-trial/verify-trial.mjs
```

The verifier asserts the video duration, track count, frame count, decoded card sequence and recorded audio-window observations. The encoder and audio decoder in `tested-functions.mjs` are copied without changes from the pinned source excerpt. No mocked browser encoder, substitute video generator or ffmpeg-generated replacement WebM is used.

`manifest.json` records SHA-256 hashes for the captured files and runnable source. Browser/codec differences may change output bytes and timing on another run; those differences should be recorded rather than forced to match the reference hash. Stop the local server with Ctrl+C after the run.

## Interpretation

At 0.250 and 0.750 seconds, two source images are equally close and the earlier array entry wins. Card B appears at 0.375 even though its source timestamp is 0.500: this is nearest-image selection, not motion interpolation. The output is a usable video file but has only three source images and no audio stream. Testing a real talking performance still requires a source portrait, speech, neural output, final export with sound and perceptual review.

The fixture code and original cards/tones in this folder are released under the parent package's MIT notice. The copied Timeline Studio functions retain the upstream notice in `../LICENSE`. Mediabunny is not redistributed in this evidence package; its separate package license applies when obtaining that dependency.
