{
  "date": "2026-10-27",
  "engine": "Pinned @ffmpeg/core 0.12.10 (WebAssembly) executed every repair command under Node; desktop FFmpeg/ffprobe built the synthetic fixtures and independently inspected, decoded, hashed and measured the results.",
  "desktop": "ffmpeg version 8.1.1-full_build-www.gyan.dev Copyright (c) 2000-2026 the FFmpeg developers",
  "activeDurationBasis": "Onsets and levels come from 48 kHz mono PCM decodes with 50 ms windows and per-tone Goertzel magnitudes; heights come from per-frame gray-luma means.",
  "sync": {
    "fixtures": "Synthetic 320x180 30 fps clips, 4.0 s: one white flash frame at t=2.0 on the picture; an 880 Hz beep at amplitude 0.3 on the soundtrack. Early fixture beep at 1.7 s (sound early by 0.3 s); late fixture beep at 2.3 s (sound late by 0.3 s).",
    "early": {
      "offset": 0.3,
      "mode": "adelay",
      "beepBefore": 1.7,
      "beepAfter": 2,
      "duration": 4,
      "videoHashMatch": true,
      "flashFrame": 60,
      "output": "/assets/repair-sync-early.mp4",
      "sha256": "8db4028f4d60690a6b341666649eeb8a2bcd5e415f74e3b5b3871def6e8a4e85",
      "args": [
        "ffmpeg",
        "-nostats",
        "-hide_banner",
        "-loglevel",
        "info",
        "-i",
        "source.media",
        "-map",
        "0:v:0",
        "-map",
        "0:a:0",
        "-af",
        "adelay=300:all=1",
        "-t",
        "4",
        "-c:v",
        "copy",
        "-c:a",
        "aac",
        "-b:a",
        "192k",
        "-ar",
        "48000",
        "-ac",
        "2",
        "-map_metadata",
        "-1",
        "-map_chapters",
        "-1",
        "-movflags",
        "+faststart",
        "-y",
        "sync-fixed.mp4"
      ]
    },
    "late": {
      "offset": -0.3,
      "mode": "tpad",
      "beepBefore": 2.3,
      "beepAfter": 2.3,
      "duration": 4.3,
      "flashFrame": 69,
      "output": "/assets/repair-sync-late.mp4",
      "sha256": "e1b5223a5b8b2fffc79fd7bf1b990f9879fae131d642b897dee882d05251c260",
      "args": [
        "ffmpeg",
        "-nostats",
        "-hide_banner",
        "-loglevel",
        "info",
        "-i",
        "source.media",
        "-map",
        "0:v:0",
        "-map",
        "0:a:0",
        "-vf",
        "tpad=start_duration=0.3:start_mode=clone,scale=trunc(iw/2)*2:trunc(ih/2)*2,format=yuv420p",
        "-c:v",
        "libx264",
        "-preset",
        "veryfast",
        "-crf",
        "20",
        "-c:a",
        "copy",
        "-map_metadata",
        "-1",
        "-map_chapters",
        "-1",
        "-movflags",
        "+faststart",
        "-y",
        "sync-fixed.mp4"
      ]
    },
    "checks": "Beep onsets from 48 kHz mono PCM decode; picture flash located by per-frame gray-luma scan (exactly one bright frame, mean > 120/255). Early path video compares equal by SHA-256 signed-frame streamhash. Decode of both exports is error-free."
  },
  "swap": {
    "fixtures": "Synthetic 4.0 s clip whose own soundtrack holds a 660 Hz beep at 1.0â€“1.3 s (the sentinel), and a 3.0 s 440 Hz sine WAV as the replacement at offset +0.5 s. The picture and the replacement are independent; frames never move.",
    "measurements": {
      "copy": {
        "offset": 0.5,
        "gain": 0,
        "headRMS": 0,
        "tailRMS": 0,
        "toneRMS": 0.2121,
        "mag440": 0.3,
        "mag660": 0.001,
        "originalLeak": "none",
        "duration": 4,
        "videoHashMatch": true,
        "output": "/assets/repair-swap.mp4",
        "sha256": "1b4483e7373bf8ba0301b873d5ab722fd0e386a4fab9e000cacd2e2c9fe7935e",
        "args": [
          "ffmpeg",
          "-nostats",
          "-hide_banner",
          "-loglevel",
          "info",
          "-i",
          "source.media",
          "-i",
          "replacement.media",
          "-filter_complex",
          "[1:a:0]aresample=48000,aformat=sample_fmts=fltp:channel_layouts=stereo,volume=0dB,adelay=500:all=1,apad=whole_dur=4[out]",
          "-map",
          "0:v:0",
          "-map",
          "[out]",
          "-c:v",
          "copy",
          "-t",
          "4",
          "-c:a",
          "aac",
          "-b:a",
          "192k",
          "-ar",
          "48000",
          "-ac",
          "2",
          "-map_metadata",
          "-1",
          "-map_chapters",
          "-1",
          "-movflags",
          "+faststart",
          "-y",
          "sound-swapped.mp4"
        ]
      },
      "gain": {
        "gainDb": 6,
        "toneRMS": 0.4232,
        "ratio": 1.995,
        "expected": 1.995,
        "output": "/assets/repair-swap-gain.mp4",
        "sha256": "09fb21315578194d227fd15e0dc72f8198ed1b343596002254c3d896accad3be",
        "args": [
          "ffmpeg",
          "-nostats",
          "-hide_banner",
          "-loglevel",
          "info",
          "-i",
          "source.media",
          "-i",
          "replacement.media",
          "-filter_complex",
          "[1:a:0]aresample=48000,aformat=sample_fmts=fltp:channel_layouts=stereo,volume=6dB,adelay=500:all=1,apad=whole_dur=4[out]",
          "-map",
          "0:v:0",
          "-map",
          "[out]",
          "-c:v",
          "copy",
          "-t",
          "4",
          "-c:a",
          "aac",
          "-b:a",
          "192k",
          "-ar",
          "48000",
          "-ac",
          "2",
          "-map_metadata",
          "-1",
          "-map_chapters",
          "-1",
          "-movflags",
          "+faststart",
          "-y",
          "sound-swapped.mp4"
        ]
      },
      "loudnorm": {
        "target": "I=-16:TP=-1.5:LRA=11",
        "measuredILUFS": -16.4,
        "measuredBy": "Desktop ebur128 filter on the exported file",
        "output": "/assets/repair-swap-loudnorm.mp4",
        "sha256": "33c0209bbdad66a6b7e9b1766894c7a7afc13cd34e951bf1a19ae667c3541559",
        "args": [
          "ffmpeg",
          "-nostats",
          "-hide_banner",
          "-loglevel",
          "info",
          "-i",
          "source.media",
          "-i",
          "replacement.media",
          "-filter_complex",
          "[1:a:0]aresample=48000,aformat=sample_fmts=fltp:channel_layouts=stereo,volume=0dB,loudnorm=I=-16:TP=-1.5:LRA=11,adelay=500:all=1,apad=whole_dur=4[out]",
          "-map",
          "0:v:0",
          "-map",
          "[out]",
          "-c:v",
          "copy",
          "-t",
          "4",
          "-c:a",
          "aac",
          "-b:a",
          "192k",
          "-ar",
          "48000",
          "-ac",
          "2",
          "-map_metadata",
          "-1",
          "-map_chapters",
          "-1",
          "-movflags",
          "+faststart",
          "-y",
          "sound-swapped.mp4"
        ]
      }
    },
    "checks": "RMS and per-tone magnitudes from 48 kHz mono decodes; a 440 Hz magnitude with the 660 Hz sentinel kept below 15 percent of it proves the original track took no part in the export. Picture compared by signed-frame SHA-256 streamhash. Loudness measured with desktop ebur128."
  },
  "silence": {
    "fixture": "12.0 s 640x360 clip from a Node-generated PCM bed: speech-like 180 Hz + 2000 Hz components at amplitudes 0.6/0.3 inside [0,2),[4,6.5),[8,12); a quiet 0.005-amplitude tone inside [2,4) and [6.5,8).",
    "detection": {
      "thresholdDb": -40,
      "minDuration": 0.5,
      "engine": [
        {
          "start": 2,
          "end": 4
        },
        {
          "start": 6.5,
          "end": 8
        }
      ],
      "desktopParity": true
    },
    "removed": 3.5,
    "kept": 8.5,
    "outputDuration": 8.5,
    "overallRMS": 0.474,
    "decodeErrorLines": 0,
    "output": "/assets/repair-silence-cut.mp4",
    "sha256": "4d751bbf5f4037b2b152dee5d148b19fb29cd7479b392a14bdd01d453b447691",
    "args": [
      "ffmpeg",
      "-nostats",
      "-hide_banner",
      "-loglevel",
      "info",
      "-i",
      "source.media",
      "-filter_complex",
      "[0:v]trim=start=0:end=2,setpts=PTS-STARTPTS,scale=trunc(iw/2)*2:trunc(ih/2)*2,format=yuv420p[v0];[0:a]atrim=start=0:end=2,asetpts=PTS-STARTPTS[a0];[0:v]trim=start=4.00002:end=6.5,setpts=PTS-STARTPTS,scale=trunc(iw/2)*2:trunc(ih/2)*2,format=yuv420p[v1];[0:a]atrim=start=4.00002:end=6.5,asetpts=PTS-STARTPTS[a1];[0:v]trim=start=8.00002:end=12,setpts=PTS-STARTPTS,scale=trunc(iw/2)*2:trunc(ih/2)*2,format=yuv420p[v2];[0:a]atrim=start=8.00002:end=12,asetpts=PTS-STARTPTS[a2];[v0][a0][v1][a1][v2][a2]concat=n=3:v=1:a=1[v][a]",
      "-map",
      "[v]",
      "-map",
      "[a]",
      "-c:v",
      "libx264",
      "-preset",
      "veryfast",
      "-crf",
      "20",
      "-c:a",
      "aac",
      "-b:a",
      "192k",
      "-ar",
      "48000",
      "-ac",
      "2",
      "-map_metadata",
      "-1",
      "-map_chapters",
      "-1",
      "-movflags",
      "+faststart",
      "-y",
      "dead-air-cut.mp4"
    ]
  },
  "limits": "Synthetic 320x180 and 640x360 clips with pure tones and level-switched beds. These checks validate the plan commands, timing arithmetic and verification logic on known material; they do not certify arbitrary media, perceived lip sync, loudness compliance, speech intelligibility or subjective quality."
}