AAC encoder of Yuru Karaoke Creator: corresponding source ========================================================== When a browser has no usable AAC audio encoder of its own (iPhone Safari today), the app encodes the audio of the saved video with vendor/mediabunny-aac-encoder.min.mjs. That file is @mediabunny/aac-encoder 1.61.5 (MPL-2.0, github.com/Vanilagy/mediabunny, folder packages/aac-encoder) with two changes: 1. its two imports of "mediabunny" point to the file next to it (./mediabunny.min.mjs); 2. its WebAssembly module is rebuilt by us from the FFmpeg 8.1.3 release (LGPL-2.1-or-later), with the same configure options and compiler command as upstream (upstream/README.md), using Emscripten 6.0.13. Upstream had built it from an FFmpeg development checkout whose exact revision is not recorded. Files (published with the app under source/): ../ffmpeg-8.1.3.tar.xz FFmpeg 8.1.3, exactly as released on ffmpeg.org sha256 7138d28c96d9d3e3af4ee3d8cad72741f8ffb40da90c1112235dea3ecd3178a3 ../ffmpeg-8.1.3.tar.xz.asc FFmpeg's signature of it (FFmpeg release signing key, ffmpeg.org/ffmpeg-devel.asc) build.sh builds aac.js (Emscripten glue + inlined WASM) from the tarball upstream/bridge.c the C bridge between JavaScript and FFmpeg's API, from upstream (MPL-2.0) upstream/README.md upstream's build instructions splice.mjs, worker-source.mjs put aac.js into the upstream bundle in place of upstream's module; nothing else in the bundle is changed To rebuild: 1. Install emsdk 6.0.13 (github.com/emscripten-core/emsdk) into _toolchain/emsdk-6.0.13 next to build.sh, with "emsdk install 6.0.13", "emsdk install mingw-7.1.0-64bit" (for make on Windows) and "emsdk activate 6.0.13". On Linux or macOS, any GNU make works instead of mingw. 2. sh build.sh (set FFMPEG_TARBALL to the path of ffmpeg-8.1.3.tar.xz if it is not at ../../app/source/) 3. node splice.mjs aac.js The build is reproducible: building twice gives the same aac.js, and the result is the file served here. You may replace the encoder with your own build: it is the separate file vendor/mediabunny-aac-encoder.min.mjs, loaded only when the browser has no AAC encoder of its own. Licences: FFmpeg vendor/LICENSE-ffmpeg-LGPL-2.1.txt, Emscripten runtime vendor/LICENSE-emscripten.txt, musl C library (linked in by Emscripten) vendor/LICENSE-musl.txt, Mediabunny vendor/LICENSE-mediabunny*.txt.