# AAC frame finder for johnmcm.com The WebAssembly module behind Video Repair's sound without a working clip (/repair-video): FFmpeg's AAC decoder, asked one frame at a time how many bytes each raw AAC frame takes. A recording cut off before its index keeps its sound as raw AAC frames with no lengths written down; the page finds them by decoding, then copies them into the repaired file untouched. - FFmpeg 5.1.6 (LGPL-2.1-or-later), unmodified: the same release tarball as the site's FFmpeg, kept and published with it at /source/ffmpeg/ (`ffmpeg-5.1.6.tar.xz`, SHA-256 `f4fa0662...0901bd`, checked in the build). Configured with everything off but the AAC decoder. - `src/aacscan.c`: this site's glue (LGPL-2.1-or-later). It opens the decoder with an AudioSpecificConfig and calls its decode callback directly, because that returns the bytes consumed, which the public API does not. - `Dockerfile` and `build.ps1`: the build, with the Emscripten image pinned by digest. Run `build.ps1` with Docker Desktop running; it builds from `wasm-src/` (to use the shared tarball) and puts the module in `frontend/vendor/local/aacscan@1/`. The page's side - trying each usual AAC setting on the stretches between the frames of picture, and settling the sample rate - is in `frontend/src/app/repair-video/aac-alone.ts`.